+ struct RemoteActivation r;
+ struct dcerpc_pipe *p;
+ NTSTATUS status;
+ uint16 protseq[] = DCOM_NEGOTIATED_PROTOCOLS;
+
+ status = dcom_connect(&p, server, domain, user, pass);
+ if (NT_STATUS_IS_ERR(status)) {
+ DEBUG(1, ("Unable to connect to %s - %s\n", server, nt_errstr(status)));
+ return ntstatus_to_werror(status);
+ }
+
+ ZERO_STRUCT(r.in);
+ r.in.this.version.MajorVersion = 5;
+ r.in.this.version.MinorVersion = 1;
+ uuid_generate_random(&r.in.this.cid);
+ r.in.Clsid = *clsid;
+ r.in.ClientImpLevel = RPC_C_IMP_LEVEL_IDENTIFY;
+ r.in.num_protseqs = ARRAY_SIZE(protseq);
+ r.in.protseq = protseq;
+ r.in.Interfaces = num_ifaces;
+ r.in.pIIDs = iid;
+
+ status = dcerpc_RemoteActivation(p, mem_ctx, &r);
+ if(NT_STATUS_IS_ERR(status)) {
+ DEBUG(1, ("Error while running RemoteActivation %s\n", nt_errstr(status)));
+ return ntstatus_to_werror(status);
+ }
+
+ if(!W_ERROR_IS_OK(r.out.result)) { return r.out.result; }
+ if(!W_ERROR_IS_OK(r.out.hr)) { return r.out.hr; }
+ if(!W_ERROR_IS_OK(r.out.results[0])) { return r.out.results[0]; }
+
+ /* FIXME: Fill ip */
+ return WERR_OK;