source: trunk/src/pe2lx/strings.cpp@ 97

Last change on this file since 97 was 97, checked in by phaller, 26 years ago

Add: added cvs variable $Id$ to source files.

File size: 1.7 KB
Line 
1/* $Id: strings.cpp,v 1.3 1999-06-10 17:08:55 phaller 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#define INCL_DOSFILEMGR /* File Manager values */
13#define INCL_DOSERRORS /* DOS Error values */
14#define INCL_DOSPROCESS /* DOS Process values */
15#define INCL_DOSMISC /* DOS Miscellanous values */
16#define INCL_WIN
17#include <os2.h>
18#include <stdio.h>
19#include <string.h>
20#include <stdlib.h>
21#include <iostream.h>
22#include <string.h>
23#include "lx.h"
24#include "strings.h"
25#include "misc.h"
26
27//******************************************************************************
28//Save as RCDATA and make sure the kernel API's don't use the Open32 string
29//retrieval stuff
30//OS/2 strings are stored in a similar way as windows strings with the
31//important difference that OS/2 strings can only be 256 bytes long
32//whereas windows strings can be up to 64k bytes long
33//******************************************************************************
34void ShowStrings(int id, char *data, int size)
35{
36USHORT *len;
37int i;
38
39 cout << "String Table resource with id " << id << ", size " << size << endl;
40
41 len = (USHORT *)data;
42 for(i=0;i<16;i++) {
43// if(*len != 0) {//skip NULL strings
44 cout << "String " << (id-1)*16+i << " " << UnicodeToAscii((*len), len+1) << endl;
45 OS2Exe.StoreResource((id-1)*16+i, RT_RCDATA, (*len)*2 + 2, (char *)len);
46// }
47 len += *len + 1;
48 }
49}
50//******************************************************************************
51//******************************************************************************
Note: See TracBrowser for help on using the repository browser.