From: Andreas Schneider Date: Wed, 26 Jul 2017 16:16:43 +0000 (+0200) Subject: s4:lib:com: Fix function declartions X-Git-Tag: talloc-2.1.12~405 X-Git-Url: http://git.samba.org/samba.git/?p=nivanova%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=d31a8cd800db3862cf7e6935f135705af647b1d0 s4:lib:com: Fix function declartions Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/librpc/idl/dcom.idl b/librpc/idl/dcom.idl index e53d7b8f811..5559811be38 100644 --- a/librpc/idl/dcom.idl +++ b/librpc/idl/dcom.idl @@ -52,7 +52,7 @@ interface IUnknown [local] WERROR CreateInstance( [in,unique] MInterfacePointer *pUnknown, [in,unique] GUID *iid, - [out, iid_is(riid),unique] MInterfacePointer *ppv + [out, iid_is(riid),unique] MInterfacePointer **ppv ); [call_as(CreateInstance)] WERROR RemoteCreateInstance(); diff --git a/source4/lib/com/classes/simple.c b/source4/lib/com/classes/simple.c index 4d28a158102..54c74ce564b 100644 --- a/source4/lib/com/classes/simple.c +++ b/source4/lib/com/classes/simple.c @@ -75,7 +75,7 @@ static WERROR simpleclass_IClassFactory_CreateInstance(struct IClassFactory *d, TALLOC_CTX *mem_ctx, struct MInterfacePointer *pUnknown, struct GUID *iid, - struct MInterfacePointer *ppv) + struct MInterfacePointer **ppv) { struct IStream *ret; /* FIXME: Check whether IID == ISTREAM_IID */ @@ -84,7 +84,7 @@ static WERROR simpleclass_IClassFactory_CreateInstance(struct IClassFactory *d, ret->vtable = &simple_IStream_vtable; ret->object_data = NULL; - ppv = (struct MInterfacePointer *)ret; + *ppv = (struct MInterfacePointer *)ret; return WERR_OK; } diff --git a/source4/lib/com/main.c b/source4/lib/com/main.c index 68a3bc6d3d3..647f32346d9 100644 --- a/source4/lib/com/main.c +++ b/source4/lib/com/main.c @@ -52,7 +52,7 @@ WERROR com_create_object(struct com_context *ctx, struct GUID *clsid, int num_if } /* Run IClassFactory::CreateInstance() */ - error = IClassFactory_CreateInstance(factory, ctx, NULL, &classfact_iid, (struct MInterfacePointer *) &iunk); + error = IClassFactory_CreateInstance(factory, ctx, NULL, &classfact_iid, (struct MInterfacePointer **)&iunk); if (!W_ERROR_IS_OK(error)) { DEBUG(3, ("Error while calling IClassFactory::CreateInstance : %s\n", win_errstr(error))); return error; @@ -64,7 +64,7 @@ WERROR com_create_object(struct com_context *ctx, struct GUID *clsid, int num_if } /* Release class object */ - IUnknown_Release(factory, ctx); + IUnknown_Release((struct IUnknown *)factory, ctx); error = WERR_OK;