source: trunk/src/kernel32/oslibmisc.h@ 22040

Last change on this file since 22040 was 22040, checked in by dmik, 13 years ago

kernel32: Fix Win32ImageBase::matchModName().

As opposed to the declared functionality, it was comparing the name part
of the argument with the full path of the stored module name and this would
obviously not work if the module name were a full path.

One of the failig cases was a frequent attempt to retrieve the resources of the
current executable by doing LoadLibraryEx() with the full executable name.

File size: 3.5 KB
Line 
1/* $Id: oslibmisc.h,v 1.14 2004-05-24 08:56:07 sandervl Exp $ */
2/*
3 * Misc util. procedures
4 *
5 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
6 * Copyright 1998 Peter FitzSimmons
7 * Copyright 1998 Patrick Haller
8 *
9 */
10#ifndef __OSLIBMISC_H__
11#define __OSLIBMISC_H__
12
13char *OSLibGetDllName(ULONG hModule);
14BOOL OSLibGetDllName(ULONG hModule, char *name, int length);
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20const char *OSLibStripPath(const char *path);
21
22ULONG OSLibiGetModuleHandleA(char *pszModule);
23ULONG OSLibQueryModuleHandle(char *modname);
24
25void OSLibWait(ULONG msec);
26
27ULONG OSLibAllocSel(ULONG size, USHORT *selector);
28ULONG OSLibFreeSel(USHORT selector);
29PVOID OSLibSelToFlat(USHORT selector);
30
31//******************************************************************************
32// Turn off hard errors & exception popups
33//******************************************************************************
34BOOL OSLibDisablePopups();
35
36#define TIB_STACKTOP 0
37#define TIB_STACKLOW 1
38
39ULONG OSLibGetTIB(int tiboff);
40
41#define PIB_HMTE 0
42#define PIB_TASKHNDL PIB_HMTE
43#define PIB_TASKTYPE 1
44#define PIB_PCHCMD 2
45
46#define TASKTYPE_PM 0
47#define TASKTYPE_VIO 1
48
49ULONG OSLibGetPIB(int iPIB);
50
51ULONG OSLibAllocThreadLocalMemory(int nrdwords);
52
53ULONG OSLibWinInitialize();
54ULONG OSLibWinQueryMsgQueue(ULONG hab);
55ULONG OSLibWinSetCp(ULONG hmq, ULONG codepage);
56
57//#define CTRY_NONE 0
58#define CTRY_USA 1
59#define CTRY_CANADA 2
60#define CTRY_LATIN_AMERICA 3
61#define CTRY_RUSSIA 7
62#define CTRY_GREECE 30
63#define CTRY_NETHERLANDS 31
64#define CTRY_BELGIUM 32
65#define CTRY_FRANCE 33
66#define CTRY_SPAIN 34
67#define CTRY_ITALY 39
68#define CTRY_SWITZERLAND 41
69#define CTRY_AUSTRIA 43
70#define CTRY_UNITED_KINGDOM 44
71#define CTRY_DENMARK 45
72#define CTRY_SWEDEN 46
73#define CTRY_NORWAY 47
74#define CTRY_POLAND 48
75#define CTRY_GERMANY 49
76#define CTRY_MEXICO 52
77#define CTRY_BRAZIL 55
78#define CTRY_AUSTRALIA 61
79#define CTRY_NEW_ZEALAND 64
80#define CTRY_SINGAPORE 65
81#define CTRY_JAPAN 81
82#define CTRY_KOREA 82
83#define CTRY_CHINA 86
84#define CTRY_TAIWAN 88
85#define CTRY_TURKEY 90
86#define CTRY_PORTUGAL 351
87#define CTRY_LUXEMBOURG 352
88#define CTRY_IRELAND 353
89#define CTRY_ICELAND 354
90#define CTRY_FINLAND 358
91#define CTRY_BULGARIA 359
92#define CTRY_UKRAINE 380
93#define CTRY_CROATIA 385
94#define CTRY_SLOVENIA 386
95#define CTRY_CZECH_REPUBLIC 421
96#define CTRY_SLOVAK_REPUBLIC 422
97#define CTRY_HONG_KONG 852
98//#define CTRY_TAIWAN 886
99
100ULONG OSLibQueryCountry();
101
102void OSLibSetBeginLibpath(char *lpszBeginlibpath);
103void OSLibQueryBeginLibpath(char *lpszBeginlibpath, int size);
104
105ULONG OSLibImSetMsgQueueProperty( ULONG hmq, ULONG ulFlag );
106
107#ifdef __cplusplus
108}
109#endif
110
111#ifdef __cplusplus
112inline char *OSLibStripPath(char *path)
113{
114 return (char *)OSLibStripPath((const char *)path);
115}
116#endif
117
118#endif
Note: See TracBrowser for help on using the repository browser.