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.

123 lines
7.3 KiB

  1. //***************************************************************************
  2. //* Copyright (c) Microsoft Corporation 1995-1996. All rights reserved. *
  3. //***************************************************************************
  4. //* *
  5. //* W95INF32.C - Win32 Based Cabinet File Self-extractor and installer. *
  6. //* *
  7. //***************************************************************************
  8. //***************************************************************************
  9. //* INCLUDE FILES *
  10. //***************************************************************************
  11. #include "w95inf32.h"
  12. #pragma hdrstop
  13. //***************************************************************************
  14. //* *
  15. //* NAME: DllEntryPoint *
  16. //* *
  17. //* SYNOPSIS: Main entry point for the DLL. *
  18. //* *
  19. //* REQUIRES: *
  20. //* *
  21. //* RETURNS: BOOL: *
  22. //* *
  23. //***************************************************************************
  24. BOOL _stdcall DllEntryPoint( HINSTANCE hInst, DWORD dwReason,
  25. LPVOID dwReserved )
  26. {
  27. if ( !( w95thk_ThunkConnect32( "W95INF16.DLL", "W95INF32.DLL", hInst, dwReason ) ) )
  28. {
  29. MessageBox( 0, "ThunkConnect32 Failure!!", "W95INF32.DLL", MB_OK );
  30. return( FALSE );
  31. }
  32. return( TRUE );
  33. }
  34. //***************************************************************************
  35. //* *
  36. //* NAME: CtlSetLDDPath *
  37. //* *
  38. //* SYNOPSIS: *
  39. //* *
  40. //* REQUIRES: lpszINFFilename: Filename containing DirIDs to define *
  41. //* *
  42. //* RETURNS: BOOL: Error result, FALSE == ERROR *
  43. //* *
  44. //***************************************************************************
  45. WORD WINAPI CtlSetLddPath32( UINT uiLDID, LPSTR lpszPath )
  46. {
  47. return( CtlSetLddPath16( uiLDID, lpszPath ) );
  48. }
  49. //***************************************************************************
  50. //* *
  51. //* NAME: GenInstall *
  52. //* *
  53. //* SYNOPSIS: This function will map the to main function to do the *
  54. //* installation. This will thunk into 16 bit code to call *
  55. //* GetInstall() in setupx.dll if running on Win95. If running *
  56. //* on WinNT SUR, it will call a function to do all the *
  57. //* setupapi.dll function calls needed to install IE. *
  58. //* *
  59. //* REQUIRES: lpszInfFileName: String containing filename of INF file. *
  60. //* lpszSection: String containing section of the INF to install*
  61. //* lpszDirectory: Directory of CABs (Temp Dir). *
  62. //* *
  63. //* RETURNS: BOOL: Error result, FALSE == ERROR *
  64. //* *
  65. //***************************************************************************
  66. WORD WINAPI GenInstall32( LPSTR lpszInfFilename, LPSTR lpszInstallSection, LPSTR lpszSourceDir, DWORD dwQuietMode, DWORD hWnd )
  67. {
  68. // BUGBUG: HWND is 32-bit, which is not good when partying in 16-bit land.
  69. _asm { int 3 }
  70. return( GenInstall16( lpszInfFilename, lpszInstallSection, lpszSourceDir, dwQuietMode, NULL ) );
  71. // return( GenInstall16( lpszInfFilename, lpszInstallSection, lpszSourceDir, dwQuietMode ) );
  72. }
  73. //***************************************************************************
  74. //* *
  75. //* NAME: GetSetupXErrorText *
  76. //* *
  77. //* SYNOPSIS: This function will map the to main function to do the *
  78. //* installation. This will thunk into 16 bit code to call *
  79. //* GetInstall() in setupx.dll if running on Win95. If running *
  80. //* on WinNT SUR, it will call a function to do all the *
  81. //* setupapi.dll function calls needed to install IE. *
  82. //* *
  83. //* REQUIRES: *
  84. //* *
  85. //* RETURNS: BOOL: Error result, FALSE == ERROR *
  86. //* *
  87. //***************************************************************************
  88. VOID WINAPI GetSETUPXErrorText32( DWORD dwError, LPSTR szErrorText, DWORD dwcbErrorText )
  89. {
  90. GetSETUPXErrorText16( dwError, szErrorText, dwcbErrorText );
  91. }
  92. //***************************************************************************
  93. //* *
  94. //* NAME: GenFormStrWithoutPlaceHolders *
  95. //* *
  96. //* SYNOPSIS: This function will map the to main function to do the *
  97. //* installation. This will thunk into 16 bit code to call *
  98. //* GetInstall() in setupx.dll if running on Win95. If running *
  99. //* on WinNT SUR, it will call a function to do all the *
  100. //* setupapi.dll function calls needed to install IE. *
  101. //* *
  102. //* REQUIRES: *
  103. //* *
  104. //* RETURNS: BOOL: Error result, FALSE == ERROR *
  105. //* *
  106. //***************************************************************************
  107. BOOL WINAPI GenFormStrWithoutPlaceHolders32( LPSTR szDst, LPSTR szSrc, LPSTR szInfFilename )
  108. {
  109. return( GenFormStrWithoutPlaceHolders16( szDst, szSrc, szInfFilename ) );
  110. }