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.

63 lines
1.6 KiB

  1. /****************************************************************************
  2. *
  3. * Copyright (C) 2001 Microsoft Corporation. All Rights Reserved.
  4. *
  5. ****************************************************************************/
  6. #include <windows.h>
  7. #include <cpl.h>
  8. #include "resource.h"
  9. void Core(HANDLE hModule,HWND hWnd);
  10. HINSTANCE ghInstance;
  11. BOOL WINAPI DllMain(HANDLE hModule,ULONG uReason,LPVOID pv)
  12. {
  13. switch(uReason)
  14. {
  15. case DLL_PROCESS_ATTACH:
  16. ghInstance=(HINSTANCE)hModule;
  17. break;
  18. case DLL_PROCESS_DETACH:
  19. break;
  20. case DLL_THREAD_ATTACH:
  21. DisableThreadLibraryCalls((HMODULE)hModule);
  22. break;
  23. case DLL_THREAD_DETACH:
  24. break;
  25. }
  26. return(TRUE);
  27. }
  28. LONG WINAPI CPlApplet(HWND hWnd,UINT uMsg,LPARAM lParam1,LPARAM lParam2)
  29. {
  30. switch(uMsg)
  31. {
  32. case CPL_INIT:
  33. return 1;
  34. case CPL_GETCOUNT:
  35. return 1;
  36. case CPL_INQUIRE:
  37. ((LPCPLINFO)lParam2)->idIcon=IDI_CPANEL;
  38. ((LPCPLINFO)lParam2)->idName=IDS_GEN_CPANEL_TITLE;
  39. ((LPCPLINFO)lParam2)->idInfo=IDS_GEN_CPANEL_INFO;
  40. ((LPCPLINFO)lParam2)->lData=0;
  41. //return 0;MSDN doc says this should be returned.
  42. return 1;
  43. case CPL_DBLCLK:
  44. Core(ghInstance,hWnd);
  45. return 0;
  46. }
  47. return 0;
  48. }
  49. // DO NOT REMOVE THIS!!!
  50. // This is here because the games group loads the CPL from the exported function
  51. // If you remove this Hellbender, Monster Truck Maddness, CART, etc will fail to
  52. // load the Joystick CPL!!!
  53. // DO NOT REMOVE THIS!!!
  54. void WINAPI ShowJoyCPL(HWND hWnd)
  55. {
  56. Core(ghInstance,hWnd);
  57. }