Working in some managed code that is trying to load one of my DLLs. This seems to work fine in release builds outside the context of my version amangement system. But inside it fails witha code of 5, whcih seems to be 'Access denied' which is silly since its there and full rights. So my code is ismply:
-
loaded_instance = LoadLibrary ("z:\sys\mydblib.dll);
-
if (!loaded_instance)
-
{
-
return_code = GetLastError ();
-
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, 0, return_code, 0, windows_error_string, 255, NULL);
-
}
-
Any ideas why this may fail? I even launched depends from the same command prompt and opened my DLL and everything looks fine in there. No broken links, no problems with the libs. I also tried giving write privleges to the DLLs linked to this one and still no joy. I did this since I used to have some old DLLs that would not work unless the linked in ones had RW access, which seems odd since code should never write to the DLL, right? Any ideas?