1 | /* $Id: rmcalls.h,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $ */
|
---|
2 | /*
|
---|
3 | * OS/2 Resource Manager API definitions
|
---|
4 | *
|
---|
5 | * (C) 2000-2002 InnoTek Systemberatung GmbH
|
---|
6 | *
|
---|
7 | * This program is free software; you can redistribute it and/or
|
---|
8 | * modify it under the terms of the GNU General Public License as
|
---|
9 | * published by the Free Software Foundation; either version 2 of
|
---|
10 | * the License, or (at your option) any later version.
|
---|
11 | *
|
---|
12 | * This program is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public
|
---|
18 | * License along with this program; if not, write to the Free
|
---|
19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
|
---|
20 | * USA.
|
---|
21 | *
|
---|
22 | */
|
---|
23 |
|
---|
24 | #ifndef __RM_CALLS__
|
---|
25 | #define __RM_CALLS__
|
---|
26 |
|
---|
27 | #pragma pack (1)
|
---|
28 |
|
---|
29 | #include <rmbase.h>
|
---|
30 | #include <rmioctl.h>
|
---|
31 | #include <devtype.h>
|
---|
32 |
|
---|
33 | #pragma pack ()
|
---|
34 |
|
---|
35 | #ifdef __cplusplus
|
---|
36 | extern "C" {
|
---|
37 | #endif
|
---|
38 |
|
---|
39 | #ifndef APIRET
|
---|
40 | #define APIRET ULONG
|
---|
41 | #endif
|
---|
42 |
|
---|
43 | #ifndef CDECL
|
---|
44 | #define CDECL _cdecl
|
---|
45 | #endif
|
---|
46 |
|
---|
47 | APIRET CDECL RMCreateDriver(FARPTR16, FARPTR16);
|
---|
48 |
|
---|
49 | APIRET CDECL RMDestroyDriver(HDRIVER hDriver);
|
---|
50 |
|
---|
51 | APIRET CDECL RMCreateAdapter(HDRIVER hDriver, FARPTR16 phAdapter,
|
---|
52 | FARPTR16 pAdapterStruct, HDEVICE hDevice,
|
---|
53 | FARPTR16 pahResource);
|
---|
54 |
|
---|
55 | APIRET CDECL RMDestroyAdapter(HDRIVER hDriver, HADAPTER hAdapter);
|
---|
56 |
|
---|
57 | APIRET CDECL RMCreateDevice(HDRIVER hDriver, FARPTR16 phDevice,
|
---|
58 | FARPTR16 pDeviceStruct, HADAPTER hAdapter,
|
---|
59 | FARPTR16 pahResource);
|
---|
60 |
|
---|
61 | APIRET CDECL RMAllocResource(HDRIVER hDriver, FARPTR16 phResource,
|
---|
62 | FARPTR16 pResourceStruct);
|
---|
63 |
|
---|
64 | APIRET CDECL RMDeallocResource(HDRIVER hDriver, HRESOURCE hResource);
|
---|
65 |
|
---|
66 | APIRET CDECL RMGetNodeInfo(RMHANDLE RMHandle,
|
---|
67 | FARPTR16 pNodeInfo,
|
---|
68 | USHORT BufferSize);
|
---|
69 |
|
---|
70 | APIRET CDECL RMDevIDToHandleList(RMHANDLE RMHandle,
|
---|
71 | DEVID DeviceID,
|
---|
72 | DEVID FunctionID,
|
---|
73 | DEVID CompatibleID,
|
---|
74 | VENDID VendorID,
|
---|
75 | SERNUM SerialNumber,
|
---|
76 | SEARCHIDFLAGS SearchFlags,
|
---|
77 | HDETECTED hStartNode,
|
---|
78 | FARPTR16 pHndList);
|
---|
79 |
|
---|
80 | APIRET CDECL RMHandleToResourceHandleList(RMHANDLE hHandle,
|
---|
81 | FARPTR16 pHndList);
|
---|
82 |
|
---|
83 | #ifdef __cplusplus
|
---|
84 | };
|
---|
85 | #endif
|
---|
86 |
|
---|
87 | /****************************************************************************/
|
---|
88 | /* */
|
---|
89 | /* Resource Manager Return Codes */
|
---|
90 | /* */
|
---|
91 | /****************************************************************************/
|
---|
92 | #define RMRC_SUCCESS 0x0000
|
---|
93 | #define RMRC_NOTINITIALIZED 0x0001
|
---|
94 | #define RMRC_BAD_DRIVERHANDLE 0x0002
|
---|
95 | #define RMRC_BAD_ADAPTERHANDLE 0x0003
|
---|
96 | #define RMRC_BAD_DEVICEHANDLE 0x0004
|
---|
97 | #define RMRC_BAD_RESOURCEHANDLE 0x0005
|
---|
98 | #define RMRC_BAD_LDEVHANDLE 0x0006
|
---|
99 | #define RMRC_BAD_SYSNAMEHANDLE 0x0007
|
---|
100 | #define RMRC_BAD_DEVHELP 0x0008
|
---|
101 | #define RMRC_NULL_POINTER 0x0009
|
---|
102 | #define RMRC_NULL_STRINGS 0x000a
|
---|
103 | #define RMRC_BAD_VERSION 0x000b
|
---|
104 | #define RMRC_RES_ALREADY_CLAIMED 0x000c
|
---|
105 | #define RMRC_DEV_ALREADY_CLAIMED 0x000d
|
---|
106 | #define RMRC_INVALID_PARM_VALUE 0x000e
|
---|
107 | #define RMRC_OUT_OF_MEMORY 0x000f
|
---|
108 | #define RMRC_SEARCH_FAILED 0x0010
|
---|
109 | #define RMRC_BUFFER_TOO_SMALL 0x0011
|
---|
110 | #define RMRC_GENERAL_FAILURE 0x0012
|
---|
111 | #define RMRC_IRQ_ENTRY_ILLEGAL 0x0013
|
---|
112 | #define RMRC_NOT_IMPLEMENTED 0x0014
|
---|
113 | #define RMRC_NOT_INSTALLED 0x0015
|
---|
114 | #define RMRC_BAD_DETECTHANDLE 0x0016
|
---|
115 | #define RMRC_BAD_RMHANDLE 0x0017
|
---|
116 | #define RMRC_BAD_FLAGS 0x0018
|
---|
117 | #define RMRC_NO_DETECTED_DATA 0x0019
|
---|
118 |
|
---|
119 |
|
---|
120 | /*********************/
|
---|
121 | /* RM Types */
|
---|
122 | /*********************/
|
---|
123 |
|
---|
124 | typedef struct {
|
---|
125 | UCHAR MajorVersion;
|
---|
126 | UCHAR MinorVersion;
|
---|
127 | USHORT NumRSMEntries;
|
---|
128 | } RSMVERSTRUCT;
|
---|
129 |
|
---|
130 | #endif /* __RM_CALLS__ */
|
---|