Line | |
---|
1 | /* $Id: nameid.cpp,v 1.1 1999-09-15 23:32:58 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Resource id to name id conversion procedures
|
---|
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_BASE
|
---|
13 | #define INCL_WIN
|
---|
14 | #define INCL_WINERRORS
|
---|
15 | #define INCL_DOSFILEMGR
|
---|
16 | #include <os2wrap.h> //Odin32 OS/2 api wrappers
|
---|
17 | #include <stdio.h>
|
---|
18 | #include <stdlib.h>
|
---|
19 | #include <string.h>
|
---|
20 | #include <win32type.h>
|
---|
21 | #include <misc.h>
|
---|
22 | #include "nameid.h"
|
---|
23 | #include "win32util.h"
|
---|
24 | #include <winimage.h>
|
---|
25 | #include <winexe.h>
|
---|
26 |
|
---|
27 | /******************************************************************************/
|
---|
28 | /******************************************************************************/
|
---|
29 | int SYSTEM EXPORT ConvertNameId(ULONG hmod, char *name)
|
---|
30 | {
|
---|
31 | Win32Dll *module;
|
---|
32 |
|
---|
33 | dprintf(("Convert %s in mod %X to id\n", name, hmod ));
|
---|
34 |
|
---|
35 | if(hmod == 0 || hmod == -1 || hmod == WinExe->getInstanceHandle() )
|
---|
36 | {
|
---|
37 | return WinExe->convertNameId(name);
|
---|
38 | }
|
---|
39 |
|
---|
40 | module = Win32Dll::findModule(hmod);
|
---|
41 | if(module == 0)
|
---|
42 | {
|
---|
43 | dprintf(("ConvertNameId: module %X not found\n", hmod));
|
---|
44 | return(0);
|
---|
45 | }
|
---|
46 | return module->convertNameId(name);
|
---|
47 | }
|
---|
48 | //******************************************************************************
|
---|
49 | //******************************************************************************
|
---|
Note:
See
TracBrowser
for help on using the repository browser.