source: trunk/src/version/version.cpp@ 6496

Last change on this file since 6496 was 5472, checked in by sandervl, 24 years ago

compile fix

File size: 1.5 KB
Line 
1/* $Id: version.cpp,v 1.11 2001-04-04 09:02:16 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#include <unicode.h>
26
27ODINDEBUGCHANNEL(VERSION)
28
29BOOL GetFileVersionInfoA(LPSTR lpszFile, DWORD dwHandle, DWORD cbBuf, LPVOID lpvData)
30{
31 return GetVersionStruct((char *)lpszFile,
32 (char *)lpvData,
33 cbBuf);
34}
35
36BOOL GetFileVersionInfoW(LPWSTR lpszFile, DWORD dwHandle, DWORD cbBuf, LPVOID lpvData)
37{
38 BOOL rc;
39 char *astring = UnicodeToAsciiString(lpszFile);
40
41 rc = GetVersionStruct(astring, (char *)lpvData, cbBuf);
42 FreeAsciiString(astring);
43 return(rc);
44}
45
46DWORD GetFileVersionInfoSizeA(LPSTR lpszFile, LPDWORD lpdwHandle)
47{
48 if(lpdwHandle)
49 *lpdwHandle = 0; //SvL: Set contents to 0
50
51 return GetVersionSize(lpszFile);
52}
53
54
55DWORD GetFileVersionInfoSizeW(LPWSTR lpszFile, LPDWORD lpdwHandle)
56{
57 char *astring = UnicodeToAsciiString((LPWSTR)lpszFile);
58 DWORD rc;
59
60 if(lpdwHandle)
61 *lpdwHandle = 0; //SvL: Set contents to 0
62
63 rc = GetVersionSize(astring);
64 FreeAsciiString(astring);
65 return(rc);
66}
67
68
69
Note: See TracBrowser for help on using the repository browser.