summaryrefslogtreecommitdiff
path: root/source4/lib/dcom/classes/simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/dcom/classes/simple.c')
-rw-r--r--source4/lib/dcom/classes/simple.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/source4/lib/dcom/classes/simple.c b/source4/lib/dcom/classes/simple.c
index 90dda6bc84..e5b5bf3f41 100644
--- a/source4/lib/dcom/classes/simple.c
+++ b/source4/lib/dcom/classes/simple.c
@@ -21,7 +21,25 @@
#include "includes.h"
#include "lib/dcom/common/dcom.h"
-static struct dcom_IClassFactory_vtable simple_classobject;
+NTSTATUS simple_QueryInterface (struct dcom_interface_p *d, TALLOC_CTX *mem_ctx, struct QueryInterface *r)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+static NTSTATUS simple_CreateInstance (struct dcom_interface_p *d, TALLOC_CTX *mem_ctx, struct CreateInstance *r)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+/* Everything below this line should be autogenerated later on */
+
+static struct dcom_IClassFactory_vtable simple_classobject = {
+ { simple_QueryInterface, NULL, NULL },
+ simple_CreateInstance,
+ NULL,
+ NULL,
+ NULL
+};
NTSTATUS dcom_simple_init(void)
{
@@ -32,10 +50,17 @@ NTSTATUS dcom_simple_init(void)
GUID_from_string(DCERPC_IUNKNOWN_UUID, &iid);
- simple_class.class_object = dcom_new_local_ifacep(talloc_autofree_context(),
- dcom_interface_by_iid(&iid),
+ simple_class.class_object = dcom_new_local_ifacep(
+ talloc_autofree_context(),
+ &iid,
&simple_classobject, NULL);
+ if (!simple_class.class_object) {
+ DEBUG(1, ("Unable to create class object for simple class\n"));
+ return NT_STATUS_FOOBAR;
+ }
+
GUID_from_string("5e9ddec7-5767-11cf-beab-00aa006c3606", &simple_class.clsid);
+
return dcom_register_class(&simple_class);
}