home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / SAMPLES / VERSTAMP / VERSTAMP.H_ / VERSTAMP.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  2.7 KB  |  84 lines

  1. /*------------------------------------------------------------------------|
  2.   | Copyright (c) 1990, MicroSoft Corporation                             |
  3.   |                                                                       |
  4.   | verstamp.h - Header file for version fuction sample                    |
  5.   |-----------------------------------------------------------------------|
  6.   | modification history                                                  |
  7.   | Date    Reason                                                        |
  8.   | 911201  Creation date                                                 |
  9.   |------------------------------------------------------------------------*/
  10.  
  11. #include "resource.h"
  12.  
  13. #define VERINFOLEN    512             // Bytes to hold version info resource
  14. #define BUFLEN        256             // Buffer lengths
  15.  
  16.  
  17. DWORD gdwVerInfo       = 0L;           // Global data
  18. BOOL  bFirst           = TRUE;
  19.  
  20. typedef struct tagVS_VERSION
  21.   {
  22.     WORD wTotLen;
  23.     WORD wValLen;
  24.     char szSig[16];
  25.     VS_FIXEDFILEINFO vffInfo;
  26.   } VS_VERSION;
  27.  
  28. typedef struct tagLANGANDCP
  29.   {
  30.     WORD wLanguage;
  31.     WORD wCodePage;
  32.   } LANGANDCP;
  33.  
  34. HANDLE  ghInst;
  35.  
  36. char gszUserMsg[BUFLEN];
  37.  
  38. char  gszCurDir[_MAX_PATH],
  39.       gszWinDir[_MAX_PATH],           // Windows directory
  40.       gszSysDir[_MAX_PATH],           // Windows system directory
  41.       gszSrcDir[_MAX_PATH],           // source dir name
  42.       gszSrcFile[BUFLEN],             // source file name
  43.       gszTrgDir[_MAX_PATH],
  44.       gsqTrgFile[BUFLEN],
  45.       gszCurDir[_MAX_PATH],
  46.       gszDstDir[_MAX_PATH];
  47.  
  48.  
  49. WORD  gwCurDirLen = _MAX_PATH;
  50. WORD  gwDstDirLen = _MAX_PATH;
  51.  
  52.  
  53. char gszDlgClear[] = ".";               // Indicates no info
  54. char gszTrans[] = "\\VarFileInfo\\Translation";
  55. char *gszVerString[] =
  56.   {
  57.   "Illegal string",
  58.   "CompanyName",
  59.   "FileDescription",
  60.   "FileVersion",
  61.   "InternalName",
  62.   "LegalCopyright",
  63.   "LegalTrademarks",
  64.   "ProductName",
  65.   "ProductVersion"
  66.   };
  67. char gszAppName[] = "VerStamp";
  68.  
  69.  
  70.  
  71. int PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
  72. long FAR PASCAL __export WndProc(HWND, UINT, WPARAM, LPARAM);
  73. BOOL FAR PASCAL __export About(HWND, unsigned, WORD, LONG);
  74. BOOL FAR PASCAL __export MoreVerInfo(HWND, unsigned, WORD, LONG);
  75. BOOL MyGetOpenFileName(HWND, LPSTR, LPSTR);
  76. BOOL ShowVerInfo(HWND, LPSTR, LPSTR, WORD);
  77. void ClearDlgVer(HWND, int);
  78. void FillVerDialog(HWND, VS_VERSION FAR *, WORD);
  79. WORD MyVerFindFile(HWND, LPSTR, LPSTR, LPSTR);
  80. DWORD MyVerInstallFile(LPSTR, LPSTR, LPSTR);
  81. BOOL PASCAL HandleVerFindFileRes(HWND, WORD, LPSTR, LPSTR);
  82. void PostInstallProcessing(HWND, LPSTR, LPSTR);
  83. void HandleVerInstallFileRes(HWND, DWORD, LPSTR, LPSTR);
  84.