werror: replace WERR_CLASS_NOT_REGISTERED with HRES_REGDB_E_CLASSNOTREG
authorGünther Deschner <gd@samba.org>
Wed, 9 Dec 2015 14:12:49 +0000 (15:12 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 27 Sep 2016 22:04:35 +0000 (00:04 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/util/doserr.c
libcli/util/werror.h
source4/lib/com/main.c

index 64efbb63f362969f48e7a5c3796c89b876cf077f..05e6fe90e85ef99802fa346bebce4086a81c0f36 100644 (file)
@@ -129,7 +129,6 @@ static const struct werror_code_struct dos_errs[] =
        { "WERR_SEC_E_DECRYPT_FAILURE", WERR_SEC_E_DECRYPT_FAILURE },
        { "WERR_SEC_E_ALGORITHM_MISMATCH", WERR_SEC_E_ALGORITHM_MISMATCH },
        { "WERR_RPC_E_REMOTE_DISABLED", WERR_RPC_E_REMOTE_DISABLED },
-       { "WERR_CLASS_NOT_REGISTERED", WERR_CLASS_NOT_REGISTERED },
        /*****************************************************************************
         Auto-generated Win32 error from:
         http://msdn.microsoft.com/en-us/library/cc231199%28PROT.10%29.aspx
index 1fc2afbd15f28df097b566fc94426dbb17cec901..0b70dafa0b8d8ac0b33cbc35789fc70e753c7305 100644 (file)
@@ -111,9 +111,6 @@ typedef uint32_t WERROR;
 #define WERR_SEC_E_DECRYPT_FAILURE     W_ERROR(0x80090330)
 #define WERR_SEC_E_ALGORITHM_MISMATCH  W_ERROR(0x80090331)
 
-/* COM REGDB error codes */
-#define WERR_CLASS_NOT_REGISTERED      W_ERROR(0x80040154)     /* REGDB_E_CLASSNOTREG */
-
 /* Generic error code aliases */
 #define WERR_FOOBAR WERR_GEN_FAILURE
 
index e7f4458f08d8f65c212ee2f7beab9f32adf46703..68a3bc6d3d3610ed6c98bdbe6593678634631022 100644 (file)
@@ -83,7 +83,7 @@ WERROR com_get_class_object(struct com_context *ctx, struct GUID *clsid, struct
        
        iu = com_class_by_clsid(ctx, clsid);
        if (!iu) {
-               return WERR_CLASS_NOT_REGISTERED;
+               return W_ERROR(HRES_ERROR_V(HRES_REGDB_E_CLASSNOTREG));
        }
        
        return IUnknown_QueryInterface(iu, ctx, iid, ip);