source: trunk/src/win32k/pe2lx/strings.cpp@ 847

Last change on this file since 847 was 847, checked in by bird, 26 years ago

Initial checkin of Win32k. (not tested & pe2lx not up-to-date!)

File size: 1.7 KB
Line 
1/* $Id: strings.cpp,v 1.1 1999-09-06 02:20:08 bird Exp $ */
2
3/*
4 * PE2LX String conversion
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12
13/*******************************************************************************
14* Header Files *
15*******************************************************************************/
16#include "pe2lx.h"
17#include "strings.h"
18
19
20//******************************************************************************
21//Save as RCDATA and make sure the kernel API's don't use the Open32 string
22//retrieval stuff
23//OS/2 strings are stored in a similar way as windows strings with the
24//important difference that OS/2 strings can only be 256 bytes long
25//whereas windows strings can be up to 64k bytes long
26//******************************************************************************
27BOOL ShowStrings(LXHeaderSuper &OS2Exe, int id, char *data, int size, int cp)
28{
29 USHORT *len;
30 int i;
31 BOOL rc = TRUE;
32 ltassert((ULONG)data > MINPTR && (ULONG)data+size < MAXPTR)
33
34 cout << "String Table resource with id " << id << ", size " << size << endl;
35
36 len = (USHORT *)data;
37 for (i=0;i<16 && rc;i++)
38 {
39 cout << "String " << (id-1)*16+i << " "<< *len << " " << UnicodeToAscii(*len, len+1, cp);
40 rc = OS2Exe.StoreResource((id-1)*16+i, RT_RCDATA, (*len)*2 + 2, (char *)len);
41 len += *len + 1;
42 }
43 return rc;
44}
45//******************************************************************************
46//******************************************************************************
Note: See TracBrowser for help on using the repository browser.