[10606] | 1 | /* $Id: oslibmisc.h,v 1.14 2004-05-24 08:56:07 sandervl Exp $ */
|
---|
[705] | 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 |
|
---|
| 13 | char *OSLibGetDllName(ULONG hModule);
|
---|
[3993] | 14 | BOOL OSLibGetDllName(ULONG hModule, char *name, int length);
|
---|
[705] | 15 |
|
---|
[9617] | 16 | #ifdef __cplusplus
|
---|
| 17 | extern "C" {
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
[22040] | 20 | const char *OSLibStripPath(const char *path);
|
---|
[705] | 21 |
|
---|
| 22 | ULONG OSLibiGetModuleHandleA(char *pszModule);
|
---|
| 23 | ULONG OSLibQueryModuleHandle(char *modname);
|
---|
| 24 |
|
---|
| 25 | void OSLibWait(ULONG msec);
|
---|
| 26 |
|
---|
| 27 | ULONG OSLibAllocSel(ULONG size, USHORT *selector);
|
---|
| 28 | ULONG OSLibFreeSel(USHORT selector);
|
---|
| 29 | PVOID OSLibSelToFlat(USHORT selector);
|
---|
| 30 |
|
---|
[9890] | 31 | //******************************************************************************
|
---|
| 32 | // Turn off hard errors & exception popups
|
---|
| 33 | //******************************************************************************
|
---|
| 34 | BOOL OSLibDisablePopups();
|
---|
| 35 |
|
---|
[10606] | 36 | #define TIB_STACKTOP 0
|
---|
| 37 | #define TIB_STACKLOW 1
|
---|
[705] | 38 |
|
---|
| 39 | ULONG OSLibGetTIB(int tiboff);
|
---|
| 40 |
|
---|
[4235] | 41 | #define PIB_HMTE 0
|
---|
[10606] | 42 | #define PIB_TASKHNDL PIB_HMTE
|
---|
[705] | 43 | #define PIB_TASKTYPE 1
|
---|
[4235] | 44 | #define PIB_PCHCMD 2
|
---|
[705] | 45 |
|
---|
[10606] | 46 | #define TASKTYPE_PM 0
|
---|
[4235] | 47 | #define TASKTYPE_VIO 1
|
---|
[705] | 48 |
|
---|
[4235] | 49 | ULONG OSLibGetPIB(int iPIB);
|
---|
[705] | 50 |
|
---|
| 51 | ULONG OSLibAllocThreadLocalMemory(int nrdwords);
|
---|
| 52 |
|
---|
[2311] | 53 | ULONG OSLibWinInitialize();
|
---|
| 54 | ULONG OSLibWinQueryMsgQueue(ULONG hab);
|
---|
[9582] | 55 | ULONG OSLibWinSetCp(ULONG hmq, ULONG codepage);
|
---|
[2311] | 56 |
|
---|
[7963] | 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
|
---|
[10339] | 92 | #define CTRY_UKRAINE 380
|
---|
[7963] | 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
|
---|
[10339] | 98 | //#define CTRY_TAIWAN 886
|
---|
[3501] | 99 |
|
---|
| 100 | ULONG OSLibQueryCountry();
|
---|
| 101 |
|
---|
[21302] | 102 | void OSLibSetBeginLibpath(char *lpszBeginlibpath);
|
---|
| 103 | void OSLibQueryBeginLibpath(char *lpszBeginlibpath, int size);
|
---|
[10606] | 104 |
|
---|
[21308] | 105 | ULONG OSLibImSetMsgQueueProperty( ULONG hmq, ULONG ulFlag );
|
---|
| 106 |
|
---|
[9617] | 107 | #ifdef __cplusplus
|
---|
| 108 | }
|
---|
[705] | 109 | #endif
|
---|
[9617] | 110 |
|
---|
[22040] | 111 | #ifdef __cplusplus
|
---|
| 112 | inline char *OSLibStripPath(char *path)
|
---|
| 113 | {
|
---|
| 114 | return (char *)OSLibStripPath((const char *)path);
|
---|
| 115 | }
|
---|
[9617] | 116 | #endif
|
---|
[22040] | 117 |
|
---|
| 118 | #endif
|
---|