summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-10 21:20:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:43 -0500
commit0d696dc0e9867889fe198e61ed576af51ee732d1 (patch)
treec41461d05cdfb72d62cabef049c364f4e5fef128 /source4/rpc_server
parentf847f3a3e13d2d96f9b74a398047d84b4ad78127 (diff)
downloadsamba-0d696dc0e9867889fe198e61ed576af51ee732d1.tar.gz
samba-0d696dc0e9867889fe198e61ed576af51ee732d1.tar.bz2
samba-0d696dc0e9867889fe198e61ed576af51ee732d1.zip
r3667: Small COM fixes
(This used to be commit 7484b9be7423ccd7e37432951700939e8a53d513)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcom/dcom.h5
-rw-r--r--source4/rpc_server/dcom/remact.c19
2 files changed, 17 insertions, 7 deletions
diff --git a/source4/rpc_server/dcom/dcom.h b/source4/rpc_server/dcom/dcom.h
index 4fdcd0e0e6..2d4dc7d628 100644
--- a/source4/rpc_server/dcom/dcom.h
+++ b/source4/rpc_server/dcom/dcom.h
@@ -24,13 +24,15 @@
struct dcom_class
{
const char *name;
+ const char *prog_id;
struct GUID CLSID;
/* List of IID's implemented */
- uint32 cIIDs;
+ uint32 num_iids;
struct GUID *IID;
/* Pointers to functions this class implements */
+ void **interfaces;
};
struct dcom_object
@@ -45,6 +47,7 @@ struct dcom_object
struct dcom_interface_pointer
{
struct dcom_object *object;
+ struct dcerpc_interface_table *interface;
struct GUID ipid;
};
diff --git a/source4/rpc_server/dcom/remact.c b/source4/rpc_server/dcom/remact.c
index 0ec1ea5a51..7a2b21a789 100644
--- a/source4/rpc_server/dcom/remact.c
+++ b/source4/rpc_server/dcom/remact.c
@@ -38,11 +38,14 @@ struct dcom_interface_pointer *dcom_interface_pointer_by_ipid(struct GUID *ipid)
*/
static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct RemoteActivation *r)
{
+ struct IClassFactory_CreateInstance *cr;
+ struct IUnknown_Release *ur;
+ struct dcom_interface *o;
int i;
+
/* FIXME: CoGetClassObject() */
/* FIXME: IClassFactory::CreateInstance() */
- /* FIXME: Register newly created object with dcerpc subsystem */
- /* FIXME: IClassFactory::Release() */
+ /* FIXME: IUnknown::Release() */
ZERO_STRUCT(r->out);
r->out.ServerVersion.MajorVersion = COM_MAJOR_VERSION;
@@ -55,17 +58,21 @@ static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
* r->out.interfaces */
r->out.ifaces = talloc_array_p(mem_ctx, struct pMInterfacePointer, r->in.Interfaces);
r->out.results = talloc_array_p(mem_ctx, WERROR, r->in.Interfaces);
+ r->out.hr = cr->out.result;
+
for (i = 0; i < r->in.Interfaces; i++) {
- ZERO_STRUCT(r->out.ifaces[i]);
- r->out.results[i] = WERR_NOT_SUPPORTED;
+ struct IUnknown_QueryInterface rr;
+ rr.in.iid = &r->in.pIIDs[i];
+ dcerpc_IUnknown_QueryInterface(o, mem_ctx, &rr);
+ ZERO_STRUCT(r->out.ifaces[i]);
+ r->out.results[i] = rr.out.result;
}
/* FIXME: */
r->out.pOxid = 0;
ZERO_STRUCT(r->out.ipidRemUnknown);
- r->out.hr = WERR_NOT_SUPPORTED;
- return WERR_NOT_SUPPORTED;
+ return WERR_OK;
}