Function
|
Parameters
|
Returns
|
Description
|
AllocatePages
|
Address
nPages
AllocType
|
Address
|
Allocates the specified number of pages with the specified properties. If Address is not NULL, the pages will be allocated with that virtual address (rounded down to the page).
|
FreePages
|
Address
nPages
|
|
Deallocates the specified number of pages starting at the specified address (rounded down to the page).
|
AllocateMemory
|
nBytes
|
Address
|
Allocates on the heap a range of the specified number of bytes.
|
AllocateAlignedMemory
|
nBytes
Alignment
|
Address
|
Allocates on the head a range of the specified number of bytes aligned to 2Alignment bytes.
|
FreeMemory
|
Address
|
|
Deallocates the memory range starting at Address from the heap.
|
GetAllocationSize
|
Address
|
nBytes
|
Returns the size of the heap memory range containing Address.
|
GetAllocationStart
|
Address
|
StartAddress
|
Returns the start address of the heap memory range containing Address.
|
CreateProcess
|
pName
DataSize
pData
Flags
|
pProcess
|
Creates a new process from a file with the specified name and specified properties. If pData is not NULL, DataSize bytes of data are copied to the new process as command data.
|
DestroyProcess
|
pProcess
|
|
Stops and completely eliminates the specified process and all of its threads. This does not return if pProcess is the current process.
|
GetCurrentProcess
|
|
pProcess
|
Returns a reference to the current process.
|
CreateThread
|
pFunction
StackSize
Flags
Parameter
|
pThread
|
Creates a new thread with the specified properties that starts execution by calling the specified function with Parameter. The new thread’s stack has the specified size. Returning from the function destroys the thread.
|
DestroyThread
|
pThread
|
|
Destroys the specified thread. This does not return if pProcess is the current process.
|
PauseThread
|
pThread
|
|
Pauses execution of the specified thread, saving its state.
|
ResumeThread
|
pThread
|
|
Resumes execution of the specified thread if the thread was paused or sleeping.
|
Sleep
|
pThread
Milliseconds
|
|
Puts the specified thread to sleep (similar to pausing) for the specified number of milliseconds, after which execution resumes normally.
|
ScheduleThread
|
pThread
pFunction
Parameter
Milliseconds
|
pSchedule
|
Schedules the specified paused thread to call the specified function with Parameter after the specified number of milliseconds. If the thread had state saved when paused, that state may be overwritten.
|
UnscheduleThread
|
pSchedule
|
|
Unschedules the previously scheduled thread execution event.
|
GetCurrentThread
|
|
pThread
|
Returns a reference to the current thread.
|
GetLock
|
pLock
|
|
Assigns the access controlled by the specified lock to the current thread, blocking until it is allowed to do so if necessary. (PL3and PL0)
|
ReleaseLock
|
pLock
|
|
Releases the access controlled by the specified lock from the current thread immediately, informing blocked threads. (PL3 and PL0)
|
AttemptGetLock
|
pLock
Milliseconds
|
hasLock
|
Attempts to assigns the access controlled by the specified lock to the current thread for a limited amount of time before giving up. (PL3 and PL0)
|
WaitForNotify
|
pQueue
|
|
Adds the current thread to the specified queue of waiting threads. (all PL0)
|
AttemptWaitForNotify
|
pQueue
Milliseconds
|
wasNotified
|
Adds the current thread to the specified queue of waiting threads for a limited amount of time before giving up. (all PL0)
|
Notify
|
pQueue
|
nNotified
|
Notifies the first thread in the specified queue of waiting threads (if any). (all PL0)
|
NotifyAll
|
pQueue
|
nNotified
|
Notifies all threads in the specified queue of waiting threads. (all PL0)
|
OpenFile
|
pName
Flags
|
pFile
|
Opens a file with the specified name with the specified access and properties.
|
ReadFile
|
pFile
pDestination
nBytes
|
nBytesRead
|
Reads the specified number of bytes to the specified address in memory from the specified opened file.
|
WriteFile
|
pFile
pSource
nBytes
|
nBytesWritten
|
Writes the specified number of bytes to the specified file from the specified address in memory.
|
CloseFile
|
pFile
|
|
Closes the specified file.
|
GetFileSize
|
pFile
|
nBytes
|
Returns the size of the specified file if it has a size.
|
GetFilePointer
|
pFile
|
ByteIndex
|
Returns the current location in the specified file from which the next read or write operation would occur, if it has such a location.
|
SetFilePointer
|
pFile
ByteIndex
|
|
Sets the current location in the specified file from which the next read or write operation would occur, if it has such a location.
|
GetGraphicsAccess
|
|
pGraphics
|
Allocates pages onto the graphics linear frame buffer (or virtual linear frame buffer), returning a pointer to a structure describing the buffer.
|
ReleaseGraphicsAccess
|
|
|
Deallocates pages of the graphics linear frame buffer (or virtual linear frame buffer).
|
AddKeyListener
|
pFunction
|
|
Registers the specified function to be called using the current thread when a key of a keyboard is pressed or released.
|
RemoveKeyListener
|
pFunction
|
|
Deregisters the specified function from being called on key events, preferring the current thread if duplicates exist.
|
AddMouseButtonListener
|
pFunction
|
|
Registers the specified function to be called using the current thread when a button of a mouse is pressed or released.
|
RemoveMouseButtonListener
|
pFunction
|
|
Deregisters the specified function from being called on mouse button events, preferring the current thread if duplicates exist.
|
AddMouseMotionListener
|
pFunction
|
|
Registers the specified function to be called using the current thread when a mouse is moved.
|
RemoveMouseMotionListener
|
pFunction
|
|
Deregisters the specified function from being called on mouse motion events, preferring the current thread if duplicates exist.
|