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.

93 lines
2.6 KiB

  1. /*---------------------------------------------------------------------------*\
  2. | MODULE: wnpinstl.h
  3. |
  4. | This is the main header module for the application.
  5. |
  6. |
  7. | Copyright (C) 1997 Microsoft Corporation
  8. | Copyright (C) 1997 Hewlett Packard
  9. |
  10. | history:
  11. | 25-Jul-1997 <rbkunz> created.
  12. |
  13. \*---------------------------------------------------------------------------*/
  14. // Application Includes Section.
  15. //
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #include <conio.h>
  20. #define C_RUNTIME_IO_ERROR -1
  21. #define C_RUNTIME_SEEK_ERROR -1L
  22. #define NT_VER_5 5
  23. #define NT_VER_4 4
  24. #define MAX_ARGS 3
  25. #define MAX_RESBUF 128
  26. #define IDS_ERR_FORMAT 1
  27. #define IDS_ERR_ERROR 2
  28. #define IDS_ERR_GENERIC 3
  29. #define IDS_ERR_BADCAB 4
  30. #define IDS_ERR_INVPARM 5
  31. #define IDS_ERR_NOMEM 6
  32. #define IDS_ERR_INVNAME 7
  33. #define IDS_ERR_NODAT 8
  34. #define IDS_ERR_CABFAIL 9
  35. #define IDS_ERR_NOPRTUI 10
  36. #define IDS_ERR_PRTUIENTRY 11
  37. #define IDS_ERR_PRTUIFAIL 12
  38. #define IDS_ERR_NOSUPPORT 13
  39. typedef struct _FILENODE {
  40. PTSTR pFileName;
  41. struct _FILENODE * pNextFile;
  42. } FILENODE, *PFILENODE;
  43. typedef struct {
  44. PTSTR pFullCABPath;
  45. PTSTR pCABDir;
  46. PTSTR pCABName;
  47. PTSTR pTempDir;
  48. PFILENODE pFileList;
  49. } WPNPINFO, *PWPNPINFO;
  50. // Local function declarations
  51. //
  52. BOOL AdjustFileTime( INT_PTR hf, USHORT date, USHORT time );
  53. DWORD Attr32FromAttrFAT( WORD attrMSDOS );
  54. LPWSTR WCFromMB(LPCSTR lpszStr);
  55. LPWSTR WCFromTC(LPCTSTR lpszStr);
  56. LPTSTR BuildFileName(LPCTSTR lpszPath, LPCTSTR lpszName);
  57. LPTSTR FindRChar(LPTSTR lpszStr, CHAR cch);
  58. LPTSTR GetDirectory(LPTSTR lpszFile, LPDWORD lpdwReturn);
  59. LPTSTR GetName(LPTSTR lpszFile, LPDWORD ldwReturn);
  60. #if 0
  61. // These 4 functions are (probably) not needed anymore
  62. // We will call printUI, and printUI will call SetupX API's to verify files via a catalog file
  63. //
  64. BOOL RemoveExecutableFiles(PWPNPINFO pInfo);
  65. BOOL IsExecutableFile(PTSTR pFile);
  66. DWORD CheckFile(PTSTR lpszFile, LPDWORD lpAuthError);
  67. DWORD VerifyFiles(PWPNPINFO pInfo, LPDWORD lpAuthError);
  68. #endif
  69. PTSTR GetCABName(PTSTR pCmdLine, LPDWORD lpdwReturn);
  70. BOOL AddFileToList(PWPNPINFO pInfo, PTSTR lpszFile);
  71. VOID CleanupFileList(PWPNPINFO pInfo);
  72. BOOL Extract(PWPNPINFO pInfo);
  73. LPTSTR GetWPNPSetupLibName(LPDWORD lpdwReturn);
  74. DWORD InvokePrintWizard(PWPNPINFO pInfo, LPDWORD lpAuthError);
  75. DWORD WebPnPCABInstall(LPTSTR lpszCABName, LPDWORD lpAuthError);
  76. LPCTSTR LookupErrorString(DWORD dwErrorCode);
  77. VOID CheckErrors(DWORD dwErrorCode, DWORD dwAuthError);
  78. INT WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpszCmdLine, int nCmdShow);