You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Williamson, Siehnai" <sw...@docucorp.com> on 2001/10/22 19:42:01 UTC

Win32MsgLoader does not load error message when alternate executa ble is used

Hi Everyone,

The Win32MsgLoader class fails to load the error message when the
application is using an alternate executable (than the Xerces dll provided)
that was built by the user and that is a static library.  

The line: fModHandle = ::GetModuleHandleA(Xerces_DLLName) in the
Win32MsgLoader constructor always fails.  The code below also fails:

    if (!fModHandle)
    {
        //
        //  If we didn't find it, its probably because its a development
        //  build which is built as separate DLLs, so lets look for the DLL
        //  that we are part of.
        //
        static const char* const privDLLName = "IXUTIL";
        fModHandle = ::GetModuleHandleA(privDLLName);

        // If neither exists, then we give up
        if (!fModHandle)
        {
            // Probably have to call panic here
        }
    }

What handle am I supposed to pass to get the appropriate resource when my
execuable is a static lib?