LoadLibrary of a file with other the 'dll' extension
Is it possible to load a dll file开发者_运维百科 that doesn't have a 'dll' extension?
Thanks
Yes, just provide full file name, including extension (or without extension, if file name doesn't contain it).
yes, it is possible, but the file should still conform to the "dll" format (it should conform to the PE format).
Yes, but you need to append a dot (.
) to the end of the path so that Windows doesn't automatically append the .dll
extension:
If the string specifies a module name without a path and the file name extension is omitted, the function appends the default library extension .dll to the module name. To prevent the function from appending .dll to the module name, include a trailing point character (.) in the module name string.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175.aspx
精彩评论