View Single Post
Old 26th February 2007, 15:27   #3
5ven
Junior Member
 
Join Date: Feb 2007
Posts: 4
Thanks for the tip! I Googled around a bit and found this article: http://www.relisoft.com/win32/windlg.html

Then modified the config() (and added ErrorString()) and now the code looks like this:

char* ErrorString(DWORD err,char* error){
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, error, 255, NULL);
return error;
}

void config() {
HWND hDialog = NULL;
hDialog = CreateDialog
(
plugin.hDllInstance,
MAKEINTRESOURCE (IDD_CONFIG),
plugin.hwndParent,
ConfigProc
);
if(!hDialog){
char error[255];
MessageBox(NULL, ErrorString(GetLastError(),error), "Error!", MB_OK | MB_ICONEXCLAMATION);
LocalFree(error);
}
}

Then I got the error message - it was "The specified image file did not contain a resource section". The error message at the MSDN refrence: ERROR_RESOURCE_DATA_NOT_FOUND 1812

Last edited by 5ven; 26th February 2007 at 16:20.
5ven is offline   Reply With Quote