summaryrefslogtreecommitdiff
path: root/source4/lib/com/classes/simple.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-06 22:37:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:59 -0500
commitdd2aefd56b0968da8b1c4d055bc8c2f30382fb23 (patch)
tree328c4ce52593338ffe6433e7b88098516f389222 /source4/lib/com/classes/simple.c
parent77ec3f684dc8563965ae5118ef5549925ea81d0f (diff)
downloadsamba-dd2aefd56b0968da8b1c4d055bc8c2f30382fb23.tar.gz
samba-dd2aefd56b0968da8b1c4d055bc8c2f30382fb23.tar.bz2
samba-dd2aefd56b0968da8b1c4d055bc8c2f30382fb23.zip
r5675: - More DCOM bug fixes
- Keep COM and DCOM more seperated (This used to be commit f694f484c422d0c86beb58e8f62f134f8676d5e1)
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);
}