Advertisement
Guest User

Untitled

a guest
Jan 15th, 2020
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. --Makefile--
  2. all: test1.exe test2.exe
  3. test1
  4. test2
  5. test1.exe: test.cpp version.lib
  6. $(CC) $** /Fe$@
  7. test2.exe: test.cpp version.lib
  8. $(CC) $** /Fe$@ /link /DEPENDENTLOADFLAG:0x800
  9. version.lib: version.cpp version.def
  10. $(CC) /LD $**
  11.  
  12. --test.cpp--
  13. #include <windows.h>
  14. #include <cstdio>
  15. #pragma comment(lib, "version.lib")
  16.  
  17. int main()
  18. {
  19. printf("%lx\n", GetFileVersionInfoSizeW(LR"(C:\Windows\System32\kernel32.dll)", 0));
  20. }
  21.  
  22. --version.cpp--
  23. extern "C" int __stdcall GetFileVersionInfoSizeW(const wchar_t*, int)
  24. {
  25. return -1;
  26. }
  27.  
  28. --version.def--
  29. EXPORTS
  30. GetFileVersionInfoSizeW
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement