lib/dcom: use HRESULT in dcom_create_object.
authorGünther Deschner <gd@samba.org>
Tue, 21 Jul 2015 22:17:51 +0000 (00:17 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 30 Jul 2015 23:55:28 +0000 (01:55 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/lib/com/dcom/dcom.h
source4/lib/com/dcom/main.c
source4/lib/wmi/tools/wmis.c
source4/lib/wmi/wmicore.c

index 56d6eac93ccce585094e60edbaa2d5506277dca4..cb549b1e0d5f53fb72e99ada4eed50ae26fe79c4 100644 (file)
@@ -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);
index ea1e4f8b8f1f3cea506492a9e74d4f440eabdd65..a652678e5c3fe337f6a055a36d51c83ce2b397ce 100644 (file)
@@ -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;
        }
 
index 314fdd1cd7b9f2ba4f20002984ed8dca96699d3f..c4c8ed92999edb7d44eb05f1bb942da7df55dc0d 100644 (file)
@@ -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;
 
index 762494653618d7eae944426669399022afea472a..dc9fee40b212d9c4c34d7cbfa260629b767ca272 100644 (file)
@@ -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;