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.

48 lines
747 B

  1. #include "windows.h"
  2. #include "sxsexpress.h"
  3. #include "stdlib.h"
  4. #include "stdio.h"
  5. HINSTANCE g_hOurInstance = NULL;
  6. BOOL WINAPI
  7. DllMain(
  8. HINSTANCE hDllHandle,
  9. DWORD dwReason,
  10. PVOID pvReserved
  11. )
  12. {
  13. if (dwReason == DLL_PROCESS_ATTACH)
  14. {
  15. g_hOurInstance = hDllHandle;
  16. }
  17. return TRUE;
  18. }
  19. HRESULT
  20. DllInstall(
  21. BOOL bInstall,
  22. PCWSTR pcwszCommandLine
  23. )
  24. {
  25. if (bInstall)
  26. {
  27. return SxsExpressCore(g_hOurInstance) ? S_OK : HRESULT_FROM_WIN32(GetLastError());
  28. }
  29. else
  30. {
  31. return E_NOTIMPL;
  32. }
  33. }
  34. HRESULT
  35. PerformInstallation(
  36. BOOL bInstall,
  37. PCSTR pcszCommandLine
  38. )
  39. {
  40. return DllInstall(bInstall, NULL);
  41. }