Change stdcall -> system

This commit is contained in:
gingerBill
2024-01-17 17:04:54 +00:00
parent 8cfff254c9
commit 75c659fa41
23 changed files with 212 additions and 212 deletions
+20 -20
View File
@@ -21,7 +21,7 @@ COMMON_LVB_REVERSE_VIDEO :: WORD(0x4000)
COMMON_LVB_UNDERSCORE :: WORD(0x8000)
COMMON_LVB_SBCSDBCS :: WORD(0x0300)
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
OutputDebugStringA :: proc(lpOutputString: LPCSTR) --- // The only A thing that is allowed
OutputDebugStringW :: proc(lpOutputString: LPCWSTR) ---
@@ -112,7 +112,7 @@ foreign kernel32 {
CreateThread :: proc(
lpThreadAttributes: LPSECURITY_ATTRIBUTES,
dwStackSize: SIZE_T,
lpStartAddress: proc "stdcall" (rawptr) -> DWORD,
lpStartAddress: proc "system" (rawptr) -> DWORD,
lpParameter: LPVOID,
dwCreationFlags: DWORD,
lpThreadId: LPDWORD,
@@ -121,7 +121,7 @@ foreign kernel32 {
hProcess: HANDLE,
lpThreadAttributes: LPSECURITY_ATTRIBUTES,
dwStackSize: SIZE_T,
lpStartAddress: proc "stdcall" (rawptr) -> DWORD,
lpStartAddress: proc "system" (rawptr) -> DWORD,
lpParameter: LPVOID,
dwCreationFlags: DWORD,
lpThreadId: LPDWORD,
@@ -581,7 +581,7 @@ MEM_TOP_DOWN :: 0x100000
MEM_LARGE_PAGES :: 0x20000000
MEM_4MB_PAGES :: 0x80000000
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
VirtualAlloc :: proc(
lpAddress: LPVOID,
@@ -724,7 +724,7 @@ LowMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.LowMemoryRes
HighMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.HighMemoryResourceNotification
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
CreateMemoryResourceNotification :: proc(
NotificationType: MEMORY_RESOURCE_NOTIFICATION_TYPE,
@@ -740,7 +740,7 @@ FILE_CACHE_MAX_HARD_DISABLE :: DWORD(0x00000002)
FILE_CACHE_MIN_HARD_ENABLE :: DWORD(0x00000004)
FILE_CACHE_MIN_HARD_DISABLE :: DWORD(0x00000008)
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
GetSystemFileCacheSize :: proc(
lpMinimumFileCacheSize: PSIZE_T,
@@ -770,7 +770,7 @@ WIN32_MEMORY_RANGE_ENTRY :: struct {
PWIN32_MEMORY_RANGE_ENTRY :: ^WIN32_MEMORY_RANGE_ENTRY
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
PrefetchVirtualMemory :: proc(
hProcess: HANDLE,
@@ -828,23 +828,23 @@ foreign kernel32 {
MEHC_PATROL_SCRUBBER_PRESENT :: ULONG(0x1)
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
GetMemoryErrorHandlingCapabilities :: proc(
Capabilities: PULONG,
) -> BOOL ---
}
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
GlobalMemoryStatusEx :: proc(
lpBuffer: ^MEMORYSTATUSEX,
) -> BOOL ---
}
PBAD_MEMORY_CALLBACK_ROUTINE :: #type proc "stdcall" ()
PBAD_MEMORY_CALLBACK_ROUTINE :: #type proc "system" ()
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
RegisterBadMemoryNotification :: proc(
Callback: PBAD_MEMORY_CALLBACK_ROUTINE,
@@ -865,7 +865,7 @@ VmOfferPriorityLow :: OFFER_PRIORITY.VmOfferPriorityLow
VmOfferPriorityBelowNormal :: OFFER_PRIORITY.VmOfferPriorityBelowNormal
VmOfferPriorityNormal :: OFFER_PRIORITY.VmOfferPriorityNormal
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
OfferVirtualMemory :: proc(
VirtualAddress: PVOID,
@@ -930,7 +930,7 @@ WIN32_MEMORY_REGION_INFORMATION_u_s_Bitfield :: distinct ULONG
Reserved : 32-6,
}*/
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign one_core {
QueryVirtualMemoryInformation :: proc(
Process: HANDLE,
@@ -955,7 +955,7 @@ foreign one_core {
NUMA_NO_PREFERRED_NODE :: 0xffffffff
MapViewOfFile2 :: #force_inline proc "stdcall" (
MapViewOfFile2 :: #force_inline proc "system" (
FileMappingHandle: HANDLE,
ProcessHandle: HANDLE,
Offset: ULONG64,
@@ -976,7 +976,7 @@ MapViewOfFile2 :: #force_inline proc "stdcall" (
)
}
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
UnmapViewOfFile2 :: proc(
ProcessHandle: HANDLE,
@@ -985,7 +985,7 @@ foreign kernel32 {
) -> BOOL ---
}
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
GetProductInfo :: proc(
OSMajorVersion: DWORD,
@@ -996,7 +996,7 @@ foreign kernel32 {
) -> BOOL ---
}
HandlerRoutine :: proc "stdcall" (dwCtrlType: DWORD) -> BOOL
HandlerRoutine :: proc "system" (dwCtrlType: DWORD) -> BOOL
PHANDLER_ROUTINE :: HandlerRoutine
@@ -1137,16 +1137,16 @@ DCB :: struct {
wReserved1: WORD,
}
@(default_calling_convention="stdcall")
@(default_calling_convention="system")
foreign kernel32 {
GetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
SetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
}
LPFIBER_START_ROUTINE :: #type proc "stdcall" (lpFiberParameter: LPVOID)
LPFIBER_START_ROUTINE :: #type proc "system" (lpFiberParameter: LPVOID)
@(default_calling_convention = "stdcall")
@(default_calling_convention = "system")
foreign kernel32 {
CreateFiber :: proc(dwStackSize: SIZE_T, lpStartAddress: LPFIBER_START_ROUTINE, lpParameter: LPVOID) -> LPVOID ---
DeleteFiber :: proc(lpFiber: LPVOID) ---