summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2015-07-22 00:17:51 +0200
committerJeremy Allison <jra@samba.org>2015-07-31 01:55:28 +0200
commit7e60050194eedda925ece63fd20f0a8f64dd355e (patch)
tree5d7e919bb2e0e00728d06d75d0a7ea56b88de0c5
parent4e5ee7146be8e4f1897e50d43157eb7e3ff6257e (diff)
downloadsamba-7e60050194eedda925ece63fd20f0a8f64dd355e.tar.gz
lib/dcom: use HRESULT in dcom_create_object.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source4/lib/com/dcom/dcom.h2
-rw-r--r--source4/lib/com/dcom/main.c8
-rw-r--r--source4/lib/wmi/tools/wmis.c3
-rw-r--r--source4/lib/wmi/wmicore.c3
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;