*/
#include "includes.h"
-#include "dlinklist.h"
+#include "../lib/util/dlinklist.h"
#include "lib/com/com.h"
+#include "lib/events/events.h"
#include "librpc/gen_ndr/com_dcom.h"
-WERROR com_init(struct com_context **ctx)
+WERROR com_init_ctx(struct com_context **ctx, struct tevent_context *event_ctx)
{
*ctx = talloc(NULL, struct com_context);
+ if (event_ctx == NULL) {
+ event_ctx = event_context_init(*ctx);
+ }
+ (*ctx)->event_ctx = event_ctx;
return WERR_OK;
}
int i;
struct GUID classfact_iid;
- GUID_from_string(DCERPC_ICLASSFACTORY_UUID, &classfact_iid);
+ GUID_from_string(NDR_ICLASSFACTORY_UUID, &classfact_iid);
/* Obtain class object */
error = com_get_class_object(ctx, clsid, &classfact_iid, (struct IUnknown **)&factory);
}
/* Run IClassFactory::CreateInstance() */
- error = IClassFactory_CreateInstance(factory, ctx, NULL, &classfact_iid, &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;