summaryrefslogtreecommitdiff
path: root/source4/lib/com/classes/simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/com/classes/simple.c')
-rw-r--r--source4/lib/com/classes/simple.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/lib/com/classes/simple.c b/source4/lib/com/classes/simple.c
index a6134d4c36..ad03c17cce 100644
--- a/source4/lib/com/classes/simple.c
+++ b/source4/lib/com/classes/simple.c
@@ -22,8 +22,8 @@
#include "lib/com/com.h"
#include "librpc/gen_ndr/com_dcom.h"
-extern const struct IClassFactory_vtable simple_classobject_vtable;
-extern const struct IStream_vtable simple_IStream_vtable;
+extern struct IClassFactory_vtable simple_classobject_vtable;
+extern struct IStream_vtable simple_IStream_vtable;
static WERROR simple_IUnknown_QueryInterface (struct IUnknown *d, TALLOC_CTX *mem_ctx, struct GUID *iid, struct IUnknown **iun)
{
@@ -69,7 +69,7 @@ static WERROR simpleclass_IClassFactory_CreateInstance (struct IClassFactory *d,
ret->vtable = &simple_IStream_vtable;
ret->object_data = NULL;
- *ppv = ret;
+ *ppv = (struct IUnknown *)ret;
return WERR_OK;
}
@@ -85,7 +85,8 @@ static uint32_t simpleclass_IUnknown_Release (struct IUnknown *d, TALLOC_CTX *me
}
/* Everything below this line should be autogenerated later on */
-const struct IClassFactory_vtable simple_classobject_vtable = {
+struct IClassFactory_vtable simple_classobject_vtable = {
+ {},
simpleclass_IUnknown_QueryInterface,
simpleclass_IUnknown_AddRef,
simpleclass_IUnknown_Release,
@@ -95,7 +96,8 @@ const struct IClassFactory_vtable simple_classobject_vtable = {
NULL
};
-const struct IStream_vtable simple_IStream_vtable = {
+struct IStream_vtable simple_IStream_vtable = {
+ {},
simple_IUnknown_QueryInterface,
simple_IUnknown_AddRef,
simple_IUnknown_Release,
@@ -113,6 +115,8 @@ NTSTATUS com_simple_init(void)
class_object->vtable = (struct IUnknown_vtable *)&simple_classobject_vtable;
GUID_from_string(CLSID_SIMPLE, &clsid);
+ GUID_from_string(COM_ICLASSFACTORY_UUID, &simple_classobject_vtable.iid);
+ GUID_from_string(COM_ISTREAM_UUID, &simple_IStream_vtable.iid);
return com_register_running_class(&clsid, PROGID_SIMPLE, class_object);
}