From: notaz Date: Sun, 18 Oct 2015 22:56:02 +0000 (+0300) Subject: more apis X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=383dff16087df778d678eeab30066dbfe431509b;p=ia32rtools.git more apis --- diff --git a/tools/protoparse.h b/tools/protoparse.h index 7acd63a..6ea6387 100644 --- a/tools/protoparse.h +++ b/tools/protoparse.h @@ -216,6 +216,7 @@ static const char *known_ptr_types[] = { "HRSRC", "HKEY", "HMENU", + "HMONITOR", "HWAVEOUT", "HWND", "PAPPBARDATA", diff --git a/tools/translate.c b/tools/translate.c index 1e3585a..543d7b0 100644 --- a/tools/translate.c +++ b/tools/translate.c @@ -328,6 +328,7 @@ static int g_sct_func_attr; static int g_stack_clear_start; // in dwords static int g_stack_clear_len; static int g_regmask_init; +static int g_regmask_rm; static int g_skip_func; static int g_allow_regfunc; static int g_allow_user_icall; @@ -6440,7 +6441,7 @@ static void gen_func(FILE *fout, FILE *fhdr, const char *funcn, int opcnt) } // declare normal registers - regmask_now = regmask & ~regmask_arg; + regmask_now = regmask & ~regmask_arg & ~g_regmask_rm; regmask_now &= ~(1 << xSP); if (regmask_now & 0x00ff) { for (reg = 0; reg < 8; reg++) { @@ -9328,6 +9329,7 @@ int main(int argc, char *argv[]) static const char *attrs[] = { "clear_sf", "clear_regmask", + "rm_regmask", }; // parse manual attribute-list comment @@ -9351,6 +9353,9 @@ int main(int argc, char *argv[]) else if (i == 1) // clear_regmask= ret = sscanf(p, "=%x%n", &g_regmask_init, &j) + 1; + else if (i == 2) + // rm_regmask= + ret = sscanf(p, "=%x%n", &g_regmask_rm, &j) + 1; if (ret < 2) { anote("unparsed attr value: %s\n", p); break; @@ -9559,6 +9564,7 @@ do_pending_endp: g_stack_clear_start = 0; g_stack_clear_len = 0; g_regmask_init = 0; + g_regmask_rm = 0; skip_warned = 0; g_skip_func = 0; g_func[0] = 0; diff --git a/win32.hlist b/win32.hlist index 46bef25..726ab6f 100644 --- a/win32.hlist +++ b/win32.hlist @@ -330,9 +330,39 @@ WINBASEAPI UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,int); WINBASEAPI HGLOBAL WINAPI GlobalHandle(PCVOID); WINBASEAPI LPVOID WINAPI GlobalLock(HGLOBAL); WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS); + +WINBASEAPI BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX); +WINBASEAPI HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT); +WINBASEAPI DWORD WINAPI GlobalSize(HGLOBAL); +WINBASEAPI VOID WINAPI GlobalUnfix(HGLOBAL); /* Obsolete: Has no effect. */ +WINBASEAPI BOOL WINAPI GlobalUnlock(HGLOBAL); +WINBASEAPI BOOL WINAPI GlobalUnWire(HGLOBAL); /* Obsolete: Has no effect. */ +WINBASEAPI PVOID WINAPI GlobalWire(HGLOBAL); /* Obsolete: Has no effect. */ +WINBASEAPI PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD); +SIZE_T WINAPI HeapCompact(HANDLE,DWORD); +WINBASEAPI HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD); WINBASEAPI BOOL WINAPI HeapDestroy(HANDLE); WINBASEAPI BOOL WINAPI HeapFree(HANDLE,DWORD,PVOID); +WINBASEAPI BOOL WINAPI HeapLock(HANDLE); +WINBASEAPI BOOL WINAPI HeapQueryInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T); +WINBASEAPI PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,DWORD); +WINBASEAPI BOOL WINAPI HeapSetInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T); +WINBASEAPI DWORD WINAPI HeapSize(HANDLE,DWORD,PCVOID); +WINBASEAPI BOOL WINAPI HeapUnlock(HANDLE); +WINBASEAPI BOOL WINAPI HeapValidate(HANDLE,DWORD,PCVOID); +WINBASEAPI BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY); +WINBASEAPI BOOL WINAPI ImpersonateLoggedOnUser(HANDLE); +WINBASEAPI BOOL WINAPI ImpersonateNamedPipeClient(HANDLE); +WINBASEAPI BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL); +WINBASEAPI BOOL WINAPI InitAtomTable(DWORD); +WINBASEAPI BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD); +WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION); +WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION,DWORD); +WINBASEAPI DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD); +WINBASEAPI BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD); +WINBASEAPI BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE); WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER); + LONG WINAPI InterlockedCompareExchange(volatile LONG *,LONG,LONG); LONG WINAPI InterlockedDecrement(volatile LONG *); LONG WINAPI InterlockedExchange(volatile LONG *,LONG); @@ -341,8 +371,6 @@ PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER); LONG WINAPI InterlockedIncrement(volatile LONG *); PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER); PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY); -WINBASEAPI BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD); -WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION,DWORD); WINBASEAPI BOOL WINAPI IsBadCodePtr(FARPROC); WINBASEAPI BOOL WINAPI IsBadHugeReadPtr(LPCVOID,UINT); WINBASEAPI BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT); @@ -635,11 +663,6 @@ WINBASEAPI BOOL WINAPI AllocateUserPhysicalPages(HANDLE,PULONG_PTR,PULONG_PTR); WINBASEAPI BOOL WINAPI FreeUserPhysicalPages(HANDLE,PULONG_PTR,PULONG_PTR); WINBASEAPI BOOL WINAPI MapUserPhysicalPages(PVOID,ULONG_PTR,PULONG_PTR); WINBASEAPI BOOL WINAPI MapUserPhysicalPagesScatter(PVOID*,ULONG_PTR,PULONG_PTR); -WINBASEAPI DWORD WINAPI HeapSize(HANDLE,DWORD,LPCVOID); -WINBASEAPI HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD); -WINBASEAPI PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD); -WINBASEAPI PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,DWORD); -WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION); WINBASEAPI void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION); WINBASEAPI BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);