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.

78 lines
1.8 KiB

  1. /*****************************************************************/
  2. /** Microsoft Windows for Workgroups **/
  3. /** Copyright (c) 1991-1998 Microsoft Corporation
  4. /*****************************************************************/
  5. //
  6. // WIZDLL.C - 32-bit stubs for functions that call into 16-bit DLL
  7. //
  8. // HISTORY:
  9. //
  10. // 11/20/94 jeremys Created.
  11. // 96/03/13 markdu Added IcfgSetInstallSourcePath().
  12. // 96/03/26 markdu Put #ifdef __cplusplus around extern "C"
  13. // 96/05/28 markdu InitConfig and DeInitConfig in DllEntryPoint.
  14. //
  15. #include "wizard.h"
  16. // instance handle must be in per-instance data segment
  17. #pragma data_seg(DATASEG_PERINSTANCE)
  18. HINSTANCE ghInstance=NULL;
  19. #pragma data_seg(DATASEG_DEFAULT)
  20. #ifdef __cplusplus
  21. extern "C"
  22. {
  23. #endif // __cplusplus
  24. BOOL _stdcall DllEntryPoint(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpReserved);
  25. #ifdef __cplusplus
  26. }
  27. #endif // __cplusplus
  28. /*******************************************************************
  29. NAME: DllEntryPoint
  30. SYNOPSIS: Entry point for DLL.
  31. NOTES: Initializes thunk layer to WIZ16.DLL
  32. ********************************************************************/
  33. BOOL _stdcall DllEntryPoint(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpReserved)
  34. {
  35. if( fdwReason == DLL_PROCESS_ATTACH )
  36. {
  37. ghInstance = hInstDll;
  38. // load the config dll proc addresses
  39. BOOL fRet = InitConfig(NULL);
  40. if (FALSE == fRet)
  41. {
  42. // Error message was already displayed in InitConfig.
  43. return FALSE;
  44. }
  45. }
  46. if( fdwReason == DLL_PROCESS_DETACH )
  47. {
  48. DeInitConfig();
  49. }
  50. return TRUE;
  51. }
  52. #ifdef __cplusplus
  53. extern "C"
  54. {
  55. #endif // __cplusplus
  56. void __cdecl main() {};
  57. #ifdef __cplusplus
  58. }
  59. #endif // __cplusplus