2 * Win32 ordinal only exported functions that can't be stuffed somehwere else.
4 * Copyright 1997 Marcus Meissner
10 #include "selectors.h"
19 /**********************************************************************
20 * WOWGetDescriptor (KERNEL32.88) (WOW32.1)
22 BOOL32 WINAPI WOWGetDescriptor(SEGPTR segptr,LPLDT_ENTRY ldtent)
24 return GetThreadSelectorEntry(GetCurrentThreadId(),segptr>>16,ldtent);
28 /***********************************************************************
29 * GetProcessDword (KERNEL32.18)
30 * 'Of course you cannot directly access Windows internal structures'
32 DWORD WINAPI GetProcessDword(DWORD processid,DWORD action)
34 PDB32 *process = processid? PROCESS_IdToPDB( processid )
39 TRACE(win32,"(%ld,%ld+0x38)\n",processid,action);
40 if (!process || action>56)
43 case 0: /* return app compat flags */
44 pTask = (TDB*)GlobalLock16(process->task);
47 return pTask->compat_flags;
48 case 4: /* returns offset 0xb8 of process struct... dunno what it is */
50 case 8: /* return hinstance16 */
51 pTask = (TDB*)GlobalLock16(process->task);
54 return pTask->hInstance;
55 case 12:/* return expected windows version */
56 pTask = (TDB*)GlobalLock16(process->task);
59 return pTask->version;
60 case 16:/* return uncrypted pointer to current thread */
61 return (DWORD)THREAD_Current();
62 case 20:/* return uncrypted pointer to process */
63 return (DWORD)process;
64 case 24:/* return stdoutput handle from startupinfo */
65 return (DWORD)(process->env_db->startup_info->hStdOutput);
66 case 28:/* return stdinput handle from startupinfo */
67 return (DWORD)(process->env_db->startup_info->hStdInput);
68 case 32:/* get showwindow flag from startupinfo */
69 return (DWORD)(process->env_db->startup_info->wShowWindow);
70 case 36:{/* return startup x and y sizes */
71 LPSTARTUPINFO32A si = process->env_db->startup_info;
74 x=si->dwXSize;if (x==0x80000000) x=0x8000;
75 y=si->dwYSize;if (y==0x80000000) y=0x8000;
78 case 40:{/* return startup x and y */
79 LPSTARTUPINFO32A si = process->env_db->startup_info;
82 x=si->dwX;if (x==0x80000000) x=0x8000;
83 y=si->dwY;if (y==0x80000000) y=0x8000;
86 case 44:/* return startup flags */
87 return process->env_db->startup_info->dwFlags;
88 case 48:/* return uncrypted pointer to parent process (if any) */
89 return (DWORD)process->parent;
90 case 52:/* return process flags */
91 return process->flags;
92 case 56:/* unexplored */
95 WARN(win32,"Unknown offset (%ld)\n",action);
98 /* shouldn't come here */
101 /***********************************************************************
102 * GetWin16DOSEnv (KERNEL32.34)
103 * Returns some internal value.... probably the default environment database?
105 DWORD WINAPI GetWin16DOSEnv()
107 FIXME(dosmem,"stub, returning 0\n");
111 /**********************************************************************
112 * GetPK16SysVar (KERNEL32.92)
114 LPVOID WINAPI GetPK16SysVar(void)
116 static BYTE PK16SysVar[128];
118 FIXME(win32, "()\n");
123 BOOL32 WINAPI _KERNEL32_100(HANDLE32 threadid,DWORD exitcode,DWORD x) {
124 FIXME(thread,"(%d,%ld,0x%08lx): stub\n",threadid,exitcode,x);
128 DWORD WINAPI _KERNEL32_99(DWORD x) {
129 FIXME(win32,"(0x%08lx): stub\n",x);