Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Makefile--
- all: test1.exe test2.exe
- test1
- test2
- test1.exe: test.cpp version.lib
- $(CC) $** /Fe$@
- test2.exe: test.cpp version.lib
- $(CC) $** /Fe$@ /link /DEPENDENTLOADFLAG:0x800
- version.lib: version.cpp version.def
- $(CC) /LD $**
- --test.cpp--
- #include <windows.h>
- #include <cstdio>
- #pragma comment(lib, "version.lib")
- int main()
- {
- printf("%lx\n", GetFileVersionInfoSizeW(LR"(C:\Windows\System32\kernel32.dll)", 0));
- }
- --version.cpp--
- extern "C" int __stdcall GetFileVersionInfoSizeW(const wchar_t*, int)
- {
- return -1;
- }
- --version.def--
- EXPORTS
- GetFileVersionInfoSizeW
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement