From 7e60050194eedda925ece63fd20f0a8f64dd355e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Wed, 22 Jul 2015 00:17:51 +0200 Subject: [PATCH] lib/dcom: use HRESULT in dcom_create_object. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Jeremy Allison --- source4/lib/com/dcom/dcom.h | 2 +- source4/lib/com/dcom/main.c | 8 ++++---- source4/lib/wmi/tools/wmis.c | 3 ++- source4/lib/wmi/wmicore.c | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/source4/lib/com/dcom/dcom.h b/source4/lib/com/dcom/dcom.h index 56d6eac93cc..cb549b1e0d5 100644 --- a/source4/lib/com/dcom/dcom.h +++ b/source4/lib/com/dcom/dcom.h @@ -50,7 +50,7 @@ typedef enum ndr_err_code (*unmarshal_fn)(TALLOC_CTX *mem_ctx, struct OBJREF *o, struct dcom_client_context *dcom_client_init(struct com_context *ctx, struct cli_credentials *credentials); struct dcom_object_exporter *object_exporter_by_oxid(struct com_context *ctx, uint64_t oxid); struct dcom_object_exporter *object_exporter_by_ip(struct com_context *ctx, struct IUnknown *ip); -WERROR dcom_create_object(struct com_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct IUnknown ***ip, WERROR *results); +WERROR dcom_create_object(struct com_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct IUnknown ***ip, HRESULT *results); WERROR dcom_get_class_object(struct com_context *ctx, struct GUID *clsid, const char *server, struct GUID *iid, struct IUnknown **ip); NTSTATUS dcom_get_pipe(struct IUnknown *iface, struct dcerpc_pipe **pp); NTSTATUS dcom_OBJREF_from_IUnknown(struct OBJREF *o, struct IUnknown *p); diff --git a/source4/lib/com/dcom/main.c b/source4/lib/com/dcom/main.c index ea1e4f8b8f1..a652678e5c3 100644 --- a/source4/lib/com/dcom/main.c +++ b/source4/lib/com/dcom/main.c @@ -240,7 +240,7 @@ struct dcom_object_exporter *object_exporter_by_ip(struct com_context *ctx, stru return object_exporter_by_oxid(ctx, ip->obj.u_objref.u_standard.std.oxid); } -WERROR dcom_create_object(struct com_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct IUnknown ***ip, WERROR *results) +WERROR dcom_create_object(struct com_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct IUnknown ***ip, HRESULT *results) { uint16_t protseq[] = DCOM_NEGOTIATED_PROTOCOLS; struct dcerpc_pipe *p; @@ -249,7 +249,7 @@ WERROR dcom_create_object(struct com_context *ctx, struct GUID *clsid, const cha struct RemoteActivation r; struct DUALSTRINGARRAY *pds; int i; - WERROR hr; + HRESULT hr; uint64_t oxid; struct GUID ipidRemUnknown; struct IUnknown *ru_template; @@ -301,8 +301,8 @@ WERROR dcom_create_object(struct com_context *ctx, struct GUID *clsid, const cha hr = r.out.result; goto end; } - - if(!W_ERROR_IS_OK(hr)) { + + if(!HRES_IS_OK(hr)) { goto end; } diff --git a/source4/lib/wmi/tools/wmis.c b/source4/lib/wmi/tools/wmis.c index 314fdd1cd7b..c4c8ed92999 100644 --- a/source4/lib/wmi/tools/wmis.c +++ b/source4/lib/wmi/tools/wmis.c @@ -102,7 +102,8 @@ WERROR WBEM_ConnectServer(struct com_context *ctx, const char *server, const cha { struct GUID clsid; struct GUID iid; - WERROR result, coresult; + WERROR result; + HRESULT coresult; struct IUnknown **mqi; struct IWbemLevel1Login *pL; diff --git a/source4/lib/wmi/wmicore.c b/source4/lib/wmi/wmicore.c index 76249465361..dc9fee40b21 100644 --- a/source4/lib/wmi/wmicore.c +++ b/source4/lib/wmi/wmicore.c @@ -57,7 +57,8 @@ WERROR WBEM_ConnectServer(struct com_context *ctx, const char *server, const uin { struct GUID clsid; struct GUID iid; - WERROR result, coresult; + WERROR result; + HRESULT coresult; struct IUnknown **mqi; struct IWbemLevel1Login *pL;