source: trunk/src/kernel32/ordinals.cpp@ 5280

Last change on this file since 5280 was 4867, checked in by sandervl, 25 years ago

added ordinal 100 export, fixed export @99, don't export odin functions by name

File size: 4.1 KB
Line 
1
2/*
3 * Win32 KERNEL32 Subsystem for OS/2
4 *
5 * 2000/11/10 PH Patrick Haller (patrick.haller@innotek.de)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11/*****************************************************************************
12 * Includes *
13 *****************************************************************************/
14#include <os2win.h>
15#include <winnls.h>
16#include "unicode.h"
17#include <builtin.h>
18#include "handlemanager.h"
19#include <string.h>
20
21#include "stubs.h"
22
23#define DBG_LOCALLOG DBG_stubs
24#include "dbglocal.h"
25
26
27/*****************************************************************************
28 * Defines *
29 *****************************************************************************/
30
31/*****************************************************************************
32 * Structures *
33 *****************************************************************************/
34
35
36
37/*****************************************************************************
38 * Prototypes *
39 *****************************************************************************/
40
41/*****************************************************************************
42 * Name : ???
43 * Purpose : Unknown (used by explorer.exe)
44 * Parameters: Unknown (wrong)
45 * Variables :
46 * Result : Unknown
47 * Remark :
48 * Status : UNTESTED STUB
49 *
50 * Author : Christoph Bratschi [Wed, 2000/03/29 19:47]
51 *****************************************************************************/
52
53DWORD WIN32API KERNEL32_99(DWORD x)
54{
55 dprintf(("KERNEL32: Unknown API KERNEL32.99\n"));
56 return 1;
57}
58
59/**********************************************************************
60 * _KERNEL32_100
61 */
62BOOL WINAPI KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x)
63{
64 dprintf(("_KERNEL32_100 (%d,%ld,0x%08lx): STUB",threadid,exitcode,x));
65 return TRUE;
66}
67
68
69/*****************************************************************************
70 * Name : NullFunction
71 * Purpose : Empty function. Such exports actually exist. (.42 .47)
72 * Parameters: Unknown (wrong)
73 * Variables :
74 * Result : Unknown
75 * Remark :
76 * Status : UNTESTED STUB
77 *
78 * Author : Patrick Haller [Wed, 2000/11/10 19:47]
79 *****************************************************************************/
80
81VOID WIN32API NullFunction(void)
82{
83 // it does actually NOTHING
84}
85
86
87/*****************************************************************************
88 * Name : KERNEL32_17
89 * Purpose : Some function dispatcher
90 * Parameters: Unknown (wrong)
91 * Variables :
92 * Result : Unknown
93 * Remark : The function table has 16 32-bit function pointer entries
94 * The function is selected by the CL register.
95 * Status : UNTESTED STUB
96 *
97 * Author : Patrick Haller [Wed, 2000/11/10 19:47]
98 *****************************************************************************/
99
100VOID WIN32API KERNEL32_17(DWORD *pFunctionTable)
101{
102 // it's some function dispatcher
103 SetLastError(0x78);
104
105 //@@@PH we should now get the correct CL value */
106 BYTE CL;
107 int ret;
108
109 switch( (CL >> 4) & 0x0f)
110 {
111 case 0x0f: ret = -1; break;
112 case 0x0e: ret = 0x78; break;
113 case 0x0d: ret = 0x32; break;
114 case 0x01: ret = 1; break;
115 default: ret = 0; break;
116 }
117
118 // select jump function
119 VOID* pfn = (VOID*)pFunctionTable[CL & 0x0F];
120 //@@@PH we'd now jump ...
121}
122
123
124/*****************************************************************************
125 * Name : KERNEL32_16
126 * Purpose : Unknown
127 * Parameters: Unknown (wrong)
128 * Variables :
129 * Result : Unknown
130 * Remark :
131 * Status : UNTESTED STUB
132 *
133 * Author : Patrick Haller [Wed, 2000/11/10 19:47]
134 *****************************************************************************/
135
136VOID WIN32API KERNEL32_16(DWORD arg1,
137 DWORD arg2,
138 DWORD arg3)
139{
140 dprintf(("KERNEL32: KERNEL32_16 (%08xh,%08xh,%08xh) not implemented\n",
141 arg1,
142 arg2,
143 arg3));
144}
Note: See TracBrowser for help on using the repository browser.