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 21:22:24 UTC
RE: Win32MsgLoader does not load error message when alternate exe
cutable is used
My application uses statically linked libs so I'm using libs for the sake of
consistency.
> -----Original Message-----
> From: Jerry Carter [SMTP:jerry.carter@speechworks.com]
> Sent: Monday, October 22, 2001 1:28 PM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: Win32MsgLoader does not load error message when
> alternate executable is used
>
> The problem is that the call to the Win32 function GetModuleHandle
> requires the executable name. For a seperate DLL, the issue has been
> solved (see issue #3666).
>
> Is there a reason that you need to statically link to Xerces?
>
> At 12:42 PM 22-10-01 -0500, you wrote:
> >>>>
>
>
> 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?
>
>
> <<<<
>
>
> ____________________________________________________________________
> Jerry Carter jerry.carter@speechworks.com
> Software Architect
> SpeechWorks International, Inc. Voice (617) 428-4444
> 695 Atlantic Avenue Fax (617) 428-1122
> Boston MA 02111 http://www.speechworks.com
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org For
> additional commands, e-mail: xerces-c-dev-help@xml.apache.org