Re: function in DLL
- From: "Alex Blekhman" <xfkt@xxxxxxxxx>
- Date: Sat, 30 Sep 2006 23:26:57 +0300
"--== Alain ==--" wrote:
Yes i understand but it means to link statically my
resource string table to my exe. i would like to avoid it.
So my question is how can i get the Handle of the DLL ?
No, you still can have resource string table in DLL. Just
load the DLL and store its handle somewhere.
HINSTANCE hResInst = ::AfxLoadLibrary(dllName);
CString strMessage;
strMessage.LoadString(hResInst, IDS_MESSAGE);
// ...
::AfxFreeLibrary(hResInst);
HTH
Alex
.
Relevant Pages
- Re: DLL With Static Library Initialization Conflict
... I had hoped to avoid it. ... >>I have an application that requires a DLL and an executable that uses the ... A similar situation exists with the CRT. ... > which memory allocated by the DLL can't be freed in the EXE, ... (microsoft.public.dotnet.languages.vc) - Re: function in DLL
... extern "C" __declspecLPTSTR GetString(HMODULE hwnd_DLL, int Index) ... So my question is how can i get the Handle of the DLL? ... you still can have resource string table in DLL. ... (microsoft.public.vc.language) - Re: Editors
... some strip them on exe files by default. ... "preferred base address" and, yup, relocations are completely ... DLL files, though, aren't loaded into their own address space but are ... EXE's "entry-point", though, is not "special" in that it's just an ... (alt.lang.asm) - Re: DLL pass vector by value crash
... The prototype for testfunc is a by-value copy, so it has to make a copy of the value. ... Are you using static linking for either the .exe (if so, it probably won't work correctly, ... clearly using the shared CRT DLL for the DLL you are constructing. ... no crash occurs in either config. ... (microsoft.public.vc.mfc) - Re: DLL pass vector by value crash
... stack of the exe and may allocate default member element on the exe heap. ... If this is a dangerous situation, the simple app I set up calling testFunc() ... in a dll did not crash. ... msvcr90.dll!free and access the source code of free.c. ... (microsoft.public.vc.mfc) |
|