Source code of Windows XP (NT5)
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.

64 lines
1.3 KiB

  1. #include "precomp.h"
  2. #include <shlwapi.h> // for DllInstall prototype
  3. #include "advpub.h"
  4. #define GUID_STR_LEN 40
  5. // global variables
  6. HINSTANCE hInstance;
  7. STDAPI DllUnregisterServer(void)
  8. {
  9. // This DLL does not need to unregister anything now.
  10. // So, we simply return success here.
  11. return NOERROR;
  12. }
  13. STDAPI DllRegisterServer(void)
  14. {
  15. // This DLL does not need to register anything now.
  16. // So, we simply return success here.
  17. return NOERROR;
  18. }
  19. EXTERN_C BOOL DllInitialize(IN PVOID hmod, IN ULONG ulReason, IN PCONTEXT pctx OPTIONAL)
  20. {
  21. UNREFERENCED_PARAMETER(pctx);
  22. if (ulReason == DLL_PROCESS_ATTACH)
  23. {
  24. hInstance = (HINSTANCE) hmod;
  25. DisableThreadLibraryCalls(hInstance);
  26. SHFusionInitializeFromModuleID(hInstance, 124);
  27. #ifdef DEBUG
  28. CcshellGetDebugFlags();
  29. #endif
  30. }
  31. else if (ulReason == DLL_PROCESS_DETACH)
  32. {
  33. #ifdef DEBUG
  34. DeskCheckForLeaks();
  35. #endif
  36. SHFusionUninitialize();
  37. }
  38. return TRUE;
  39. }
  40. BOOL APIENTRY DllMain(IN HANDLE hDll, IN DWORD dwReason, IN LPVOID lpReserved)
  41. {
  42. ASSERT(0);
  43. return TRUE;
  44. }
  45. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
  46. {
  47. // No Com object is registered by this DLL. So, let's fail!
  48. *ppv = NULL;
  49. return CLASS_E_CLASSNOTAVAILABLE;;
  50. }
  51. STDAPI DllCanUnloadNow(void)
  52. {
  53. return S_OK;
  54. }