Changeset 488 for trunk/src/version
- Timestamp:
- Aug 13, 1999, 1:33:38 AM (26 years ago)
- Location:
- trunk/src/version
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/version/VERSION.DEF
r369 r488 1 ; $Id: VERSION.DEF,v 1. 4 1999-07-23 07:30:48 sandervlExp $1 ; $Id: VERSION.DEF,v 1.5 1999-08-12 23:33:37 phaller Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 5 5 DATA MULTIPLE NONSHARED 6 6 7 IMPORTS 8 _LZOpenFileA@12 = LZ32.1 9 _LZCopy@8 = LZ32.0 10 _LZClose@4 = LZ32.5 11 7 12 EXPORTS 8 GetFileVersionInfoA = _ VERSION_GetFileVersionInfoA@16 @19 GetFileVersionInfoSizeA = _ VERSION_GetFileVersionInfoSizeA@8 @210 GetFileVersionInfoSizeW = _ VERSION_GetFileVersionInfoSizeW@8 @311 GetFileVersionInfoW = _ VERSION_GetFileVersionInfoW@16 @412 VerFindFileA = _V ERSION_VerFindFileA@32 @513 VerFindFileW = _V ERSION_VerFindFileW@32 @614 VerInstallFileA = _V ERSION_VerInstallFileA@32 @715 VerInstallFileW = _V ERSION_VerInstallFileW@32 @816 VerLanguageNameA = _V ERSION_VerLanguageNameA@12 @917 VerLanguageNameW = _V ERSION_VerLanguageNameW@12 @1018 VerQueryValueA = _V ERSION_VerQueryValueA@16 @1119 VerQueryValueW = _V ERSION_VerQueryValueW@16 @1220 ; VerQueryValueIndexA = _V ERSION_VerQueryValueIndexA@16 @1221 ; VerQueryValueIndexW = _V ERSION_VerQueryValueIndexW@16 @1322 ; VerQueryValueW = _V ERSION_VerQueryValueW@16 @1413 GetFileVersionInfoA = _GetFileVersionInfoA@16 @1 14 GetFileVersionInfoSizeA = _GetFileVersionInfoSizeA@8 @2 15 GetFileVersionInfoSizeW = _GetFileVersionInfoSizeW@8 @3 16 GetFileVersionInfoW = _GetFileVersionInfoW@16 @4 17 VerFindFileA = _VerFindFileA@32 @5 18 VerFindFileW = _VerFindFileW@32 @6 19 VerInstallFileA = _VerInstallFileA@32 @7 20 VerInstallFileW = _VerInstallFileW@32 @8 21 VerLanguageNameA = _VerLanguageNameA@12 @9 22 VerLanguageNameW = _VerLanguageNameW@12 @10 23 VerQueryValueA = _VerQueryValueA@16 @11 24 VerQueryValueW = _VerQueryValueW@16 @12 25 ; VerQueryValueIndexA = _VerQueryValueIndexA@16 @12 26 ; VerQueryValueIndexW = _VerQueryValueIndexW@16 @13 27 ; VerQueryValueW = _VerQueryValueW@16 @14 -
trunk/src/version/makefile
r451 r488 1 # $Id: makefile,v 1. 4 1999-08-09 18:56:52 achimhaExp $1 # $Id: makefile,v 1.5 1999-08-12 23:33:37 phaller Exp $ 2 2 3 3 # … … 30 30 $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \ 31 31 $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \ 32 OS2386.LIB32 $(PDWIN32_LIB)/lz32.lib OS2386.LIB 33 33 $(CP) $@ $(PDWIN32_BIN) 34 34 -
trunk/src/version/version.cpp
r369 r488 1 /* $Id: version.cpp,v 1. 4 1999-07-23 07:30:49 sandervlExp $ */1 /* $Id: version.cpp,v 1.5 1999-08-12 23:33:37 phaller Exp $ */ 2 2 3 3 /* … … 17 17 #include <stdlib.h> 18 18 #include <string.h> 19 #include <odinwrap.h> 19 20 #include <misc.h> 20 21 #include <unicode.h> 21 #include "version.h" 22 23 #include "lzexpand.h" 24 25 26 /******************************************************************************/ 27 /******************************************************************************/ 28 BOOL WIN32API VERSION_GetFileVersionInfoA(LPTSTR lpszFile, 29 DWORD dwHandle, 30 DWORD cbBuf, 31 LPVOID lpvData) 32 { 33 dprintf(("VERSION: GetFileVersionInfoA %s\n", 34 lpszFile)); 35 36 return GetVersionStruct(lpszFile, 37 (char *)lpvData, 38 cbBuf); 39 } 40 /******************************************************************************/ 41 /******************************************************************************/ 42 BOOL WIN32API VERSION_GetFileVersionInfoW(LPWSTR lpszFile, 43 DWORD dwHandle, 44 DWORD cbBuf, 45 LPVOID lpvData) 46 { 47 BOOL rc; 48 char *astring = UnicodeToAsciiString(lpszFile); 49 50 dprintf(("VERSION: GetFileVersionInfoW (%s,%08xh,%08xh,%08xh)\n", 51 lpszFile, 52 dwHandle, 53 cbBuf, 54 lpvData)); 22 #include <heapstring.h> 23 #include <version.h> 24 #include <lzexpand.h> 25 #include <win\winreg.h> 26 27 28 ODINDEBUGCHANNEL(VERSION) 29 30 /***************************************************************************** 31 * Name : 32 * Purpose : 33 * Parameters: 34 * Variables : 35 * Result : 36 * Remark : 37 * Status : UNTESTED STUB 38 * 39 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 40 *****************************************************************************/ 41 42 VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild(VS_VERSION_INFO_STRUCT16 *info, 43 LPCSTR szKey, 44 UINT cbKey ) 45 { 46 VS_VERSION_INFO_STRUCT16 *child = VersionInfo16_Children( info ); 47 48 while ( (DWORD)child < (DWORD)info + info->wLength ) 49 { 50 if ( !strnicmp( child->szKey, szKey, cbKey ) ) 51 return child; 52 53 if (!(child->wLength)) return NULL; 54 child = VersionInfo16_Next( child ); 55 } 56 57 return NULL; 58 } 59 60 61 /***************************************************************************** 62 * Name : 63 * Purpose : 64 * Parameters: 65 * Variables : 66 * Result : 67 * Remark : 68 * Status : UNTESTED STUB 69 * 70 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 71 *****************************************************************************/ 72 73 VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild(VS_VERSION_INFO_STRUCT32 *info, 74 LPCWSTR szKey, 75 UINT cbKey ) 76 { 77 VS_VERSION_INFO_STRUCT32 *child = VersionInfo32_Children( info ); 78 79 while ( (DWORD)child < (DWORD)info + info->wLength ) 80 { 81 // if ( !lstrcmpniW( child->szKey, szKey, cbKey ) ) 82 if ( !lstrcmpiW( child->szKey, szKey) ) 83 return child; 84 85 child = VersionInfo32_Next( child ); 86 } 87 88 return NULL; 89 } 90 91 92 /****************************************************************************** 93 * 94 * void ver_dstring( 95 * char const * prologue, 96 * char const * teststring, 97 * char const * epilogue ) 98 * 99 * This function will print via dprintf[_]ver to stddeb the prologue string, 100 * followed by the address of teststring and the string it contains if 101 * teststring is non-null or "(null)" otherwise, and then the epilogue 102 * string followed by a new line. 103 * 104 * Revision history 105 * 30-May-1997 Dave Cuthbert (dacut@ece.cmu.edu) 106 * Original implementation as dprintf[_]ver_string 107 * 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu) 108 * Fixed problem that caused bug with tools/make_debug -- renaming 109 * this function should fix the problem. 110 * 15-Feb-1998 Dimitrie Paun (dimi@cs.toronto.edu) 111 * Modified it to make it print the message using only one 112 * dprintf[_]ver call. 113 * 114 *****************************************************************************/ 115 116 static void ver_dstring(char const * prologue, 117 char const * teststring, 118 char const * epilogue ) 119 { 120 dprintf(("VERSION: ver_dstring(%s, %s, %s)\n", 121 prologue, 122 teststring, 123 epilogue)); 124 } 125 126 127 /****************************************************************************** 128 * 129 * int testFileExistence( 130 * char const * path, 131 * char const * file ) 132 * 133 * Tests whether a given path/file combination exists. If the file does 134 * not exist, the return value is zero. If it does exist, the return 135 * value is non-zero. 136 * 137 * Revision history 138 * 30-May-1997 Dave Cuthbert (dacut@ece.cmu.edu) 139 * Original implementation 140 * 141 *****************************************************************************/ 142 143 static int testFileExistence(char const * path, 144 char const * file ) 145 { 146 char filename[1024]; 147 int filenamelen; 148 OFSTRUCT fileinfo; 149 int retval; 150 151 fileinfo.cBytes = sizeof(OFSTRUCT); 152 153 strcpy(filename, path); 154 filenamelen = strlen(filename); 155 156 /* Add a trailing \ if necessary */ 157 if(filenamelen) 158 { 159 if(filename[filenamelen - 1] != '\\') 160 strcat(filename, "\\"); 161 } 162 else /* specify the current directory */ 163 strcpy(filename, ".\\"); 164 165 /* Create the full pathname */ 166 strcat(filename, file); 167 168 if(OpenFile(filename, &fileinfo, OF_EXIST) == HFILE_ERROR) 169 retval = 0; 170 else 171 retval = 1; 172 173 return retval; 174 } 175 176 177 /****************************************************************************** 178 * 179 * int testFileExclusiveExistence( 180 * char const * path, 181 * char const * file ) 182 * 183 * Tests whether a given path/file combination exists and ensures that no 184 * other programs have handles to the given file. If the file does not 185 * exist or is open, the return value is zero. If it does exist, the 186 * return value is non-zero. 187 * 188 * Revision history 189 * 30-May-1997 Dave Cuthbert (dacut@ece.cmu.edu) 190 * Original implementation 191 * 192 *****************************************************************************/ 193 194 static int testFileExclusiveExistence(char const * path, 195 char const * file ) 196 { 197 char filename[1024]; 198 int filenamelen; 199 OFSTRUCT fileinfo; 200 int retval; 201 202 fileinfo.cBytes = sizeof(OFSTRUCT); 203 204 strcpy(filename, path); 205 filenamelen = strlen(filename); 206 207 /* Add a trailing \ if necessary */ 208 if(filenamelen) 209 { 210 if(filename[filenamelen - 1] != '\\') 211 strcat(filename, "\\"); 212 } 213 else /* specify the current directory */ 214 strcpy(filename, ".\\"); 215 216 /* Create the full pathname */ 217 strcat(filename, file); 218 219 if(OpenFile(filename, 220 &fileinfo, 221 OF_EXIST | OF_SHARE_EXCLUSIVE) == HFILE_ERROR) 222 retval = 0; 223 else 224 retval = 1; 225 226 return retval; 227 } 228 229 230 static LPBYTE _fetch_versioninfo(LPSTR fn,VS_FIXEDFILEINFO **vffi) 231 { 232 DWORD alloclen; 233 LPBYTE buf; 234 DWORD ret; 235 236 alloclen = 1000; 237 buf = (LPBYTE)malloc(alloclen); 238 239 while (1) 240 { 241 ret = GetFileVersionInfoA(fn, 242 0, 243 alloclen, 244 buf); 245 if (!ret) 246 { 247 free(buf); 248 return 0; 249 } 250 251 if (alloclen<*(WORD*)buf) 252 { 253 free(buf); 254 alloclen = *(WORD*)buf; 255 buf = (LPBYTE)malloc(alloclen); 256 } 257 else 258 { 259 *vffi = (VS_FIXEDFILEINFO*)(buf+0x14); 260 261 if ((*vffi)->dwSignature == 0x004f0049) /* hack to detect unicode */ 262 *vffi = (VS_FIXEDFILEINFO*)(buf+0x28); 263 264 if ((*vffi)->dwSignature != VS_FFI_SIGNATURE) 265 dprintf(("VERSION: _fetch_versioninfo: Bad VS_FIXEDFILEINFO signature 0x%08lx\n", 266 (*vffi)->dwSignature)); 267 268 return buf; 269 } 270 } 271 } 272 273 static DWORD _error2vif(DWORD error) 274 { 275 switch (error) 276 { 277 case ERROR_ACCESS_DENIED: 278 return VIF_ACCESSVIOLATION; 279 280 case ERROR_SHARING_VIOLATION: 281 return VIF_SHARINGVIOLATION; 282 283 default: 284 return 0; 285 } 286 } 287 288 289 290 /***************************************************************************** 291 * Name : 292 * Purpose : 293 * Parameters: 294 * Variables : 295 * Result : 296 * Remark : 297 * Status : UNTESTED STUB 298 * 299 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 300 *****************************************************************************/ 301 302 ODINFUNCTION4(BOOL,GetFileVersionInfoA,LPSTR, lpszFile, 303 DWORD, dwHandle, 304 DWORD, cbBuf, 305 LPVOID,lpvData) 306 { 307 return GetVersionStruct((char *)lpszFile, 308 (char *)lpvData, 309 cbBuf); 310 } 311 312 313 /***************************************************************************** 314 * Name : 315 * Purpose : 316 * Parameters: 317 * Variables : 318 * Result : 319 * Remark : 320 * Status : UNTESTED STUB 321 * 322 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 323 *****************************************************************************/ 324 325 ODINFUNCTION4(BOOL,GetFileVersionInfoW,LPWSTR, lpszFile, 326 DWORD, dwHandle, 327 DWORD, cbBuf, 328 LPVOID, lpvData) 329 { 330 BOOL rc; 331 char *astring = UnicodeToAsciiString(lpszFile); 55 332 56 333 rc = GetVersionStruct(astring, (char *)lpvData, cbBuf); … … 58 335 return(rc); 59 336 } 60 /******************************************************************************/ 61 /******************************************************************************/ 62 DWORD WIN32API VERSION_GetFileVersionInfoSizeA(LPTSTR lpszFile, 63 LPDWORD lpdwHandle) 64 { 65 dprintf(("VERSION: GetFileVersionInfoSizeA(%s,%08xh)\n", 66 lpszFile, 67 lpdwHandle)); 68 337 338 339 /***************************************************************************** 340 * Name : 341 * Purpose : 342 * Parameters: 343 * Variables : 344 * Result : 345 * Remark : 346 * Status : UNTESTED STUB 347 * 348 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 349 *****************************************************************************/ 350 351 ODINFUNCTION2(DWORD,GetFileVersionInfoSizeA,LPSTR, lpszFile, 352 LPDWORD, lpdwHandle) 353 { 69 354 if(lpdwHandle) 70 355 lpdwHandle = 0; … … 72 357 return GetVersionSize(lpszFile); 73 358 } 74 /******************************************************************************/ 75 /******************************************************************************/ 76 DWORD WIN32API VERSION_GetFileVersionInfoSizeW(LPWSTR lpszFile, 77 LPDWORD lpdwHandle) 78 { 79 char *astring = UnicodeToAsciiString(lpszFile); 80 DWORD rc; 81 82 dprintf(("VERSION: GetFileVersionInfoSizeW(%08xh,%08xh)\n", 83 lpszFile, 84 lpdwHandle)); 85 86 if(lpdwHandle) 87 lpdwHandle = 0; 88 89 rc = GetVersionSize(astring); 90 FreeAsciiString(astring); 91 return(rc); 92 } 93 /******************************************************************************/ 94 /******************************************************************************/ 95 INT WIN32API lstrncmpiW( LPCWSTR str1, LPCWSTR str2, INT n ) 96 { 97 INT res; 98 99 if (!n) return 0; 100 while ((--n > 0) && *str1) 101 { 102 if ((res = towupper(*str1) - towupper(*str2)) != 0) return res; 103 str1++; 104 str2++; 105 } 106 return towupper(*str1) - towupper(*str2); 107 } 108 /*********************************************************************** 109 * VersionInfo16_FindChild [internal] 110 */ 111 VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT16 *info, 112 LPCSTR szKey, UINT cbKey ) 113 { 114 VS_VERSION_INFO_STRUCT16 *child = VersionInfo16_Children( info ); 115 116 while ( (DWORD)child < (DWORD)info + info->wLength ) 117 { 118 if ( !strnicmp( child->szKey, szKey, cbKey ) ) 119 return child; 120 121 if (!(child->wLength)) return NULL; 122 child = VersionInfo16_Next( child ); 123 } 124 125 return NULL; 126 } 127 /*********************************************************************** 128 * VersionInfo32_FindChild [internal] 129 */ 130 VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT32 *info, 131 LPCWSTR szKey, UINT cbKey ) 132 { 133 VS_VERSION_INFO_STRUCT32 *child = VersionInfo32_Children( info ); 134 135 while ( (DWORD)child < (DWORD)info + info->wLength ) 136 { 137 if ( !lstrncmpiW( child->szKey, szKey, cbKey ) ) 138 return child; 139 140 child = VersionInfo32_Next( child ); 141 } 142 143 return NULL; 144 } 145 /******************************************************************************/ 146 /****************************************************************************** 147 * VerQueryValue32W [VERSION.13] 148 */ 149 BOOL WIN32API VERSION_VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock, 150 LPVOID *lplpBuffer, UINT *puLen ) 359 360 361 /***************************************************************************** 362 * Name : 363 * Purpose : 364 * Parameters: 365 * Variables : 366 * Result : 367 * Remark : 368 * Status : UNTESTED STUB 369 * 370 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 371 *****************************************************************************/ 372 373 ODINFUNCTION2(DWORD,GetFileVersionInfoSizeW,LPWSTR, lpszFile, 374 LPDWORD, lpdwHandle) 375 { 376 char *astring = UnicodeToAsciiString((LPWSTR)lpszFile); 377 DWORD rc; 378 379 380 if(lpdwHandle) 381 lpdwHandle = 0; 382 383 rc = GetVersionSize(astring); 384 FreeAsciiString(astring); 385 return(rc); 386 } 387 388 389 390 /***************************************************************************** 391 * Name : 392 * Purpose : 393 * Parameters: 394 * Variables : 395 * Result : 396 * Remark : 397 * Status : UNTESTED STUB 398 * 399 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 400 *****************************************************************************/ 401 402 ODINFUNCTION4(BOOL,VerQueryValueW, LPVOID, pBlock, 403 LPWSTR, lpSubBlock, 404 LPVOID*, lplpBuffer, 405 UINT*, puLen) 151 406 { 152 407 VS_VERSION_INFO_STRUCT32 *info = (VS_VERSION_INFO_STRUCT32 *)pBlock; … … 156 411 return FALSE; 157 412 } 158 159 dprintf(("VERSION: (%p,%s,%p,%p)\n",160 pBlock, lpSubBlock, lplpBuffer, puLen ));161 413 162 414 while ( *lpSubBlock ) … … 177 429 /* We have a non-empty component: search info for key */ 178 430 info = VersionInfo32_FindChild( info, lpSubBlock, lpNextSlash-lpSubBlock ); 179 if ( !info ) return FALSE; 431 if ( !info ) 432 return FALSE; 180 433 181 434 /* Skip path component */ 182 lpSubBlock = lpNextSlash;435 lpSubBlock = (LPWSTR)lpNextSlash; 183 436 } 184 437 … … 189 442 return TRUE; 190 443 } 191 /******************************************************************************/ 192 /******************************************************************************/ 193 /*********************************************************************** 194 * VerQueryValue32A [VERSION.12] 195 */ 196 BOOL WIN32API VERSION_VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock, 197 LPVOID *lplpBuffer, UINT *puLen ) 444 445 446 /***************************************************************************** 447 * Name : 448 * Purpose : 449 * Parameters: 450 * Variables : 451 * Result : 452 * Remark : 453 * Status : UNTESTED STUB 454 * 455 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 456 *****************************************************************************/ 457 458 ODINFUNCTION4(BOOL,VerQueryValueA,LPVOID, pBlock, 459 LPSTR, lpSubBlock, 460 LPVOID*, lplpBuffer, 461 UINT*, puLen ) 198 462 { 199 463 VS_VERSION_INFO_STRUCT16 *info = (VS_VERSION_INFO_STRUCT16 *)pBlock; 200 464 if ( !VersionInfoIs16( info ) ) 201 465 { 202 // this is a quick hack, not much tested 466 // this is a quick hack, not much tested 203 467 WCHAR *ustring = (WCHAR *)malloc(strlen((char *)lpSubBlock)*2+1); 204 468 LPVOID ubuffer; … … 210 474 211 475 AsciiToUnicode((char *)lpSubBlock, ustring); 212 rc = V ERSION_VerQueryValueW( pBlock, (LPCWSTR)ustring, &ubuffer, &len);476 rc = VerQueryValueW( pBlock, (LPWSTR)ustring, &ubuffer, &len); 213 477 if(lpSubBlock[0] == '\\' && lpSubBlock[1] == 0) 214 478 *lplpBuffer = ubuffer; … … 223 487 } 224 488 225 dprintf(("VERSION: (%p,%s,%p,%p)\n",226 pBlock, lpSubBlock, lplpBuffer, puLen ));227 228 489 while ( *lpSubBlock ) 229 490 { … … 246 507 247 508 /* Skip path component */ 248 lpSubBlock = lpNextSlash;509 lpSubBlock = (LPSTR)lpNextSlash; 249 510 } 250 511 … … 255 516 return TRUE; 256 517 } 257 /******************************************************************************/ 258 259 260 /****************************************************************************** 261 * 262 * void ver_dstring( 263 * char const * prologue, 264 * char const * teststring, 265 * char const * epilogue ) 266 * 267 * This function will print via dprintf[_]ver to stddeb the prologue string, 268 * followed by the address of teststring and the string it contains if 269 * teststring is non-null or "(null)" otherwise, and then the epilogue 270 * string followed by a new line. 271 * 272 * Revision history 273 * 30-May-1997 Dave Cuthbert (dacut@ece.cmu.edu) 274 * Original implementation as dprintf[_]ver_string 275 * 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu) 276 * Fixed problem that caused bug with tools/make_debug -- renaming 277 * this function should fix the problem. 278 * 15-Feb-1998 Dimitrie Paun (dimi@cs.toronto.edu) 279 * Modified it to make it print the message using only one 280 * dprintf[_]ver call. 281 * 282 *****************************************************************************/ 283 284 static void ver_dstring(char const * prologue, 285 char const * teststring, 286 char const * epilogue ) 287 { 288 dprintf(("VERSION: ver_dstring(%s, %s, %s)\n", 289 prologue, 290 teststring, 291 epilogue)); 292 } 293 294 295 /****************************************************************************** 296 * 297 * int testFileExistence( 298 * char const * path, 299 * char const * file ) 300 * 301 * Tests whether a given path/file combination exists. If the file does 302 * not exist, the return value is zero. If it does exist, the return 303 * value is non-zero. 304 * 305 * Revision history 306 * 30-May-1997 Dave Cuthbert (dacut@ece.cmu.edu) 307 * Original implementation 308 * 309 *****************************************************************************/ 310 311 static int testFileExistence(char const * path, 312 char const * file ) 313 { 314 char filename[1024]; 315 int filenamelen; 316 OFSTRUCT fileinfo; 317 int retval; 318 319 fileinfo.cBytes = sizeof(OFSTRUCT); 320 321 strcpy(filename, path); 322 filenamelen = strlen(filename); 323 324 /* Add a trailing \ if necessary */ 325 if(filenamelen) 326 { 327 if(filename[filenamelen - 1] != '\\') 328 strcat(filename, "\\"); 329 } 330 else /* specify the current directory */ 331 strcpy(filename, ".\\"); 332 333 /* Create the full pathname */ 334 strcat(filename, file); 335 336 if(OpenFile(filename, &fileinfo, OF_EXIST) == HFILE_ERROR) 337 retval = 0; 338 else 339 retval = 1; 340 341 return retval; 342 } 343 344 345 /****************************************************************************** 346 * 347 * int testFileExclusiveExistence( 348 * char const * path, 349 * char const * file ) 350 * 351 * Tests whether a given path/file combination exists and ensures that no 352 * other programs have handles to the given file. If the file does not 353 * exist or is open, the return value is zero. If it does exist, the 354 * return value is non-zero. 355 * 356 * Revision history 357 * 30-May-1997 Dave Cuthbert (dacut@ece.cmu.edu) 358 * Original implementation 359 * 360 *****************************************************************************/ 361 362 static int testFileExclusiveExistence(char const * path, 363 char const * file ) 364 { 365 char filename[1024]; 366 int filenamelen; 367 OFSTRUCT fileinfo; 368 int retval; 369 370 fileinfo.cBytes = sizeof(OFSTRUCT); 371 372 strcpy(filename, path); 373 filenamelen = strlen(filename); 374 375 /* Add a trailing \ if necessary */ 376 if(filenamelen) 377 { 378 if(filename[filenamelen - 1] != '\\') 379 strcat(filename, "\\"); 380 } 381 else /* specify the current directory */ 382 strcpy(filename, ".\\"); 383 384 /* Create the full pathname */ 385 strcat(filename, file); 386 387 if(OpenFile(filename, 388 &fileinfo, 389 OF_EXIST | OF_SHARE_EXCLUSIVE) == HFILE_ERROR) 390 retval = 0; 391 else 392 retval = 1; 393 394 return retval; 395 } 518 519 396 520 397 521 … … 409 533 ****************************************************************************/ 410 534 411 /* VerFindFile32A [VERSION.5] */ 412 DWORD WIN32API VERSION_VerFindFileA(UINT flags, 413 LPCSTR lpszFilename, 414 LPCSTR lpszWinDir, 415 LPCSTR lpszAppDir, 416 LPSTR lpszCurDir, 417 UINT *lpuCurDirLen, 418 LPSTR lpszDestDir, 419 UINT *lpuDestDirLen ) 535 ODINFUNCTION8(DWORD,VerFindFileA,DWORD, flags, 536 LPSTR, lpszFilename, 537 LPSTR, lpszWinDir, 538 LPSTR, lpszAppDir, 539 LPSTR, lpszCurDir, 540 PUINT, lpuCurDirLen, 541 LPSTR, lpszDestDir, 542 PUINT, lpuDestDirLen ) 420 543 { 421 544 DWORD retval; … … 426 549 427 550 retval = 0; 428 429 /* Print out debugging information */430 dprintf(("VERSION: VerFindFileA(%08xh,%s,%s,%s,%08xh,%08xh,%08xh,%08xh)\n",431 flags,432 lpszFilename,433 lpszWinDir,434 lpszAppDir,435 lpszCurDir,436 lpuCurDirLen,437 lpszDestDir,438 lpuDestDirLen));439 551 440 552 ver_dstring("\tlpszFilename = ", lpszFilename, ""); … … 559 671 } 560 672 561 /* VerFindFile32W [VERSION.6] */ 562 DWORD WIN32API VERSION_VerFindFileW(UINT flags, 563 LPWSTR filename, 564 LPWSTR windir, 565 LPWSTR appdir, 566 LPWSTR curdir, 567 UINT *pcurdirlen, 568 LPWSTR destdir, 569 UINT *pdestdirlen) 673 674 /***************************************************************************** 675 * Name : 676 * Purpose : 677 * Parameters: 678 * Variables : 679 * Result : 680 * Remark : 681 * Status : UNTESTED STUB 682 * 683 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 684 *****************************************************************************/ 685 686 ODINFUNCTION8(DWORD,VerFindFileW,DWORD, flags, 687 LPWSTR, lpszFilename, 688 LPWSTR, lpszWinDir, 689 LPWSTR, lpszAppDir, 690 LPWSTR, lpszCurDir, 691 PUINT, lpuCurDirLen, 692 LPWSTR, lpszDestDir, 693 PUINT, lpuDestDirLen ) 570 694 { 571 695 UINT curdirlen, … … 578 702 DWORD ret; 579 703 580 wfn = UnicodeToAsciiString( filename );581 wwd = UnicodeToAsciiString( windir );582 wad = UnicodeToAsciiString( appdir );583 wcd = (LPSTR)HeapAlloc( GetProcessHeap(), 0, * pcurdirlen );584 wdd = (LPSTR)HeapAlloc( GetProcessHeap(), 0, * pdestdirlen );585 586 ret = V ERSION_VerFindFileA(flags,587 588 589 590 591 592 593 594 595 AsciiToUnicodeN(wcd, curdir,*pcurdirlen);596 AsciiToUnicodeN(wdd, destdir,*pdestdirlen);597 * pcurdirlen = strlen(wcd);598 * pdestdirlen = strlen(wdd);704 wfn = UnicodeToAsciiString(lpszFilename ); 705 wwd = UnicodeToAsciiString(lpszWinDir ); 706 wad = UnicodeToAsciiString(lpszAppDir ); 707 wcd = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *lpuCurDirLen ); 708 wdd = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *lpuDestDirLen ); 709 710 ret = VerFindFileA(flags, 711 wfn, 712 wwd, 713 wad, 714 wcd, 715 &curdirlen, 716 wdd, 717 &destdirlen); 718 719 AsciiToUnicodeN(wcd,lpszCurDir,*lpuCurDirLen); 720 AsciiToUnicodeN(wdd,lpszDestDir,*lpuDestDirLen); 721 *lpuCurDirLen = strlen(wcd); 722 *lpuDestDirLen = strlen(wdd); 599 723 600 724 FreeAsciiString(wfn ); … … 606 730 } 607 731 608 static LPBYTE _fetch_versioninfo(LPSTR fn,VS_FIXEDFILEINFO **vffi) 609 { 610 DWORD alloclen; 611 LPBYTE buf; 612 DWORD ret; 613 614 alloclen = 1000; 615 buf = (LPBYTE)malloc(alloclen); 616 617 while (1) 618 { 619 ret = VERSION_GetFileVersionInfoA(fn, 620 0, 621 alloclen, 622 buf); 623 if (!ret) 624 { 625 free(buf); 626 return 0; 627 } 628 629 if (alloclen<*(WORD*)buf) 630 { 631 free(buf); 632 alloclen = *(WORD*)buf; 633 buf = (LPBYTE)malloc(alloclen); 634 } 635 else 636 { 637 *vffi = (VS_FIXEDFILEINFO*)(buf+0x14); 638 639 if ((*vffi)->dwSignature == 0x004f0049) /* hack to detect unicode */ 640 *vffi = (VS_FIXEDFILEINFO*)(buf+0x28); 641 642 if ((*vffi)->dwSignature != VS_FFI_SIGNATURE) 643 dprintf(("VERSION: _fetch_versioninfo: Bad VS_FIXEDFILEINFO signature 0x%08lx\n", 644 (*vffi)->dwSignature)); 645 646 return buf; 647 } 648 } 649 } 650 651 static DWORD _error2vif(DWORD error) 652 { 653 switch (error) 654 { 655 case ERROR_ACCESS_DENIED: 656 return VIF_ACCESSVIOLATION; 657 658 case ERROR_SHARING_VIOLATION: 659 return VIF_SHARINGVIOLATION; 660 661 default: 662 return 0; 663 } 664 } 665 666 667 /****************************************************************************** 668 * VerInstallFile32A [VERSION.7] 669 */ 670 DWORD WIN32API VERSION_VerInstallFileA(UINT flags, 671 LPCSTR srcfilename, 672 LPCSTR destfilename, 673 LPCSTR srcdir, 674 LPCSTR destdir, 675 LPCSTR curdir, 676 LPSTR tmpfile, 677 UINT *tmpfilelen ) 732 733 /***************************************************************************** 734 * Name : 735 * Purpose : 736 * Parameters: 737 * Variables : 738 * Result : 739 * Remark : 740 * Status : UNTESTED STUB 741 * 742 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 743 *****************************************************************************/ 744 745 ODINFUNCTION8(DWORD,VerInstallFileA,DWORD, flags, 746 LPSTR, srcfilename, 747 LPSTR, destfilename, 748 LPSTR, srcdir, 749 LPSTR, destdir, 750 LPSTR, curdir, 751 LPSTR, tmpfile, 752 PUINT, tmpfilelen ) 678 753 { 679 754 LPCSTR pdest; … … 690 765 OFSTRUCT ofs; 691 766 692 dprintf(("VERSION: VerInstallFileA(%x,%s,%s,%s,%s,%s,%p,%d)\n", 693 flags, 694 srcfilename, 695 destfilename, 696 srcdir, 697 destdir, 698 curdir, 699 tmpfile, 700 *tmpfilelen)); 701 702 #if 1 703 dprintf(("VERSION: VersInstallFileA not implemented\n")); 704 705 return 0; 706 #else 767 707 768 xret = 0; 708 769 … … 868 929 LZClose(hfsrc); 869 930 return xret; 870 #endif 871 } 872 873 874 /* VerInstallFile32W [VERSION.8] */ 875 DWORD WIN32API VERSION_VerInstallFileW(UINT flags, 876 LPWSTR srcfilename, 877 LPWSTR destfilename, 878 LPWSTR srcdir, 879 LPWSTR destdir, 880 LPWSTR curdir, 881 LPWSTR tmpfile, 882 UINT *tmpfilelen ) 931 } 932 933 934 /***************************************************************************** 935 * Name : 936 * Purpose : 937 * Parameters: 938 * Variables : 939 * Result : 940 * Remark : 941 * Status : UNTESTED STUB 942 * 943 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 944 *****************************************************************************/ 945 946 ODINFUNCTION8(DWORD,VerInstallFileW,DWORD, flags, 947 LPWSTR, srcfilename, 948 LPWSTR, destfilename, 949 LPWSTR, srcdir, 950 LPWSTR, destdir, 951 LPWSTR, curdir, 952 LPWSTR, tmpfile, 953 PUINT, tmpfilelen ) 883 954 { 884 955 LPSTR wsrcf, … … 897 968 wcurd = UnicodeToAsciiString(curdir ); 898 969 899 ret = V ERSION_VerInstallFileA(flags,900 901 902 903 904 905 906 970 ret = VerInstallFileA(flags, 971 wsrcf, 972 wdestf, 973 wsrcd, 974 wdestd, 975 wcurd, 976 wtmpf, 977 tmpfilelen); 907 978 if (!ret) 908 979 AsciiToUnicodeN(wtmpf, … … 923 994 924 995 925 /*********************************************************************** 926 * VerLanguageName32A [VERSION.9] 927 */ 928 DWORD WIN32API VERSION_VerLanguageNameA(UINT wLang, 929 LPSTR szLang, 930 UINT nSize) 931 { 932 char buffer[80]; 933 LPCSTR name; 934 DWORD result; 935 936 dprintf(("VERSION: VerLanguageNameA(%08xh,%08xh,%08xh) not implemented.\n", 937 wLang, 938 szLang, 939 nSize)); 940 941 #if 0 942 /* 943 * First, check \System\CurrentControlSet\control\Nls\Locale\<langid> 944 * from the registry. 945 */ 946 947 sprintf( buffer, 948 "\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x", 949 wLang ); 950 951 result = RegQueryValueA(HKEY_LOCAL_MACHINE, 952 buffer, 953 szLang, 954 (LPDWORD)&nSize ); 955 if (result == ERROR_SUCCESS || 956 result == ERROR_MORE_DATA) 957 return nSize; 958 959 /* 960 * If that fails, use the internal table 961 * (actually, Windows stores the names in a string table resource ...) 962 */ 963 964 name = WINE_GetLanguageName( wLang ); 965 lstrcpynA( szLang, name, nSize ); 966 return lstrlenA( name ); 967 #endif 968 969 return 0; 970 } 971 972 /*********************************************************************** 973 * VerLanguageName32W [VERSION.10] 974 */ 975 DWORD WIN32API VERSION_VerLanguageNameW(UINT wLang, 976 LPWSTR szLang, 977 UINT nSize ) 978 { 979 char buffer[80]; 980 LPWSTR keyname; 981 LPCSTR name; 982 DWORD result; 983 984 dprintf(("VERSION: VerLanguageNameW(%08xh,%08xh,%08xh) not implemented.\n", 985 wLang, 986 szLang, 987 nSize)); 988 989 #if 0 990 /* 991 * First, check \System\CurrentControlSet\control\Nls\Locale\<langid> 992 * from the registry. 993 */ 994 995 sprintf( buffer, 996 "\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x", 997 wLang ); 998 999 keyname = HEAP_strdupAtoW( GetProcessHeap(), 0, buffer ); 1000 result = RegQueryValueW( HKEY_LOCAL_MACHINE, keyname, szLang, (LPDWORD)&nSize ); 1001 HeapFree( GetProcessHeap(), 0, keyname ); 1002 1003 if (result == ERROR_SUCCESS || 1004 result == ERROR_MORE_DATA) 1005 return nSize; 1006 1007 /* 1008 * If that fails, use the internal table 1009 * (actually, Windows stores the names in a string table resource ...) 1010 */ 1011 1012 name = WINE_GetLanguageName( wLang ); 1013 lstrcpynAtoW( szLang, name, nSize ); 1014 return lstrlenA( name ); 1015 #else 1016 return 0; 1017 #endif 1018 } 1019 1020 996 -
trunk/src/version/version.h
r369 r488 1 /* $Id: version.h,v 1. 3 1999-07-23 07:30:49 sandervlExp $ */1 /* $Id: version.h,v 1.4 1999-08-12 23:33:38 phaller Exp $ */ 2 2 3 3 /* Definitions for the VERsion infolibrary (VER.DLL) … … 15 15 /* These are internal resources for win16, but simple numbers in win32 */ 16 16 /* All win32 defines should be moved to winver.h */ 17 #define VS_FILE_INFO16MAKEINTRESOURCE16(16)18 #define VS_VERSION_INFO16MAKEINTRESOURCE16(1)19 #define VS_USER_INFO16MAKEINTRESOURCE16(100)20 21 #define VS_FILE_INFO1622 #define VS_VERSION_INFO123 #define VS_USER_INFO10024 25 #define VS_FFI_SIGNATURE 0xfeef04bdL/* FileInfo Magic */26 #define VS_FFI_STRUCVERSION 0x00010000L/* struc version 1.0 */27 #define VS_FFI_FILEFLAGSMASK 0x0000003fL/* valid flags */17 #define VS_FILE_INFO16 MAKEINTRESOURCE16(16) 18 #define VS_VERSION_INFO16 MAKEINTRESOURCE16(1) 19 #define VS_USER_INFO16 MAKEINTRESOURCE16(100) 20 21 #define VS_FILE_INFO 16 22 #define VS_VERSION_INFO 1 23 #define VS_USER_INFO 100 24 25 #define VS_FFI_SIGNATURE 0xfeef04bdL /* FileInfo Magic */ 26 #define VS_FFI_STRUCVERSION 0x00010000L /* struc version 1.0 */ 27 #define VS_FFI_FILEFLAGSMASK 0x0000003fL /* valid flags */ 28 28 29 29 /* VS_VERSION.dwFileFlags */ 30 #define VS_FF_DEBUG0x01L31 #define VS_FF_PRERELEASE0x02L32 #define VS_FF_PATCHED0x04L33 #define VS_FF_PRIVATEBUILD0x08L34 #define VS_FF_INFOINFERRED0x10L35 #define VS_FF_SPECIALBUILD0x20L30 #define VS_FF_DEBUG 0x01L 31 #define VS_FF_PRERELEASE 0x02L 32 #define VS_FF_PATCHED 0x04L 33 #define VS_FF_PRIVATEBUILD 0x08L 34 #define VS_FF_INFOINFERRED 0x10L 35 #define VS_FF_SPECIALBUILD 0x20L 36 36 37 37 /* VS_VERSION.dwFileOS */ 38 38 39 39 /* major os version */ 40 #define VOS_UNKNOWN0x00000000L41 #define VOS_DOS0x00010000L42 #define VOS_OS2160x00020000L43 #define VOS_OS2320x00030000L44 #define VOS_NT0x00040000L40 #define VOS_UNKNOWN 0x00000000L 41 #define VOS_DOS 0x00010000L 42 #define VOS_OS216 0x00020000L 43 #define VOS_OS232 0x00030000L 44 #define VOS_NT 0x00040000L 45 45 46 46 /* minor os version */ 47 #define VOS__BASE0x00000000L48 #define VOS__WINDOWS160x00000001L49 #define VOS__PM160x00000002L50 #define VOS__PM320x00000003L51 #define VOS__WINDOWS320x00000004L47 #define VOS__BASE 0x00000000L 48 #define VOS__WINDOWS16 0x00000001L 49 #define VOS__PM16 0x00000002L 50 #define VOS__PM32 0x00000003L 51 #define VOS__WINDOWS32 0x00000004L 52 52 53 53 /* possible versions */ 54 #define VOS_DOS_WINDOWS16(VOS_DOS|VOS__WINDOWS16)55 #define VOS_DOS_WINDOWS32(VOS_DOS|VOS__WINDOWS32)56 #define VOS_OS216_PM16(VOS_OS216|VOS__PM16)57 #define VOS_OS232_PM32(VOS_OS232|VOS__PM32)58 #define VOS_NT_WINDOWS32(VOS_NT|VOS__WINDOWS32)54 #define VOS_DOS_WINDOWS16 (VOS_DOS|VOS__WINDOWS16) 55 #define VOS_DOS_WINDOWS32 (VOS_DOS|VOS__WINDOWS32) 56 #define VOS_OS216_PM16 (VOS_OS216|VOS__PM16) 57 #define VOS_OS232_PM32 (VOS_OS232|VOS__PM32) 58 #define VOS_NT_WINDOWS32 (VOS_NT|VOS__WINDOWS32) 59 59 60 60 /* VS_VERSION.dwFileType */ 61 #define VFT_UNKNOWN0x00000000L62 #define VFT_APP0x00000001L63 #define VFT_DLL0x00000002L64 #define VFT_DRV0x00000003L65 #define VFT_FONT0x00000004L66 #define VFT_VXD0x00000005L67 /* ??one type missing?? 68 #define VFT_STATIC_LIB0x00000007L61 #define VFT_UNKNOWN 0x00000000L 62 #define VFT_APP 0x00000001L 63 #define VFT_DLL 0x00000002L 64 #define VFT_DRV 0x00000003L 65 #define VFT_FONT 0x00000004L 66 #define VFT_VXD 0x00000005L 67 /* ??one type missing?? 0x00000006L -Marcus */ 68 #define VFT_STATIC_LIB 0x00000007L 69 69 70 70 /* VS_VERSION.dwFileSubtype for VFT_DRV */ 71 #define VFT2_UNKNOWN0x00000000L72 #define VFT2_DRV_PRINTER0x00000001L73 #define VFT2_DRV_KEYBOARD0x00000002L74 #define VFT2_DRV_LANGUAGE0x00000003L75 #define VFT2_DRV_DISPLAY0x00000004L76 #define VFT2_DRV_MOUSE0x00000005L77 #define VFT2_DRV_NETWORK0x00000006L78 #define VFT2_DRV_SYSTEM0x00000007L79 #define VFT2_DRV_INSTALLABLE0x00000008L80 #define VFT2_DRV_SOUND0x00000009L81 #define VFT2_DRV_COMM0x0000000aL82 #define VFT2_DRV_INPUTMETHOD0x0000000bL71 #define VFT2_UNKNOWN 0x00000000L 72 #define VFT2_DRV_PRINTER 0x00000001L 73 #define VFT2_DRV_KEYBOARD 0x00000002L 74 #define VFT2_DRV_LANGUAGE 0x00000003L 75 #define VFT2_DRV_DISPLAY 0x00000004L 76 #define VFT2_DRV_MOUSE 0x00000005L 77 #define VFT2_DRV_NETWORK 0x00000006L 78 #define VFT2_DRV_SYSTEM 0x00000007L 79 #define VFT2_DRV_INSTALLABLE 0x00000008L 80 #define VFT2_DRV_SOUND 0x00000009L 81 #define VFT2_DRV_COMM 0x0000000aL 82 #define VFT2_DRV_INPUTMETHOD 0x0000000bL 83 83 84 84 /* VS_VERSION.dwFileSubtype for VFT_FONT */ 85 #define VFT2_FONT_RASTER0x00000001L86 #define VFT2_FONT_VECTOR0x00000002L87 #define VFT2_FONT_TRUETYPE0x00000003L85 #define VFT2_FONT_RASTER 0x00000001L 86 #define VFT2_FONT_VECTOR 0x00000002L 87 #define VFT2_FONT_TRUETYPE 0x00000003L 88 88 89 89 /* VerFindFile Flags */ 90 91 #define VFFF_ISSHAREDFILE0x000192 93 94 #define VFF_CURNEDEST0x000195 #define VFF_FILEINUSE0x000296 #define VFF_BUFFTOOSMALL0x000490 /* input */ 91 #define VFFF_ISSHAREDFILE 0x0001 92 93 /* output (returned) */ 94 #define VFF_CURNEDEST 0x0001 95 #define VFF_FILEINUSE 0x0002 96 #define VFF_BUFFTOOSMALL 0x0004 97 97 98 98 /* VerInstallFile Flags */ 99 100 #define VIFF_FORCEINSTALL0x0001101 #define VIFF_DONTDELETEOLD0x0002102 103 104 #define VIF_TEMPFILE0x00000001L105 #define VIF_MISMATCH0x00000002L106 #define VIF_SRCOLD0x00000004L107 #define VIF_DIFFLANG0x00000008L108 #define VIF_DIFFCODEPG0x00000010L109 #define VIF_DIFFTYPE0x00000020L110 #define VIF_WRITEPROT0x00000040L111 #define VIF_FILEINUSE0x00000080L112 #define VIF_OUTOFSPACE0x00000100L113 #define VIF_ACCESSVIOLATION0x00000200L114 #define VIF_SHARINGVIOLATION0x00000400L115 #define VIF_CANNOTCREATE0x00000800L116 #define VIF_CANNOTDELETE0x00001000L117 #define VIF_CANNOTRENAME0x00002000L118 #define VIF_CANNOTDELETECUR0x00004000L119 #define VIF_OUTOFMEMORY0x00008000L120 #define VIF_CANNOTREADSRC0x00010000L121 #define VIF_CANNOTREADDST0x00020000L122 #define VIF_BUFFTOOSMALL0x00040000L99 /* input */ 100 #define VIFF_FORCEINSTALL 0x0001 101 #define VIFF_DONTDELETEOLD 0x0002 102 103 /* output (return) */ 104 #define VIF_TEMPFILE 0x00000001L 105 #define VIF_MISMATCH 0x00000002L 106 #define VIF_SRCOLD 0x00000004L 107 #define VIF_DIFFLANG 0x00000008L 108 #define VIF_DIFFCODEPG 0x00000010L 109 #define VIF_DIFFTYPE 0x00000020L 110 #define VIF_WRITEPROT 0x00000040L 111 #define VIF_FILEINUSE 0x00000080L 112 #define VIF_OUTOFSPACE 0x00000100L 113 #define VIF_ACCESSVIOLATION 0x00000200L 114 #define VIF_SHARINGVIOLATION 0x00000400L 115 #define VIF_CANNOTCREATE 0x00000800L 116 #define VIF_CANNOTDELETE 0x00001000L 117 #define VIF_CANNOTRENAME 0x00002000L 118 #define VIF_CANNOTDELETECUR 0x00004000L 119 #define VIF_OUTOFMEMORY 0x00008000L 120 #define VIF_CANNOTREADSRC 0x00010000L 121 #define VIF_CANNOTREADDST 0x00020000L 122 #define VIF_BUFFTOOSMALL 0x00040000L 123 123 124 124 typedef struct tagVS_FIXEDFILEINFO { 125 126 127 128 129 130 131 132 133 134 135 136 137 125 DWORD dwSignature; 126 DWORD dwStrucVersion; 127 DWORD dwFileVersionMS; 128 DWORD dwFileVersionLS; 129 DWORD dwProductVersionMS; 130 DWORD dwProductVersionLS; 131 DWORD dwFileFlagsMask; 132 DWORD dwFileFlags; 133 DWORD dwFileOS; 134 DWORD dwFileType; 135 DWORD dwFileSubtype; 136 DWORD dwFileDateMS; 137 DWORD dwFileDateLS; 138 138 } VS_FIXEDFILEINFO; 139 139 … … 193 193 /* function prototypes */ 194 194 195 DWORD WINAPI VerFindFile16(UINT16,LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16*,LPSTR,UINT16*); 196 DWORD WINAPI VerFindFileA(UINT,LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT*,LPSTR,UINT*); 197 DWORD WINAPI VerFindFileW(UINT,LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT*,LPWSTR,UINT*); 198 #define VerFindFile WINELIB_NAME_AW(VerFindFile) 199 DWORD WINAPI VerInstallFile16(UINT16,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16*); 200 DWORD WINAPI VerInstallFileA(UINT,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT*); 201 DWORD WINAPI VerInstallFileW(UINT,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT*); 202 #define VerInstallFile WINELIB_NAME_AW(VerInstallFile) 203 DWORD WINAPI VerLanguageName16(UINT16,LPSTR,UINT16); 204 DWORD WINAPI VerQueryValue16(SEGPTR,LPCSTR,SEGPTR*,UINT16*); 205 DWORD WINAPI VerQueryValueA(LPVOID,LPCSTR,LPVOID*,UINT*); 206 DWORD WINAPI VerQueryValueW(LPVOID,LPCWSTR,LPVOID*,UINT*); 207 #define VerQueryValue WINELIB_NAME_AW(VerQueryValue) 208 DWORD WINAPI GetFileVersionInfoSize16(LPCSTR,LPDWORD); 209 DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR,LPDWORD); 210 DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR,LPDWORD); 211 #define GetFileVersionInfoSize WINELIB_NAME_AW(GetFileVersionInfoSize) 212 DWORD WINAPI GetFileVersionInfo16(LPCSTR,DWORD,DWORD,LPVOID); 213 DWORD WINAPI GetFileVersionInfoA(LPCSTR,DWORD,DWORD,LPVOID); 214 DWORD WINAPI GetFileVersionInfoW(LPCWSTR,DWORD,DWORD,LPVOID); 215 #define GetFileVersionInfo WINELIB_NAME_AW(GetFileVersionInfo) 195 DWORD WINAPI VerFindFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,PUINT,LPSTR,PUINT); 196 DWORD WINAPI VerFindFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT); 197 DWORD WINAPI VerInstallFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,PUINT); 198 DWORD WINAPI VerInstallFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT); 199 BOOL WINAPI VerQueryValueA(LPVOID,LPSTR,LPVOID*,PUINT); 200 BOOL WINAPI VerQueryValueW(LPVOID,LPWSTR,LPVOID*,PUINT); 201 DWORD WINAPI GetFileVersionInfoSizeA(LPSTR,LPDWORD); 202 DWORD WINAPI GetFileVersionInfoSizeW(LPWSTR,LPDWORD); 203 BOOL WINAPI GetFileVersionInfoA(LPSTR,DWORD,DWORD,LPVOID); 204 BOOL WINAPI GetFileVersionInfoW(LPWSTR,DWORD,DWORD,LPVOID); 205 DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD); 206 DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD); 216 207 217 208 /* 20 GETFILEVERSIONINFORAW */
Note:
See TracChangeset
for help on using the changeset viewer.