|
|
__foldwin32sstuff __foldwin32sstuff; foldstyleinitialization = true;
enablemapdirect1632 = true; defaultholdwin16lock = true;
#include "types.thk"
DWORD ThunkMeowSetPSP(DWORD PSPSel) = DWORD MeowSetPSP(DWORD PSPSel) {}
DWORD ThunkMeowUniToAnsi(DWORD pSrc, DWORD pDst, DWORD ccnt) = DWORD MeowUniToAnsi(DWORD pSrc, DWORD pDst, DWORD ccnt) {}
DWORD ThunkMeowWakeThread(DWORD ptdb) = DWORD MeowWakeThread(DWORD ptdb) {}
VOID ProgramResumeTimer(VOID) { releasewin16lock = true; }
BOOL InitK32AfterSysDllsLoaded(VOID) { //This is called from SlowBoot after the system dlls have //been loaded. A good time for kernel32 to get addresses, //etc. from other system libraries. //There is only 1 thread when this thunk is called, so //serialization is irrelevant. Release the Win16Lock so we //don't trigger an assert in GrabDll.
releasewin16lock = true; }
bool FullLoRes(VOID) { target = LoRes;
// This thunk must *not* release the win16lock. }
DWORD GetNEPEBuddyFromFileName32( LPSTR lpszFileName) { target = GetNEPEBuddyFromFileName; }
VOID WOAAbort(DWORD pConsole) { target = CON_WOAAbort; releasewin16lock = true; }
BOOL IsThreadId(DWORD) { releasewin16lock = true; }
VOID HGCleanupDepartingHTask(WORD hTask16) { //This is called from inside FreeTDB so we'd best not //release the Win16Lock (besides, HGCleanupDepartingHTask //will just grab it again. It's 32-bit code, but it manipulates //a krnl386 data structure). }
BOOL SmashEnvironment(LPSTR pchEnv){ releasewin16lock = true; }
DWORD LoadLibraryEx32W(LPSTR lpFileName, DWORD hFile, DWORD dwFlags) { releasewin16lock = true; target = LoadLibraryExA; }
BOOL LateBindWin32ThunkPartner(DWORD lpThunkData16, BOOL fWantExtraLink) { releasewin16lock = true; }
DWORD CallProc32WHelper(DWORD lpParamStack, WORD wSS, BOOL fCSrc) { releasewin16lock = true; }
DWORD CallProc32WFixHelper(DWORD lpParamStack, WORD wSS) { releasewin16lock = true; }
WORD ThunkTheTemplateHandle(DWORD);
BOOL FlatCommonThunkConnect16(LPSTR pszDll16, LPSTR pszDll32, DWORD lpThunkLSData16, LPSTR pszThunkLSData32Name, DWORD dwReason, WORD wUsage, WORD hModule16) = BOOL FlatCommonThunkConnect16(LPSTR pszDll16, LPSTR pszDll32, DWORD lpThunkLSData16, LPSTR pszThunkLSData32Name, DWORD dwReason, WORD wUsage, WORD hModule16) { // Do not, not, NOT release the Win16Lock here!!! // This gets called as part of a 16-bit library load and // free. }
/* Special version of 32-bit LocalAlloc() that doesn't do any * ganged handle house-cleaning. Used by the ganging code itself * to prevent unwanted recursion. */ DWORD LocalAlloc32NG(UINT fuFlags, DWORD dwSize) = DWORD LocalAllocNG(UINT fuFlags, DWORD dwSize) { // Can't release win16lock yet: GlobalAllocGanged preflights, then // allocs. GlobalAllocGanged() should just allocate first and // free the block if the database runs out of room. Then it can be // safely reentered. }
BOOL SetProcessDword( DWORD dwProcessID, INT dwIndex, DWORD dwValue) = BOOL SetProcessDword( DWORD dwProcessID, LONG dwIndex, DWORD dwValue) { // Can't release win16lock: exported from krnl386 and used by user. }
DWORD GetProcessDword( DWORD dwProcessID, INT dwIndex) = DWORD GetProcessDword( DWORD dwProcessID, LONG dwIndex) { // Can't release win16lock: exported from krnl386 and used by user. }
DWORD RegisterServiceProcess( DWORD dwProcessID, DWORD dwServiceType) = DWORD RegisterServiceProcess( DWORD dwProcessID, DWORD dwServiceType) {}
VOID IFatalAppExit(WORD dwAction, LPSTR lpMsg) = VOID FatalAppExitA(DWORD dwAction, LPSTR lpMsg) {}
DWORD OpenFileEx16And32( LPSTR lpFileName, LPSTR lpReOpenBuff, UINT fuMode, LPSTR BinName, UINT fk16, UINT fWantCompat) = DWORD OpenFileEx16And32( LPSTR lpFileName, LPSTR lpReOpenBuff, UINT fuMode, LPSTR BinName, UINT fk16, UINT fWantCompat) { lpReOpenBuff = inout; }
BOOL FileTimeToDosDateTime( LPSTR lpFileTime, LPWORD lpFatDate, LPWORD lpFatTime) = BOOL FileTimeToDosDateTime( LPSTR lpFileTime, LPWORD lpFatDate, LPWORD lpFatTime) {}
void WinExecWait(DWORD pTDB32) = void WinExecWait(DWORD pTDB32) { }
DWORD WaitForSingleObject(DWORD hObject, DWORD dwTimeout) = DWORD WaitForSingleObject(DWORD hObject, DWORD dwTimeout) { releasewin16lock = true; }
/* VOID KernelUninit() = VOID KernelUninit() {} */
BOOL VirtualFree(DWORD lpAddress, DWORD dwSize, DWORD dwFreeType) = BOOL VirtualFree(DWORD lpAddress, DWORD dwSize, DWORD dwFreeType) { }
DWORD WOACreateConsole(DWORD hVM, WORD hWnd) = DWORD CON_WOACreateConsole(DWORD hVM, DWORD hWnd) { releasewin16lock = true; }
VOID WOAFullScreen(DWORD pConsole, WORD status) = VOID CON_WOAFullScreen(DWORD pConsole, WORD status) { releasewin16lock = true; }
VOID WOAGimmeTitle(DWORD pConsole, LPSTR lpBuf) = VOID CON_WOAGimmeTitle(DWORD pConsole, LPSTR lpBuf) { releasewin16lock = true; }
DWORD WOASpawnConApp(DWORD pConsole) = DWORD CON_WOASpawnConApp(DWORD pConsole) { releasewin16lock = true; }
VOID WOATerminateProcesses(DWORD pConsole) = VOID CON_WOATerminateProcesses(DWORD pConsole) { releasewin16lock = true; }
VOID WOADestroyConsole(DWORD pConsole) = VOID CON_WOADestroyConsole(DWORD pConsole) { releasewin16lock = true; }
DWORD ThunkLocal32Init(DWORD, DWORD, DWORD, DWORD) = DWORD Local32Init(DWORD, DWORD, DWORD, DWORD) {}
DWORD ThunkLocal32Alloc(DWORD linHeader, DWORD dwcbRequest, INT lMemType, DWORD dwFlags) = DWORD Local32Alloc (DWORD linHeader, DWORD dwcbRequest, INT lMemType, DWORD dwFlags) {}
DWORD ThunkLocal32ReAlloc(DWORD linHeader, DWORD dwMem, INT iType, DWORD dwcbNew, DWORD dwFlags) = DWORD Local32ReAlloc (DWORD linHeader, DWORD dwMem, INT iType, DWORD dwcbNew, DWORD dwFlags) {}
DWORD ThunkLocal32Translate(DWORD linHeader, DWORD dwMem, INT wMemType, INT wRetType) = DWORD Local32Translate (DWORD linHeader, DWORD dwMem, INT wMemType, INT wRetType) {}
DWORD ThunkLocal32SizeThkHlp(DWORD linHeader, DWORD dwMem, INT iMemType) = DWORD Local32Size (DWORD linHeader, DWORD dwMem, INT iMemType) {}
BOOL ThunkLocal32Free(DWORD linHeader, DWORD dwMem, INT iType) = BOOL Local32Free (DWORD linHeader, DWORD dwMem, INT iType) {}
BOOL ThunkLocal32ValidHandle(DWORD linHeader, UINT hMem) = BOOL Local32ValidHandle(DWORD linHeader, UINT hMem) {}
/* This thunk is called from inside k16, which does all the pointer thunking * itself. So we pass pointers as dwords. */ DWORD CreateProcessFromWinExec(DWORD lpName, DWORD lpCmdTail, DWORD dwCmdShow, DWORD lpCurDir) = DWORD CreateProcessFromWinExec(DWORD lpName, DWORD lpCmdTail, DWORD dwCmdShow, DWORD lpCurDir) { releasewin16lock = true; }
DWORD ThunkGetProcAddress32(DWORD dwHModule, LPSTR lpProcName) = DWORD GetProcAddress(DWORD dwHModule, LPSTR lpProcName) { releasewin16lock = true; }
DWORD ThunkLoadLibrary32(LPSTR lpProcName) = DWORD LoadLibraryA(LPSTR lpProcName) { releasewin16lock = true; }
BOOL ThunkFreeLibrary32(DWORD dwHModule) = BOOL FreeLibrary(DWORD dwHModule) { releasewin16lock = true; }
VOID FreeInitResources32() = VOID FreeInitResources() {}
/* Yes, the return type should really be BOOL but the old internal * thunk that this thunk replaces treated it as DWORD and exported it * out of k16. To be compatible, we have to maintain that behavior. Ugh! */ DWORD ThunkSetW32Event(DWORD dwHEvent) = DWORD SetEvent(DWORD dwHEvent) {}
/* Yes, the return type should really be BOOL but the old internal * thunk that this thunk replaces treated it as DWORD and exported it * out of k16. To be compatible, we have to maintain that behavior. Ugh! */ DWORD ThunkResetW32Event(DWORD dwHEvent) = DWORD ResetEvent(DWORD dwHEvent) {}
/* K16 calls this thunk and thunks the parameters. We just mode switch. */ DWORD ThunkCreateW32Event(DWORD, DWORD, DWORD, DWORD) = DWORD CreateEventA(DWORD, DWORD, DWORD, DWORD) {}
WORD ThunkGetHModK16FromHModK32(DWORD hmod) = WORD GetHModK16FromHModK32( DWORD hmod) {}
DWORD ThunkCreateProcessWin16(DWORD pptdb, DWORD pstib, DWORD Win16Tdb, DWORD lpStartAddr) = DWORD CreateProcessWin16(DWORD pptdb, DWORD pstib, DWORD Win16Tdb, DWORD lpStartAddr) {}
/* Special routine called from K16. K16 thunks all the parameters so we * just provide the mode switch. */ DWORD ThunkCreateThread16(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) = DWORD CreateThread16(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) {}
BOOL ThunkTerminateThread(DWORD hThread, DWORD dwExitCode) = BOOL TerminateThread(DWORD hThread, DWORD dwExitCode) {}
VOID ThunkExitProcess(UINT uExitCode) = VOID ExitProcess(UINT uExitCode) { releasewin16lock = true; }
BOOL ThunkTerminateProcess(DWORD hProcess, UINT uExitCode) = BOOL TerminateProcess(DWORD hProcess, UINT uExitCode) { releasewin16lock = true; }
VOID ThunkCloseDOSHandles() = VOID CloseDOSHandles() {}
BOOL ThunkCloseW32Handle(DWORD Handle) = BOOL CloseHandle(DWORD Handle) {}
DWORD WaitForMultipleObjectsEx (DWORD cObjects, LPVOID lphObjects, DWORD bWaitForAll, DWORD dwTimeOut, DWORD bAlertable) =
DWORD WaitForMultipleObjectsEx (DWORD cObjects, LPVOID lphObjects, DWORD bWaitForAll, DWORD dwTimeOut, DWORD bAlertable) { releasewin16lock = true; }
DWORD ThunkConvertToGlobalHandle(DWORD Handle) = DWORD ConvertToGlobalHandle(DWORD Handle) {}
DWORD ThunkGetModuleFileName(DWORD hModule, LPSTR lpFileName, UINT nSize) = DWORD GetModuleFileNameA (DWORD hModule, LPSTR lpFileName, UINT nSize) { releasewin16lock = true; }
DWORD ThunkMapProcessHandle(DWORD dwHandle) = DWORD MapProcessHandle(DWORD dwHandle) {}
DWORD ThunkGetCurrentDirectory(DWORD cch, LPSTR lpBuffer) = DWORD GetCurrentDirectoryA(DWORD cch, LPSTR lpBuffer) {}
BOOL NukeProcess(DWORD ppdb, UINT uExitCode, ULONG ulFlags) = BOOL NukeProcess(DWORD ppdb, UINT uExitCode, ULONG ulFlags) { releasewin16lock = true; }
VOID CreateFaultThread() = VOID CreateFaultThread() {}
BOOL GetVersionEx(LPSTR lpBuffer) = BOOL GetVersionExA(LPSTR lpBuffer) {}
DWORD FindFirstFile(LPSTR lpszSearchFile, LPSTR lpFindData) = DWORD FindFirstFileA(LPSTR lpszSearchFile, LPSTR lpFindData) {}
BOOL FindNextFile(DWORD hFindFile, LPSTR lpFindData) = BOOL FindNextFileA(DWORD hFindFile, LPSTR lpFindData) {}
BOOL FindClose(DWORD hFindFile) = BOOL FindClose(DWORD hFindFile) {}
BOOL FileTimeToLocalFileTime(LPSTR lpcfiletime, LPSTR lpfiletime) = BOOL FileTimeToLocalFileTime(LPSTR lpcfiletime, LPSTR lpfiletime) {}
DWORD SetCurrentDirectory32(LPSTR lpszDir) = DWORD SetCurrentDirectoryA(LPSTR lpszDir) {}
DWORD GetCurrentDirectory(DWORD cb, LPSTR lpszDir) = DWORD GetCurrentDirectoryA(DWORD cb, LPSTR lpszDir) {}
DWORD GetModuleHandle32(LPSTR lpszModule) = DWORD GetModuleHandleA(LPSTR lpszModule) {}
VOID InvalidateNLSCache() = VOID InvalidateNLSCache() {}
VOID ISetErrorModeEx(UINT wErrorMode) = VOID SetErrorMode(UINT wErrorMode) {}
VOID NotifyDetachFromWin16() = VOID NotifyDetachFromWin16() { releasewin16lock = true; }
VOID ThunkDeallocOrphanedCrsts() = VOID ThunkDeallocOrphanedCrsts() { }
VOID FaultSave(LPVOID pfaultinfo) = VOID FaultSave(LPVOID pfaultinfo) { }
VOID FaultRestore(LPVOID pfaultinfo) = VOID FaultRestore(LPVOID pfaultinfo) { }
DWORD GetACP()= DWORD GetACP() { }
|