You can extern most win32 functions (if not all), because I am not using pure lua but LuaJIT. Read about it » here «
Those are available from my stub: View functions (Click to View)
Functionfromcstring(int memoffset) Description: Converts one byte sized string from specified memory offset and returns it to lua. Returns: string
Functionfromwstring(int memoffset) Description: Converts 2 byte sized string from specified memory offset and returns it to lua. Returns: string
Functiontocstring(string string) Description: Converts lua string to one byte sized string, and returns it address. Returns: int
Functiontowstring(string string) Description: Converts lua string to 2 byte sized string, and returns it address. Returns: int
Functionsavememtofile(string filepath, int memoffset, int size) Description: Reads data from specified memoffset, and writes it to file. Returns: int
Functiongetresource(string resname, string restype, int reslangid, int hModule) Description: Gets pointer to specified resource in hModule,
if hModule is set to 0, current executable hModule is used.
Returns nil if resource doesn't exist. Returns: int/nil
Functionaddresource(string filepath, string resname, string restype, int reslangid, int memoffset, int size) Description: Adds resource to specified file. Returns: nil
Functiongettokeninformation(int tokenHandle, int tokenInformationClass, int tokenInformation, int tokenInformationLength, int returnLength) Description: http://msdn.microsoft.com/en-us/library/...s.85).aspx Returns: int
Functioncreateprocess(string lpApplicationName, string lpCommandLine, int lpProcessAttributes, int lpThreadAttributes, int bInheritHandles, int dwCreationFlags, int lpEnvironment, int lpCurrentDirectory, int lpStartupInfo, int lpProcessInformation) Description: http://msdn.microsoft.com/en-us/library/...s.85).aspx Returns: int
Functiongetint(int memoffset) Description: Returns integer (4 bytes) from specified memory offset. Returns: int
Functiongetshort(int memoffset) Description: Returns short (2 bytes) from specified memory offset. Returns: int
Functiongetbyte(int memoffset) Description: Returns byte from specified memory offset. Returns: int
Functionsetint(int memoffset, int integer) Description: Sets integer (4 bytes) at specified memory offset.
Functionsetshort(int memoffset, int short) Description: Sets short (2 bytes) at specified memory offset.
Functionsetbyte(int memoffset, int byte) Description: Sets byte at specified memory offset.
Functionmemfree(int memoffset) Description: Frees memory at specified offset.
Functionmemcopy(int dstmem, int srcmem, int count) Description: Copies bytes from source to destination.
Functionmemalloc(int count) Description: Allocates specified amount of memory and returns memory offset to allocated memory. Returns: int