Reputation: 447
How can I explicitly link to a .sys file on windows? MSDN says you can use the LoadLibrary() and the GetProcAddress() functions to basically explicitly link and access members of a dll. I can successfully use this to at least get a handle for an associated dll however when I try them with a .lib or a .sys they do not work or they return null. I can understand that it would not work with .lib maybe (even though it says library in the name) but I had read that .sys files were usually dlls.
if (0 == LoadLibraryA("videoprt.sys"))
{
printf("goodbye");
}
This will compile but the address returned will be zero for the .sys file, if I use a more typical windows dll it does not return zero. How do I link a .sys file so that I can access exported functions?
Upvotes: 0
Views: 1002