Fix (well kludge around) FreeBSD's `Invalid address' errors.
[wine.git] / win32 / ordinals.c
blob0392df754fe8c8730a4d1002431a60dae779b737
1 /*
2 * Win32 ordinal only exported functions that can't be stuffed somehwere else.
4 * Copyright 1997 Marcus Meissner
5 */
7 #include "thread.h"
8 #include "winerror.h"
9 #include "heap.h"
10 #include "selectors.h"
11 #include "miscemu.h"
12 #include "winnt.h"
13 #include "process.h"
14 #include "module.h"
15 #include "task.h"
16 #include "callback.h"
17 #include "stackframe.h"
18 #include "debugtools.h"
20 DECLARE_DEBUG_CHANNEL(dosmem)
21 DECLARE_DEBUG_CHANNEL(thread)
22 DECLARE_DEBUG_CHANNEL(win)
23 DECLARE_DEBUG_CHANNEL(win32)
25 /**********************************************************************
26 * WOWGetDescriptor (KERNEL32.88) (WOW32.1)
28 BOOL WINAPI WOWGetDescriptor(SEGPTR segptr,LPLDT_ENTRY ldtent)
30 return GetThreadSelectorEntry(GetCurrentThreadId(),segptr>>16,ldtent);
33 /***********************************************************************
34 * GetWin16DOSEnv (KERNEL32.34)
35 * Returns some internal value.... probably the default environment database?
37 DWORD WINAPI GetWin16DOSEnv()
39 FIXME_(dosmem)("stub, returning 0\n");
40 return 0;
43 /**********************************************************************
44 * GetPK16SysVar (KERNEL32.92)
46 LPVOID WINAPI GetPK16SysVar(void)
48 static BYTE PK16SysVar[128];
50 FIXME_(win32)("()\n");
51 return PK16SysVar;
54 /**********************************************************************
55 * CommonUnimpStub (KERNEL32.17)
57 void WINAPI REGS_FUNC(CommonUnimpStub)( CONTEXT *context )
59 if (EAX_reg(context))
60 MESSAGE( "*** Unimplemented Win32 API: %s\n", (LPSTR)EAX_reg(context) );
62 switch ((ECX_reg(context) >> 4) & 0x0f)
64 case 15: EAX_reg(context) = -1; break;
65 case 14: EAX_reg(context) = 0x78; break;
66 case 13: EAX_reg(context) = 0x32; break;
67 case 1: EAX_reg(context) = 1; break;
68 default: EAX_reg(context) = 0; break;
71 ESP_reg(context) += (ECX_reg(context) & 0x0f) * 4;
74 /**********************************************************************
75 * HouseCleanLogicallyDeadHandles (KERNEL32.33)
77 void WINAPI HouseCleanLogicallyDeadHandles(void)
79 /* Whatever this is supposed to do, our handles probably
80 don't need it :-) */
84 BOOL WINAPI _KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x) {
85 FIXME_(thread)("(%d,%ld,0x%08lx): stub\n",threadid,exitcode,x);
86 return TRUE;
89 DWORD WINAPI _KERNEL32_99(DWORD x) {
90 FIXME_(win32)("(0x%08lx): stub\n",x);
91 return 1;
93 /***********************************************************************
94 * PrivateExtractIconExA [USER32.442]
96 HRESULT WINAPI PrivateExtractIconExA ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
97 { FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
98 return 0;
101 /***********************************************************************
102 * PrivateExtractIconExW [USER32.443]
104 HRESULT WINAPI PrivateExtractIconExW ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
105 { FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
106 return 0;
109 /***********************************************************************
110 * PrivateExtractIconsW [USER32.445]
112 HRESULT WINAPI PrivateExtractIconsW ( DWORD r, DWORD s, DWORD t, DWORD u, DWORD v, DWORD w, DWORD x, DWORD y )
113 { FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",r,s,t,u,v,w,x,y );
114 return 0;
117 /***********************************************************************
118 * RegisterShellHookWindow [USER32.459]
120 HRESULT WINAPI RegisterShellHookWindow ( DWORD u )
121 { FIXME_(win)("0x%08lx stub\n",u);
122 return 0;
125 /***********************************************************************
126 * DeregisterShellHookWindow [USER32.132]
128 HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
129 { FIXME_(win)("0x%08lx stub\n",u);
130 return 0;
133 /***********************************************************************
134 * RegisterTaskList32 [USER23.436]
136 DWORD WINAPI RegisterTaskList (DWORD x)
137 { FIXME_(win)("0x%08lx\n",x);
138 return TRUE;