I need HMODULE to call GetModuleInformation but I only know COM GUID of class that reside in dll. Is there winapi function to determine HMODULE (or dll name) knowing only GUID?
EDIT: Application running as normal user (not elevated)
If the GUID is a CLSID for a COM object, you can lookup the object's implementing EXE/DLL filename in the Windows Registry (in the HKEY_CLASSES_ROOT\\CLSID\\{guid}
subkey), or if your app is using Registration-Free COM, in the app's SxS manifest instead.
If the object is in a DLL, you can then use GetModuleHandle/Ex()
if that DLL has already been loaded in your process's memory, or LoadLibrary()
to load it into memory.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.