Make sure GetModuleFileName16 does not return garbage even if the path
[wine] / win32 / ordinals.c
1 /*
2  * Win32 ordinal only exported functions that can't be stuffed somehwere else.
3  *
4  * Copyright 1997 Marcus Meissner
5  */
6
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"
19
20 DECLARE_DEBUG_CHANNEL(dosmem)
21 DECLARE_DEBUG_CHANNEL(thread)
22 DECLARE_DEBUG_CHANNEL(win)
23 DECLARE_DEBUG_CHANNEL(win32)
24
25
26 /***********************************************************************
27  *              GetWin16DOSEnv                  (KERNEL32.34)
28  * Returns some internal value.... probably the default environment database?
29  */
30 DWORD WINAPI GetWin16DOSEnv()
31 {
32         FIXME_(dosmem)("stub, returning 0\n");
33         return 0;
34 }
35
36 /**********************************************************************
37  *           GetPK16SysVar    (KERNEL32.92)
38  */
39 LPVOID WINAPI GetPK16SysVar(void)
40 {
41     static BYTE PK16SysVar[128];
42
43     FIXME_(win32)("()\n");
44     return PK16SysVar;
45 }
46
47 /**********************************************************************
48  *           CommonUnimpStub    (KERNEL32.17)
49  */
50 void WINAPI CommonUnimpStub( CONTEXT86 *context )
51 {
52     if (EAX_reg(context))
53         MESSAGE( "*** Unimplemented Win32 API: %s\n", (LPSTR)EAX_reg(context) );
54
55     switch ((ECX_reg(context) >> 4) & 0x0f)
56     {
57     case 15:  EAX_reg(context) = -1;   break;
58     case 14:  EAX_reg(context) = 0x78; break;
59     case 13:  EAX_reg(context) = 0x32; break;
60     case 1:   EAX_reg(context) = 1;    break;
61     default:  EAX_reg(context) = 0;    break;
62     }
63
64     ESP_reg(context) += (ECX_reg(context) & 0x0f) * 4;
65 }
66
67 /**********************************************************************
68  *           HouseCleanLogicallyDeadHandles    (KERNEL32.33)
69  */
70 void WINAPI HouseCleanLogicallyDeadHandles(void)
71 {
72     /* Whatever this is supposed to do, our handles probably
73        don't need it :-) */
74 }
75
76 /**********************************************************************
77  *              _KERNEL32_100
78  */
79 BOOL WINAPI _KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x) {
80         FIXME_(thread)("(%d,%ld,0x%08lx): stub\n",threadid,exitcode,x);
81         return TRUE;
82 }
83
84 /**********************************************************************
85  *              _KERNEL32_99
86  */
87 DWORD WINAPI _KERNEL32_99(DWORD x) {
88         FIXME_(win32)("(0x%08lx): stub\n",x);
89         return 1;
90 }
91 /***********************************************************************
92  *           PrivateExtractIconExA                      [USER32.442]
93  */
94 HRESULT WINAPI PrivateExtractIconExA ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
95 {       FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
96         return 0;
97         
98 }
99 /***********************************************************************
100  *           PrivateExtractIconExW                      [USER32.443]
101  */
102 HRESULT WINAPI PrivateExtractIconExW ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
103 {       FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
104         return 0;
105         
106 }
107 /***********************************************************************
108  *           PrivateExtractIconsW                       [USER32.445]
109  */
110 HRESULT WINAPI PrivateExtractIconsW ( DWORD r, DWORD s, DWORD t, DWORD u, DWORD v, DWORD w, DWORD x, DWORD y )
111 {       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 );
112         return 0;
113         
114 }
115 /***********************************************************************
116  *           RegisterShellHookWindow                    [USER32.459]
117  */
118 HRESULT WINAPI RegisterShellHookWindow ( DWORD u )
119 {       FIXME_(win)("0x%08lx stub\n",u);
120         return 0;
121         
122 }
123 /***********************************************************************
124  *           DeregisterShellHookWindow                  [USER32.132]
125  */
126 HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
127 {       FIXME_(win)("0x%08lx stub\n",u);
128         return 0;
129         
130 }
131 /***********************************************************************
132  *           RegisterTaskList                           [USER23.436]
133  */
134 DWORD WINAPI RegisterTaskList (DWORD x)
135 {       FIXME_(win)("0x%08lx\n",x);
136         return TRUE;
137 }
138