Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 2000, Microsoft Corporation
  3. Module Name:
  4. appcompat.c
  5. Abstract:
  6. App compat functions that is not published in the DDK but that we need to build the printer drivers off it.
  7. Normally they reside in winuserp.h/user32p.lib.
  8. --*/
  9. #ifdef BUILD_FROM_DDK
  10. #include "lib.h"
  11. #include "appcompat.h"
  12. typedef DWORD (* LPFN_GET_APP_COMPAT_FLAGS_2)(WORD);
  13. DWORD GetAppCompatFlags2(WORD wVersion)
  14. {
  15. HINSTANCE hUser;
  16. LPFN_GET_APP_COMPAT_FLAGS_2 pfnGetAppCompatFlags2;
  17. DWORD dwRet;
  18. if (!(hUser = LoadLibrary(TEXT("user32.dll"))) ||
  19. !(pfnGetAppCompatFlags2 = (LPFN_GET_APP_COMPAT_FLAGS_2)
  20. GetProcAddress(hUser, "GetAppCompatFlags2")))
  21. {
  22. if (hUser)
  23. {
  24. ERR(("Couldn't find GetAppCompatFlags2 in user32.dll: %d\n", GetLastError()));
  25. FreeLibrary(hUser);
  26. }
  27. else
  28. ERR(("Couldn't load user32.dll: %d\n", GetLastError()));
  29. return 0;
  30. }
  31. dwRet = pfnGetAppCompatFlags2(wVersion);
  32. FreeLibrary(hUser);
  33. return dwRet;
  34. }
  35. #endif