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.

100 lines
2.2 KiB

  1. /*****************************************************************/
  2. /** Microsoft Windows for Workgroups **/
  3. /** Copyright (C) Microsoft Corp., 1991-1992 **/
  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. typedef UINT RETERR;
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif // __cplusplus
  25. BOOL _stdcall DllEntryPoint(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpReserved);
  26. #ifdef __cplusplus
  27. }
  28. #endif // __cplusplus
  29. /*******************************************************************
  30. NAME: DllEntryPoint
  31. SYNOPSIS: Entry point for DLL.
  32. NOTES: Initializes thunk layer to WIZ16.DLL
  33. ********************************************************************/
  34. BOOL _stdcall DllEntryPoint(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpReserved)
  35. {
  36. if( fdwReason == DLL_PROCESS_ATTACH )
  37. {
  38. ghInstance = hInstDll;
  39. //
  40. // 7/22/97 jmazner Olympus #9903
  41. //
  42. TCHAR szPath[MAX_PATH + 1];
  43. BOOL fPathAlreadySet = FALSE;
  44. GetICW11Path( szPath, &fPathAlreadySet );
  45. if( !fPathAlreadySet && szPath[0] )
  46. {
  47. SetICWRegKeysToPath( szPath );
  48. }
  49. if( IsParentICW10() )
  50. {
  51. DEBUGMSG("DllEntryPoint, INETCFG called from old component, bailing out!");
  52. return FALSE;
  53. }
  54. // load the config dll proc addresses
  55. BOOL fRet = InitConfig(NULL);
  56. if (FALSE == fRet)
  57. {
  58. // Error message was already displayed in InitConfig.
  59. return FALSE;
  60. }
  61. }
  62. if( fdwReason == DLL_PROCESS_DETACH )
  63. {
  64. DeInitConfig();
  65. }
  66. return TRUE;
  67. }
  68. #ifdef __cplusplus
  69. extern "C"
  70. {
  71. #endif // __cplusplus
  72. void __cdecl main() {};
  73. #ifdef __cplusplus
  74. }
  75. #endif // __cplusplus