0

i added libmysql.dll as resource to my project

 ID_LIBMYSQL RT_RCDATA "LIBMYSQL.DLL"

Image view :: http://s18.postimage.org/bcpf2s9jt/Untitled.png

now when i try to find it using findresource function , i get error code : 1812 mean resource not found

HMODULE hMod = GetModuleHandle(_T("libmysql.dll"));
HRSRC hRes = FindResource (NULL, "ID_LIBMYSQL", RT_RCDATA); // RT_RCDATA application raw data
// get last error code
cout<<"\n error code: "<<GetLastError();
2
Contributors
3
Replies
26
Views
4 Years
Discussion Span
Last Post by nova37
0

I gather your using TCHARs and most likely compiling as _UNICODE, so try:

HRSRC hRes = FindResource (NULL, TEXT("ID_LIBMYSQL"), TEXT("RT_RCDATA") );
0

now getting error code 2 // file not found ..... but as you can see the image view in my above post , libmysql.dll as attacked to exe

1

thanks done i have to pass current exe path find resource function as first parameter

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.