Click here to Skip to main content
15,894,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LoadLibrary in a DLL Pin
Randor 16-Apr-08 17:49
professional Randor 16-Apr-08 17:49 
GeneralRe: LoadLibrary in a DLL Pin
ForNow17-Apr-08 16:12
ForNow17-Apr-08 16:12 
QuestionRe: LoadLibrary in a DLL Pin
David Crow17-Apr-08 4:10
David Crow17-Apr-08 4:10 
QuestionRe: LoadLibrary in a DLL Pin
David Crow17-Apr-08 4:10
David Crow17-Apr-08 4:10 
GeneralRe: LoadLibrary in a DLL Pin
ForNow17-Apr-08 6:47
ForNow17-Apr-08 6:47 
GeneralRe: LoadLibrary in a DLL The value returned from LoadLibrary was NULL Pin
ForNow17-Apr-08 6:56
ForNow17-Apr-08 6:56 
QuestionRe: LoadLibrary in a DLL The value returned from LoadLibrary was NULL Pin
David Crow17-Apr-08 7:29
David Crow17-Apr-08 7:29 
GeneralRe: LoadLibrary in a DLL The value returned from LoadLibrary was NULL Pin
ForNow17-Apr-08 14:47
ForNow17-Apr-08 14:47 
I got a x7e ERROR_MOD_NOT_FOUND

But thats not it

When I do the load in the main its okay When I call the exported function init_image it fails

int main(int ac,char *av[])
{
int rc = 0;
HINSTANCE hImagehlpDll;

hImagehlpDll = LoadLibrary((LPCWSTR) "imagehlp.dll" ); <--- Okay
init_image();


code in DLL source


__decspec(dllexport) void init_image(void)
{
DWORD myerror;
DWORD DWfLAGS = FORMAT_MESSAGE_FROM_SYSTEM || FORMAT_MESSAGE_ALLOCATE_BUFFER;
DWORD size = 100;
char mybuffer[100];
LPTSTR error_ptr;

imageType = IMAGE_FILE_MACHINE_I386;
pSW = NULL;
hImagehlpDll = NULL;
hImagehlpDll = LoadLibrary((LPCWSTR) "imagehlp.dll" ); <--- fails here
myerror = GetLastError();
// FormatMessage(dwFlags,NULL,myerror,NULL,error_ptr,size,NULL);
pSW = (tSW) GetProcAddress( hImagehlpDll, "StackWalk" );
return;
}
GeneralhImagehlpDll = LoadLibrary((LPCWSTR)L"imagehlp.dll" ); this WORKED Pin
ForNow17-Apr-08 16:16
ForNow17-Apr-08 16:16 
GeneralRe: hImagehlpDll = LoadLibrary((LPCWSTR)L"imagehlp.dll" ); this WORKED Pin
David Crow18-Apr-08 3:34
David Crow18-Apr-08 3:34 
GeneralRe: hImagehlpDll = LoadLibrary((LPCWSTR)L"imagehlp.dll" ); this WORKED Pin
ForNow18-Apr-08 6:21
ForNow18-Apr-08 6:21 
QuestionRe: hImagehlpDll = LoadLibrary((LPCWSTR)L"imagehlp.dll" ); this WORKED Pin
David Crow18-Apr-08 7:02
David Crow18-Apr-08 7:02 
GeneralRe: hImagehlpDll = LoadLibrary((LPCWSTR)L"imagehlp.dll" ); this WORKED Pin
ForNow18-Apr-08 11:42
ForNow18-Apr-08 11:42 
Generalinline Pin
User 58385216-Apr-08 13:12
User 58385216-Apr-08 13:12 
GeneralRe: inline Pin
Stephen Hewitt16-Apr-08 15:10
Stephen Hewitt16-Apr-08 15:10 
GeneralRe: inline Pin
User 58385216-Apr-08 15:17
User 58385216-Apr-08 15:17 
GeneralRe: inline Pin
Randor 16-Apr-08 16:13
professional Randor 16-Apr-08 16:13 
GeneralRe: inline Pin
Randor 16-Apr-08 16:10
professional Randor 16-Apr-08 16:10 
GeneralRe: inline Pin
Stephen Hewitt16-Apr-08 16:23
Stephen Hewitt16-Apr-08 16:23 
GeneralRe: inline Pin
cp987616-Apr-08 16:55
cp987616-Apr-08 16:55 
GeneralIE site refresh message Pin
maarchewa16-Apr-08 10:33
maarchewa16-Apr-08 10:33 
GeneralProgramatically determine if windows updates are being installed Pin
nwunder16-Apr-08 9:43
nwunder16-Apr-08 9:43 
QuestionRe: Programatically determine if windows updates are being installed Pin
David Crow16-Apr-08 10:09
David Crow16-Apr-08 10:09 
GeneralRe: Programatically determine if windows updates are being installed Pin
nwunder16-Apr-08 10:40
nwunder16-Apr-08 10:40 
QuestionAssertion failure Pin
sunguy16-Apr-08 6:55
sunguy16-Apr-08 6:55 

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.