1 | /* $Id: version.cpp,v 1.9 2000-01-06 20:10:07 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 Version resource APIs for OS/2
|
---|
5 | *
|
---|
6 | * Implementation of VERSION.DLL - File Installer routines
|
---|
7 | * Copyright 1996,1997 Marcus Meissner
|
---|
8 | * Copyright 1997 David Cuthbert
|
---|
9 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
10 | *
|
---|
11 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
12 | */
|
---|
13 |
|
---|
14 |
|
---|
15 | #include <os2win.h>
|
---|
16 | #include <stdio.h>
|
---|
17 | #include <stdlib.h>
|
---|
18 | #include <string.h>
|
---|
19 | #include <odinwrap.h>
|
---|
20 | #include <misc.h>
|
---|
21 | #include <unicode.h>
|
---|
22 | #include <heapstring.h>
|
---|
23 | #include <version.h>
|
---|
24 |
|
---|
25 | ODINDEBUGCHANNEL(VERSION)
|
---|
26 |
|
---|
27 | BOOL GetFileVersionInfoA(LPSTR lpszFile, DWORD dwHandle, DWORD cbBuf, LPVOID lpvData)
|
---|
28 | {
|
---|
29 | return GetVersionStruct((char *)lpszFile,
|
---|
30 | (char *)lpvData,
|
---|
31 | cbBuf);
|
---|
32 | }
|
---|
33 |
|
---|
34 | BOOL GetFileVersionInfoW(LPWSTR lpszFile, DWORD dwHandle, DWORD cbBuf, LPVOID lpvData)
|
---|
35 | {
|
---|
36 | BOOL rc;
|
---|
37 | char *astring = UnicodeToAsciiString(lpszFile);
|
---|
38 |
|
---|
39 | rc = GetVersionStruct(astring, (char *)lpvData, cbBuf);
|
---|
40 | FreeAsciiString(astring);
|
---|
41 | return(rc);
|
---|
42 | }
|
---|
43 |
|
---|
44 | DWORD GetFileVersionInfoSizeA(LPSTR lpszFile, LPDWORD lpdwHandle)
|
---|
45 | {
|
---|
46 | if(lpdwHandle)
|
---|
47 | *lpdwHandle = 0; //SvL: Set contents to 0
|
---|
48 |
|
---|
49 | return GetVersionSize(lpszFile);
|
---|
50 | }
|
---|
51 |
|
---|
52 |
|
---|
53 | DWORD GetFileVersionInfoSizeW(LPWSTR lpszFile, LPDWORD lpdwHandle)
|
---|
54 | {
|
---|
55 | char *astring = UnicodeToAsciiString((LPWSTR)lpszFile);
|
---|
56 | DWORD rc;
|
---|
57 |
|
---|
58 | if(lpdwHandle)
|
---|
59 | *lpdwHandle = 0; //SvL: Set contents to 0
|
---|
60 |
|
---|
61 | rc = GetVersionSize(astring);
|
---|
62 | FreeAsciiString(astring);
|
---|
63 | return(rc);
|
---|
64 | }
|
---|
65 |
|
---|
66 |
|
---|
67 |
|
---|