Click here to Skip to main content
15,911,785 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dynamic allocation of multidimensional arrays Pin
Sprudling20-Sep-01 16:36
Sprudling20-Sep-01 16:36 
AnswerRe: Dynamic allocation of multidimensional arrays Pin
MehranNZ13-May-09 23:44
MehranNZ13-May-09 23:44 
GeneralTimeline Control Pin
JTAnderson20-Sep-01 12:40
JTAnderson20-Sep-01 12:40 
GeneralRe: Timeline Control Pin
Diarrhio21-Sep-01 0:49
Diarrhio21-Sep-01 0:49 
GeneralTerminating a Process Pin
20-Sep-01 11:43
suss20-Sep-01 11:43 
GeneralRe: Terminating a Process Pin
Ghazi H. Wadi20-Sep-01 12:55
Ghazi H. Wadi20-Sep-01 12:55 
GeneralRe: Terminating a Process Pin
20-Sep-01 12:58
suss20-Sep-01 12:58 
QuestionHow to enable sharing resources from an extension DLL? Pin
20-Sep-01 11:31
suss20-Sep-01 11:31 
I'm having trouble while trying to share my string resources defined in an extension DLL when it gets used within a MFC client app. It appears to work if the string resources are assigned some specific values!!

Here's the concrete illustration of the problem :-

static AFX_EXTENSION_MODULE GOLDLL = { NULL, NULL };

DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason) {

case DLL_PROCESS_ATTACH:

TRACE(_T("GOL.dll is initializing\n"));

// Extension DLL one-time initialization
if (!AfxInitExtensionModule(GOLDLL, hInstance))
return 0;

// Insert this DLL in the resource chain
//new CDynLinkLibrary(GOLDLL);

break;

//...
}

GOLInit creates a new CDynLinkLibrary object to add it to the library chain & this function gets called within the client app.

extern "C" void WINAPI
GOLInit()
{
static bool firstTime = true;

// Insert this DLL into the resource chain
if (firstTime) {
new CDynLinkLibrary(GOLDLL);
firstTime = false;
}
}

// This is from the resource file in the extension DLL & is the string resource that
// i'm interested in sharing with the client app.
#define IDS_XXX_CTRL 61500

The funny thing is that if i renumber the IDS_XXX_CTRL as 61440, the client app finds the resource but if it is defined as 61500 it doesn't find it. I stepped thru AfxLoadString & noticed that the GOLDLL module is part of the chain & yet the FindResource call fails. Any ideas what else i should check?? i've ran out of ideas & steam! Confused | :confused: Confused | :confused: Confused | :confused:

TIA

Chen Venkataraman
AnswerRe: How to enable sharing resources from an extension DLL? Pin
Tomasz Sowinski20-Sep-01 11:46
Tomasz Sowinski20-Sep-01 11:46 
GeneralRe: How to enable sharing resources from an extension DLL? Pin
20-Sep-01 11:53
suss20-Sep-01 11:53 
Generalsubsplitter of splitter Pin
Peter Molnar20-Sep-01 10:11
Peter Molnar20-Sep-01 10:11 
GeneralRe: subsplitter of splitter Pin
Oscar Vazquez21-Sep-01 11:35
Oscar Vazquez21-Sep-01 11:35 
GeneralWindow paint problem when using CPropertySheet with CComboBox Pin
20-Sep-01 10:07
suss20-Sep-01 10:07 
GeneralStrange CTreeCtrl behavior Pin
Ken Goguen20-Sep-01 9:16
Ken Goguen20-Sep-01 9:16 
GeneralRe: Strange CTreeCtrl behavior Pin
Michael Dunn20-Sep-01 9:28
sitebuilderMichael Dunn20-Sep-01 9:28 
GeneralRe: Strange CTreeCtrl behavior Pin
Ken Goguen20-Sep-01 9:50
Ken Goguen20-Sep-01 9:50 
GeneralRe: Strange CTreeCtrl behavior Pin
Tomasz Sowinski20-Sep-01 9:29
Tomasz Sowinski20-Sep-01 9:29 
GeneralRe: Strange CTreeCtrl behavior Pin
Ken Goguen20-Sep-01 9:53
Ken Goguen20-Sep-01 9:53 
GeneralRe: Strange CTreeCtrl behavior Pin
Tomasz Sowinski20-Sep-01 9:57
Tomasz Sowinski20-Sep-01 9:57 
GeneralRe: Strange CTreeCtrl behavior Pin
Ken Goguen20-Sep-01 10:12
Ken Goguen20-Sep-01 10:12 
GeneralDLL Question Pin
#realJSOP20-Sep-01 9:03
professional#realJSOP20-Sep-01 9:03 
GeneralRe: DLL Question Pin
Tomasz Sowinski20-Sep-01 9:15
Tomasz Sowinski20-Sep-01 9:15 
GeneralOleAutomation Pin
duggie20-Sep-01 8:43
duggie20-Sep-01 8:43 
GeneralRe: OleAutomation Pin
Michael P Butler20-Sep-01 10:34
Michael P Butler20-Sep-01 10:34 
GeneralRe: OleAutomation Pin
duggie20-Sep-01 10:52
duggie20-Sep-01 10:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.