Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在 C++ 中读取 EXE 文件或 DLL 的清单而不加载它? 我读到有一些 API 函数,例如FindResourceEx,但它们需要HMODULE由LoadLibrary. (我确实有要从中获取清单的 exe 或 DLL 的文件句柄)。
FindResourceEx
HMODULE
LoadLibrary
您也可以HMODULE从LoadLibraryEx(file, 0, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE).
LoadLibraryEx(file, 0, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE)