"""
Auto-generated Python stub file from w32.win32memory.py
Module: w32.win32memory
"""

import c


import t
from stdint import *
from w32.win32base import *

MEM_COMMIT: t.CDefine = 0x00001000
MEM_RESERVE: t.CDefine = 0x00002000
MEM_DECOMMIT: t.CDefine = 0x00004000
MEM_RELEASE: t.CDefine = 0x00008000
MEM_FREE: t.CDefine = 0x00010000
MEM_RESET: t.CDefine = 0x00080000
MEM_TOP_DOWN: t.CDefine = 0x00100000
MEM_WRITE_WATCH: t.CDefine = 0x00200000
MEM_PHYSICAL: t.CDefine = 0x00400000
MEM_LARGE_PAGES: t.CDefine = 0x20000000
PAGE_NOACCESS: t.CDefine = 0x01
PAGE_READONLY: t.CDefine = 0x02
PAGE_READWRITE: t.CDefine = 0x04
PAGE_WRITECOPY: t.CDefine = 0x08
PAGE_EXECUTE: t.CDefine = 0x10
PAGE_EXECUTE_READ: t.CDefine = 0x20
PAGE_EXECUTE_READWRITE: t.CDefine = 0x40
PAGE_EXECUTE_WRITECOPY: t.CDefine = 0x80
PAGE_GUARD: t.CDefine = 0x100
PAGE_NOCACHE: t.CDefine = 0x200
PAGE_WRITECOMBINE: t.CDefine = 0x400
HEAP_NO_SERIALIZE: t.CDefine = 0x00000001
HEAP_GROWABLE: t.CDefine = 0x00000002
HEAP_GENERATE_EXCEPTIONS: t.CDefine = 0x00000004
HEAP_ZERO_MEMORY: t.CDefine = 0x00000008
HEAP_REALLOC_IN_PLACE_ONLY: t.CDefine = 0x00000010

class MEMORY_BASIC_INFORMATION:
    BaseAddress: VOIDPTR
    AllocationBase: VOIDPTR
    AllocationProtect: ULONG
    RegionSize: t.CSizeT
    State: ULONG
    Protect: ULONG
    Type: ULONG

def VirtualAlloc(lpAddress: VOIDPTR, dwSize: t.CSizeT, flAllocationType: ULONG, flProtect: ULONG) -> VOIDPTR | t.State: pass

def VirtualFree(lpAddress: VOIDPTR, dwSize: t.CSizeT, dwFreeType: ULONG) -> BOOL | t.State: pass

def VirtualProtect(lpAddress: VOIDPTR, dwSize: t.CSizeT, flNewProtect: ULONG, lpflOldProtect: ULONG | t.CPtr) -> BOOL | t.State: pass

def VirtualQuery(lpAddress: t.CConst | VOIDPTR, lpBuffer: MEMORY_BASIC_INFORMATION | t.CPtr, dwLength: t.CSizeT) -> t.CSizeT | t.State: pass

def VirtualLock(lpAddress: VOIDPTR, dwSize: t.CSizeT) -> BOOL | t.State: pass

def VirtualUnlock(lpAddress: VOIDPTR, dwSize: t.CSizeT) -> BOOL | t.State: pass

def GetProcessHeap() -> HANDLE | t.State: pass

def HeapCreate(flOptions: ULONG, dwInitialSize: t.CSizeT, dwMaximumSize: t.CSizeT) -> HANDLE | t.State: pass

def HeapDestroy(hHeap: HANDLE) -> BOOL | t.State: pass

def HeapAlloc(hHeap: HANDLE, dwFlags: ULONG, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass

def HeapReAlloc(hHeap: HANDLE, dwFlags: ULONG, lpMem: VOIDPTR, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass

def HeapFree(hHeap: HANDLE, dwFlags: ULONG, lpMem: VOIDPTR) -> BOOL | t.State: pass

def HeapSize(hHeap: HANDLE, dwFlags: ULONG, lpMem: t.CConst | VOIDPTR) -> t.CSizeT | t.State: pass

def HeapValidate(hHeap: HANDLE, dwFlags: ULONG, lpMem: t.CConst | VOIDPTR) -> BOOL | t.State: pass

def HeapCompact(hHeap: HANDLE, dwFlags: ULONG) -> t.CSizeT | t.State: pass

def GlobalAlloc(uFlags: UINT, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass

def GlobalFree(hMem: VOIDPTR) -> VOIDPTR | t.State: pass

def GlobalLock(hMem: VOIDPTR) -> VOIDPTR | t.State: pass

def GlobalUnlock(hMem: VOIDPTR) -> BOOL | t.State: pass

def GlobalSize(hMem: VOIDPTR) -> t.CSizeT | t.State: pass

def LocalAlloc(uFlags: UINT, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass

def LocalFree(hMem: VOIDPTR) -> VOIDPTR | t.State: pass
