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.

83 lines
2.3 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. LPTSTR BuildFileName(LPCTSTR lpszPath, LPCTSTR lpszName);
  56. LPTSTR FindRChar(LPTSTR lpszStr, CHAR cch);
  57. LPTSTR GetDirectory(LPTSTR lpszFile, LPDWORD lpdwReturn);
  58. LPTSTR GetName(LPTSTR lpszFile, LPDWORD ldwReturn);
  59. PTSTR GetCABName(PTSTR pCmdLine, LPDWORD lpdwReturn);
  60. BOOL AddFileToList(PWPNPINFO pInfo, PTSTR lpszFile);
  61. VOID CleanupFileList(PWPNPINFO pInfo);
  62. BOOL Extract(PWPNPINFO pInfo);
  63. LPTSTR GetWPNPSetupLibName(LPDWORD lpdwReturn);
  64. DWORD InvokePrintWizard(PWPNPINFO pInfo, LPDWORD lpAuthError);
  65. DWORD WebPnPCABInstall(LPTSTR lpszCABName, LPDWORD lpAuthError);
  66. LPCTSTR LookupErrorString(DWORD dwErrorCode);
  67. VOID CheckErrors(DWORD dwErrorCode, DWORD dwAuthError);
  68. INT WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpszCmdLine, int nCmdShow);