Skip to content

Instantly share code, notes, and snippets.

import winim/lean, winim/inc/objbase
const
IID_IAppIdPolicyHandler* = DEFINE_GUID("b6fea19e-32dd-4367-b5b7-2f5da140e87d")
CLSID_AppIdPolicyHandlerClass* = DEFINE_GUID("f1ed7d4c-f863-4de6-a1ca-7253efdee1f3")
type
IAppIdPolicyHandler* {.pure.} = object
lpVtbl*: ptr IAppIdPolicyHandlerVtbl
IAppIdPolicyHandlerVtbl* {.pure, inheritable.} = object of IDispatchVtbl
#[
Author: Ward
Example of GetLogicalProcessorInformation
References:
https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlogicalprocessorinformation
]#
import winim/lean
#[
Author: Ward
Example of GetUserName
References:
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getusernamea
]#
import winim/lean
#[
Author: Ward
Example of GetClipboardData
References:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclipboarddata
]#
import winim/lean
#[
Author: Ward
Example of DeviceIoControl
References:
https://docs.microsoft.com/en-us/windows/win32/devio/calling-deviceiocontrol
]#
import winim/lean
#[
Author: Ward
Example of RegEnumValue
References:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindowa
]#
import winim/lean
#[
Author: Ward
Example of FindWindow
References:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindowa
]#
import winim/lean
#[
Author: Ward
Example of NtAllocateVirtualMemory, NtReadVirtualMemory, NtFreeVirtualMemory
References:
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntallocatevirtualmemory
]#
import winim/lean
#[
Author: Ward
Example of CreateFileMapping
References:
https://docs.microsoft.com/en-us/windows/win32/memory/creating-named-shared-memory
]#
# This program may need to run as admin.
#[
Author: Ward
Example of CreateFileMapping
References:
https://docs.microsoft.com/en-us/windows/win32/memory/creating-named-shared-memory
]#
# This program may need to run as admin.