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

Last change on this file since 4802 was 4587, checked in by phaller, 25 years ago

Added some orginal kernel functions

File size: 3.9 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
53VOID WIN32API KERNEL32_99(DWORD x)
54{
55 dprintf(("KERNEL32: Unknown API KERNEL32.99\n"));
56}
57
58
59/*****************************************************************************
60 * Name : NullFunction
61 * Purpose : Empty function. Such exports actually exist. (.42 .47)
62 * Parameters: Unknown (wrong)
63 * Variables :
64 * Result : Unknown
65 * Remark :
66 * Status : UNTESTED STUB
67 *
68 * Author : Patrick Haller [Wed, 2000/11/10 19:47]
69 *****************************************************************************/
70
71VOID WIN32API NullFunction(void)
72{
73 // it does actually NOTHING
74}
75
76
77/*****************************************************************************
78 * Name : KERNEL32_17
79 * Purpose : Some function dispatcher
80 * Parameters: Unknown (wrong)
81 * Variables :
82 * Result : Unknown
83 * Remark : The function table has 16 32-bit function pointer entries
84 * The function is selected by the CL register.
85 * Status : UNTESTED STUB
86 *
87 * Author : Patrick Haller [Wed, 2000/11/10 19:47]
88 *****************************************************************************/
89
90VOID WIN32API KERNEL32_17(DWORD *pFunctionTable)
91{
92 // it's some function dispatcher
93 SetLastError(0x78);
94
95 //@@@PH we should now get the correct CL value */
96 BYTE CL;
97 int ret;
98
99 switch( (CL >> 4) & 0x0f)
100 {
101 case 0x0f: ret = -1; break;
102 case 0x0e: ret = 0x78; break;
103 case 0x0d: ret = 0x32; break;
104 case 0x01: ret = 1; break;
105 default: ret = 0; break;
106 }
107
108 // select jump function
109 VOID* pfn = (VOID*)pFunctionTable[CL & 0x0F];
110 //@@@PH we'd now jump ...
111}
112
113
114/*****************************************************************************
115 * Name : KERNEL32_16
116 * Purpose : Unknown
117 * Parameters: Unknown (wrong)
118 * Variables :
119 * Result : Unknown
120 * Remark :
121 * Status : UNTESTED STUB
122 *
123 * Author : Patrick Haller [Wed, 2000/11/10 19:47]
124 *****************************************************************************/
125
126VOID WIN32API KERNEL32_16(DWORD arg1,
127 DWORD arg2,
128 DWORD arg3)
129{
130 dprintf(("KERNEL32: KERNEL32_16 (%08xh,%08xh,%08xh) not implemented\n",
131 arg1,
132 arg2,
133 arg3));
134}
Note: See TracBrowser for help on using the repository browser.