2 * Win32 ordinal only exported functions that can't be stuffed somehwere else.
4 * Copyright 1997 Marcus Meissner
10 #include "selectors.h"
17 #include "stackframe.h"
20 /**********************************************************************
21 * WOWGetDescriptor (KERNEL32.88) (WOW32.1)
23 BOOL32 WINAPI WOWGetDescriptor(SEGPTR segptr,LPLDT_ENTRY ldtent)
25 return GetThreadSelectorEntry(GetCurrentThreadId(),segptr>>16,ldtent);
29 /***********************************************************************
30 * GetProcessDword (KERNEL32.18) (KERNEL.485)
31 * 'Of course you cannot directly access Windows internal structures'
33 DWORD WINAPI GetProcessDword(DWORD processid,DWORD action)
35 PDB32 *process = processid? PROCESS_IdToPDB( processid )
40 TRACE(win32,"(%ld,%ld+0x38)\n",processid,action);
41 if (!process || action>56)
44 case 0: /* return app compat flags */
45 pTask = (TDB*)GlobalLock16(process->task);
48 return pTask->compat_flags;
49 case 4: /* returns offset 0xb8 of process struct... dunno what it is */
51 case 8: /* return hinstance16 */
52 pTask = (TDB*)GlobalLock16(process->task);
55 return pTask->hInstance;
56 case 12:/* return expected windows version */
57 pTask = (TDB*)GlobalLock16(process->task);
60 return pTask->version;
61 case 16:/* return uncrypted pointer to current thread */
62 return (DWORD)THREAD_Current();
63 case 20:/* return uncrypted pointer to process */
64 return (DWORD)process;
65 case 24:/* return stdoutput handle from startupinfo */
66 return (DWORD)(process->env_db->startup_info->hStdOutput);
67 case 28:/* return stdinput handle from startupinfo */
68 return (DWORD)(process->env_db->startup_info->hStdInput);
69 case 32:/* get showwindow flag from startupinfo */
70 return (DWORD)(process->env_db->startup_info->wShowWindow);
71 case 36:{/* return startup x and y sizes */
72 LPSTARTUPINFO32A si = process->env_db->startup_info;
75 x=si->dwXSize;if (x==0x80000000) x=0x8000;
76 y=si->dwYSize;if (y==0x80000000) y=0x8000;
79 case 40:{/* return startup x and y */
80 LPSTARTUPINFO32A si = process->env_db->startup_info;
83 x=si->dwX;if (x==0x80000000) x=0x8000;
84 y=si->dwY;if (y==0x80000000) y=0x8000;
87 case 44:/* return startup flags */
88 return process->env_db->startup_info->dwFlags;
89 case 48:/* return uncrypted pointer to parent process (if any) */
90 return (DWORD)process->parent;
91 case 52:/* return process flags */
92 return process->flags;
93 case 56:/* unexplored */
94 return process->process_dword;
96 WARN(win32,"Unknown offset (%ld)\n",action);
99 /* shouldn't come here */
102 /***********************************************************************
103 * SetProcessDword (KERNEL.484)
104 * 'Of course you cannot directly access Windows internal structures'
106 VOID WINAPI SetProcessDword(DWORD processid,DWORD action,DWORD value)
108 PDB32 *process = processid? PROCESS_IdToPDB( processid )
112 TRACE(win32,"(%ld,%ld+0x38)\n",processid,action);
113 if (!process || action>56) return;
116 case 56: process->process_dword = value; break;
118 FIXME(win32,"Unknown offset (%ld)\n",action);
123 /***********************************************************************
124 * GetWin16DOSEnv (KERNEL32.34)
125 * Returns some internal value.... probably the default environment database?
127 DWORD WINAPI GetWin16DOSEnv()
129 FIXME(dosmem,"stub, returning 0\n");
133 /**********************************************************************
134 * GetPK16SysVar (KERNEL32.92)
136 LPVOID WINAPI GetPK16SysVar(void)
138 static BYTE PK16SysVar[128];
140 FIXME(win32, "()\n");
144 /**********************************************************************
145 * CommonUnimpStub (KERNEL32.17)
147 REGS_ENTRYPOINT(CommonUnimpStub)
149 if (EAX_reg(context))
150 MSG( "*** Unimplemented Win32 API: %s\n", EAX_reg(context) );
152 switch ((ECX_reg(context) >> 4) & 0x0f)
154 case 15: EAX_reg(context) = -1; break;
155 case 14: EAX_reg(context) = 0x78; break;
156 case 13: EAX_reg(context) = 0x32; break;
157 case 1: EAX_reg(context) = 1; break;
158 default: EAX_reg(context) = 0; break;
161 ESP_reg(context) += (ECX_reg(context) & 0x0f) * 4;
164 /**********************************************************************
165 * HouseCleanLogicallyDeadHandles (KERNEL32.33)
167 void WINAPI HouseCleanLogicallyDeadHandles(void)
169 /* Whatever this is supposed to do, our handles probably
174 BOOL32 WINAPI _KERNEL32_100(HANDLE32 threadid,DWORD exitcode,DWORD x) {
175 FIXME(thread,"(%d,%ld,0x%08lx): stub\n",threadid,exitcode,x);
179 DWORD WINAPI _KERNEL32_99(DWORD x) {
180 FIXME(win32,"(0x%08lx): stub\n",x);
183 /***********************************************************************
184 * PrivateExtractIconExA [USER32.442]
186 HRESULT WINAPI PrivateExtractIconExA ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
187 { FIXME(win,"0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
191 /***********************************************************************
192 * PrivateExtractIconExW [USER32.443]
194 HRESULT WINAPI PrivateExtractIconExW ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
195 { FIXME(win,"0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
199 /***********************************************************************
200 * PrivateExtractIconsW [USER32.445]
202 HRESULT WINAPI PrivateExtractIconsW ( DWORD r, DWORD s, DWORD t, DWORD u, DWORD v, DWORD w, DWORD x, DWORD y )
203 { 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 );
207 /***********************************************************************
208 * RegisterShellHookWindow [USER32.459]
210 HRESULT WINAPI RegisterShellHookWindow ( DWORD u )
211 { FIXME(win,"0x%08lx stub\n",u);
215 /***********************************************************************
216 * DeregisterShellHookWindow [USER32.132]
218 HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
219 { FIXME(win,"0x%08lx stub\n",u);
223 /***********************************************************************
224 * RegisterTaskList32 [USER23.436]
226 DWORD WINAPI RegisterTaskList32 (DWORD x)
227 { FIXME(win,"0x%08lx\n",x);