add mouse and cursor
This commit is contained in:
1 parent
cbb9ff469c
commit
a5f0acfac8
10 files changed
+406
-35
No files matched your search
@@ -289,7 +289,7 @@ __declspec(dllexport) BOOL WriteFile(HANDLE hFile, const void* buf, DWORD toWrit
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// Extended shims – funcs.txt additions
|
||||
// Extended shims - funcs.txt additions
|
||||
// All functions here return plausible values; no real implementation exists
|
||||
// unless a matching syscall stub is available.
|
||||
// ===========================================================================
|
||||
@@ -341,7 +341,7 @@ __declspec(dllexport) HANDLE GetCurrentThread(void) {
|
||||
__declspec(dllexport) DWORD GetCurrentThreadId(void) { return (DWORD)SysGetCurrentTid(); }
|
||||
__declspec(dllexport) DWORD GetCurrentProcessId(void) { return (DWORD)SysGetCurrentPid(); }
|
||||
|
||||
// GetModuleHandleA/W – no PE map; return NULL so callers that check can fail
|
||||
// GetModuleHandleA/W - no PE map; return NULL so callers that check can fail
|
||||
// gracefully. GetModuleHandleA(NULL) on Windows returns the exe base; we
|
||||
// return a recognisable non-NULL sentinel so code that just passes it to
|
||||
// GetProcAddress doesn't immediately crash.
|
||||
@@ -353,14 +353,14 @@ __declspec(dllexport) HANDLE GetModuleHandleW(const unsigned short* lpModuleName
|
||||
return lpModuleName ? NULL : (HANDLE)(uintptr_t)0x00400000UL;
|
||||
}
|
||||
|
||||
// GetProcAddress – no dynamic linker; always fail.
|
||||
// GetProcAddress - no dynamic linker; always fail.
|
||||
__declspec(dllexport) void* GetProcAddress(HANDLE hModule, const char* lpProcName) {
|
||||
(void)hModule; (void)lpProcName;
|
||||
gLastError = 127; // ERROR_PROC_NOT_FOUND
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// LoadLibraryA – no dynamic loader; always fail.
|
||||
// LoadLibraryA - no dynamic loader; always fail.
|
||||
__declspec(dllexport) HANDLE LoadLibraryA(const char* lpLibFileName) {
|
||||
(void)lpLibFileName;
|
||||
gLastError = 2; // ERROR_FILE_NOT_FOUND
|
||||
@@ -385,7 +385,7 @@ __declspec(dllexport) BOOL TerminateProcess(HANDLE hProcess, unsigned int uExitC
|
||||
while (true) ;
|
||||
}
|
||||
|
||||
// STARTUPINFOA – only cb matters for our stub.
|
||||
// STARTUPINFOA - only cb matters for our stub.
|
||||
typedef struct {
|
||||
DWORD cb;
|
||||
char* lpReserved;
|
||||
@@ -437,7 +437,7 @@ __declspec(dllexport) HANDLE CreateThread(void* lpThreadAttributes,
|
||||
return KH_TO_HANDLE(tid);
|
||||
}
|
||||
|
||||
// WaitForSingleObject – blocks on process handles via SysWaitForProcess;
|
||||
// WaitForSingleObject - blocks on process handles via SysWaitForProcess;
|
||||
// thread and other handle types are not yet waitable so return immediately.
|
||||
__declspec(dllexport) DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) {
|
||||
(void)dwMilliseconds;
|
||||
@@ -614,7 +614,7 @@ __declspec(dllexport) BOOL ReleaseSemaphore(HANDLE hSemaphore, long lReleaseCoun
|
||||
// Single-threaded: all locks are no-ops.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Minimal opaque types; callers allocate these from their Windows headers –
|
||||
// Minimal opaque types; callers allocate these from their Windows headers -
|
||||
// we just need the pointer to be accepted by our stubs.
|
||||
typedef struct { uintptr_t _opaque[5]; } CRITICAL_SECTION;
|
||||
typedef struct { void* _ptr; } CONDITION_VARIABLE;
|
||||
@@ -862,7 +862,7 @@ __declspec(dllexport) BOOL IsDebuggerPresent(void) {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// RTL Exception / Unwind (SEH infrastructure – all stubs)
|
||||
// RTL Exception / Unwind (SEH infrastructure - all stubs)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
typedef struct _RUNTIME_FUNCTION {
|
||||
|
||||
Reference in new issue
Block a user