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

Last change on this file since 46 was 46, checked in by sandervl, 26 years ago

* empty log message *

File size: 1.7 KB
Line 
1/*
2 * PE2LX String conversion
3 *
4 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
5 *
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10#define INCL_DOSFILEMGR /* File Manager values */
11#define INCL_DOSERRORS /* DOS Error values */
12#define INCL_DOSPROCESS /* DOS Process values */
13#define INCL_DOSMISC /* DOS Miscellanous values */
14#define INCL_WIN
15#include <os2.h>
16#include <stdio.h>
17#include <string.h>
18#include <stdlib.h>
19#include <iostream.h>
20#include <string.h>
21#include "lx.h"
22#include "strings.h"
23#include "misc.h"
24
25//******************************************************************************
26//Save as RCDATA and make sure the kernel API's don't use the Open32 string
27//retrieval stuff
28//OS/2 strings are stored in a similar way as windows strings with the
29//important difference that OS/2 strings can only be 256 bytes long
30//whereas windows strings can be up to 64k bytes long
31//******************************************************************************
32void ShowStrings(int id, char *data, int size)
33{
34USHORT *len;
35int i;
36
37 cout << "String Table resource with id " << id << ", size " << size << endl;
38
39 len = (USHORT *)data;
40 for(i=0;i<16;i++) {
41// if(*len != 0) {//skip NULL strings
42 cout << "String " << (id-1)*16+i << " " << UnicodeToAscii((*len), len+1) << endl;
43 OS2Exe.StoreResource((id-1)*16+i, RT_RCDATA, (*len)*2 + 2, (char *)len);
44// }
45 len += *len + 1;
46 }
47}
48//******************************************************************************
49//******************************************************************************
Note: See TracBrowser for help on using the repository browser.