1 | /* $Id: version.cpp,v 1.10 2000-08-11 10:56:26 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 | #include <versionos2.h>
|
---|
25 |
|
---|
26 | ODINDEBUGCHANNEL(VERSION)
|
---|
27 |
|
---|
28 | BOOL GetFileVersionInfoA(LPSTR lpszFile, DWORD dwHandle, DWORD cbBuf, LPVOID lpvData)
|
---|
29 | {
|
---|
30 | return GetVersionStruct((char *)lpszFile,
|
---|
31 | (char *)lpvData,
|
---|
32 | cbBuf);
|
---|
33 | }
|
---|
34 |
|
---|
35 | BOOL GetFileVersionInfoW(LPWSTR lpszFile, DWORD dwHandle, DWORD cbBuf, LPVOID lpvData)
|
---|
36 | {
|
---|
37 | BOOL rc;
|
---|
38 | char *astring = UnicodeToAsciiString(lpszFile);
|
---|
39 |
|
---|
40 | rc = GetVersionStruct(astring, (char *)lpvData, cbBuf);
|
---|
41 | FreeAsciiString(astring);
|
---|
42 | return(rc);
|
---|
43 | }
|
---|
44 |
|
---|
45 | DWORD GetFileVersionInfoSizeA(LPSTR lpszFile, LPDWORD lpdwHandle)
|
---|
46 | {
|
---|
47 | if(lpdwHandle)
|
---|
48 | *lpdwHandle = 0; //SvL: Set contents to 0
|
---|
49 |
|
---|
50 | return GetVersionSize(lpszFile);
|
---|
51 | }
|
---|
52 |
|
---|
53 |
|
---|
54 | DWORD GetFileVersionInfoSizeW(LPWSTR lpszFile, LPDWORD lpdwHandle)
|
---|
55 | {
|
---|
56 | char *astring = UnicodeToAsciiString((LPWSTR)lpszFile);
|
---|
57 | DWORD rc;
|
---|
58 |
|
---|
59 | if(lpdwHandle)
|
---|
60 | *lpdwHandle = 0; //SvL: Set contents to 0
|
---|
61 |
|
---|
62 | rc = GetVersionSize(astring);
|
---|
63 | FreeAsciiString(astring);
|
---|
64 | return(rc);
|
---|
65 | }
|
---|
66 |
|
---|
67 |
|
---|
68 |
|
---|