Problem with LoadLibrary_ from an include file ?!
Problem with LoadLibrary_ from an include file ?!
Hey,
I'm creating a plugin system where as plugin files (DLL's) are loaded using LoadLibrary_().
Now heres the problem;
When I use the LoadLibrary in the main source code file, it works ok, everything runs fine, meaning 4 hours of coding pays off. But when its called in an included file for purpose that the plugin manager source (that contains the call) is huge, and It would be very messy having it all pasted at the top of the main file, the call fails.. It retuns 0, and Error 998 is returned from GetLastError_().
I've tried both IncludeFile & XIncludeFile.
Error 998 : Invalid access to memory location. (ERROR_NOACCESS).
Anyone have the faintest of ideas?
Thanks
P.S. Using Windows Vista 32bit.. I'm going to run it on my XP VMachine now and see if I get the same problems.
I'm creating a plugin system where as plugin files (DLL's) are loaded using LoadLibrary_().
Now heres the problem;
When I use the LoadLibrary in the main source code file, it works ok, everything runs fine, meaning 4 hours of coding pays off. But when its called in an included file for purpose that the plugin manager source (that contains the call) is huge, and It would be very messy having it all pasted at the top of the main file, the call fails.. It retuns 0, and Error 998 is returned from GetLastError_().
I've tried both IncludeFile & XIncludeFile.
Error 998 : Invalid access to memory location. (ERROR_NOACCESS).
Anyone have the faintest of ideas?
Thanks
P.S. Using Windows Vista 32bit.. I'm going to run it on my XP VMachine now and see if I get the same problems.
When testing the function in an include file, it does work;
however, as stated in the previous post, this problem is Vista specific. It runs fine on XP.
I don't understand how this problem exists anyway, assuming IncludeFile or XIncludeFile just directs the compiler to take the contents of the included file and put them in place of the command.
however, as stated in the previous post, this problem is Vista specific. It runs fine on XP.
I don't understand how this problem exists anyway, assuming IncludeFile or XIncludeFile just directs the compiler to take the contents of the included file and put them in place of the command.
Well, I have written a very large dll which utilises a resource file with a very large string table. I use this dll in various programs without a problem. Admittedly my programs link to the dll via an import library etc. rather than using OpenLibrary() etc.
It is a strange problem you describe. Is it the actual OpenLibrary() / LoadLibrary_() command which is reporting the error?
It is a strange problem you describe. Is it the actual OpenLibrary() / LoadLibrary_() command which is reporting the error?
I may look like a mule, but I'm not a complete ass.
srod wrote:Well, I have written a very large dll which utilises a resource file with a very large string table. I use this dll in various programs without a problem. Admittedly my programs link to the dll via an import library etc. rather than using OpenLibrary() etc.
It is a strange problem you describe. Is it the actual OpenLibrary() / LoadLibrary_() command which is reporting the error?
It was purely using LoadLibrary_() with LoadString_() aftewards.. Why it didnt want to to work with my project is not known, but i've resolved the error now by working out a way to send information to the main application via the plugin dll without using the Stringtable...


