| 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 |
|
|---|
| 13 | char *OSLibGetDllName(ULONG hModule);
|
|---|
| 14 | BOOL OSLibGetDllName(ULONG hModule, char *name, int length);
|
|---|
| 15 |
|
|---|
| 16 | #ifdef __cplusplus
|
|---|
| 17 | extern "C" {
|
|---|
| 18 | #endif
|
|---|
| 19 |
|
|---|
| 20 | char *OSLibStripPath(char *path);
|
|---|
| 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 |
|
|---|
| 31 | //******************************************************************************
|
|---|
| 32 | // Turn off hard errors & exception popups
|
|---|
| 33 | //******************************************************************************
|
|---|
| 34 | BOOL OSLibDisablePopups();
|
|---|
| 35 |
|
|---|
| 36 | #define TIB_STACKTOP 0
|
|---|
| 37 | #define TIB_STACKLOW 1
|
|---|
| 38 |
|
|---|
| 39 | ULONG 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 |
|
|---|
| 49 | ULONG OSLibGetPIB(int iPIB);
|
|---|
| 50 |
|
|---|
| 51 | ULONG OSLibAllocThreadLocalMemory(int nrdwords);
|
|---|
| 52 |
|
|---|
| 53 | ULONG OSLibWinInitialize();
|
|---|
| 54 | ULONG OSLibWinQueryMsgQueue(ULONG hab);
|
|---|
| 55 | ULONG 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 |
|
|---|
| 100 | ULONG OSLibQueryCountry();
|
|---|
| 101 |
|
|---|
| 102 | void OSLibSetBeginLibpath(char *lpszBeginlibpath);
|
|---|
| 103 | void OSLibQueryBeginLibpath(char *lpszBeginlibpath, int size);
|
|---|
| 104 |
|
|---|
| 105 | ULONG OSLibImSetMsgQueueProperty( ULONG hmq, ULONG ulFlag );
|
|---|
| 106 |
|
|---|
| 107 | #ifdef __cplusplus
|
|---|
| 108 | }
|
|---|
| 109 | #endif
|
|---|
| 110 |
|
|---|
| 111 | #endif
|
|---|