public Status FreePool <T>(T[] arr) { #if DEBUG AllocateCount--; #endif return((Status)RawCalliHelper.StdCall(_FreePool, Unsafe.As <T[], IntPtr>(ref arr))); }
public unsafe Status GetInfo(ref Guid type, ref ulong bufSize, out FileInfo buf) { fixed(FileProtocol *_this = &this) fixed(Guid * _type = &type) fixed(ulong *_bufSize = &bufSize) fixed(FileInfo * _buf = &buf) return((Status)RawCalliHelper.StdCall(_GetInfo, _this, _type, _bufSize, _buf)); }
// TODO: Figure out how to get rid of this pointer public unsafe Status AllocatePool(MemoryType type, ulong size, IntPtr *buf) { #if DEBUG AllocateCount++; #endif return((Status)RawCalliHelper.StdCall(_AllocatePool, type, size, buf)); }
public unsafe Status GetMemoryMap(ref ulong memMapSize, IntPtr memMap, out ulong mapKey, out ulong descSize, out uint descVer) { fixed(ulong *_memMapSize = &memMapSize) fixed(ulong *_mapKey = &mapKey) fixed(ulong *_descSize = &descSize) fixed(uint *_descVer = &descVer) return((Status)RawCalliHelper.StdCall(_GetMemoryMap, _memMapSize, memMap, _mapKey, _descSize, _descVer)); }
public Status FreePool(IntPtr buf) { #if DEBUG AllocateCount--; #endif return((Status)RawCalliHelper.StdCall(_FreePool, buf)); }
public unsafe Status SetCursorPosition(ulong column, ulong row) { fixed(SimpleTextOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_SetCursorPosition, _this, column, row)); }
public unsafe Status ClearScreen() { fixed(SimpleTextOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_ClearScreen, _this)); }
public unsafe Status GetControllerName(Handle controller, Handle child, NativeArray <byte> language, out ReadonlyNativeString name) { fixed(ComponentName2Protocol *_this = &this) fixed(ReadonlyNativeString * _name = &name) return((Status)RawCalliHelper.StdCall(_GetControllerName, _this, controller, child, language, _name)); }
public unsafe Status SetMode(uint mode) { fixed(GraphicsOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_SetMode, _this, mode)); }
public Status SetWatchdogTimer(ulong timeout, ulong code, ulong dataSize, IntPtr data) => (Status)RawCalliHelper.StdCall(_SetWatchdogTimer, timeout, code, dataSize, data);
public unsafe Status Close() { fixed(FileProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_Close, _this)); }
public unsafe Status CloseProtocol(Handle handle, ref Guid protocol, Handle agent, Handle controller) { fixed(Guid *pProt = &protocol) return((Status)RawCalliHelper.StdCall(_CloseProtocol, handle, pProt, agent, controller)); }
public unsafe Status HandleProtocol(Handle handle, ref Guid protocol, out IntPtr iface) { fixed(Guid *_protocol = &protocol) fixed(IntPtr * _iface = &iface) return((Status)RawCalliHelper.StdCall(_HandleProtocol, handle, _protocol, _iface)); }
// TODO: Get rid of the out Handle* and use an out Handle[] or out NativeArray<Handle> instead public unsafe Status LocateHandleBuffer(LocateSearchType searchType, ref Guid protocol, IntPtr searchKey, ref ulong numHandles, out NativeArray <Handle> buffer) { fixed(Guid *_protocol = &protocol) fixed(ulong *_numHandles = &numHandles) fixed(NativeArray <Handle> *_buffer = &buffer) return((Status)RawCalliHelper.StdCall(_LocateHandleBuffer, searchType, _protocol, searchKey, _numHandles, _buffer)); }
public Status ExitBootServices(Handle imageHandle, ulong mapKey) => (Status)RawCalliHelper.StdCall(_ExitBootServices, imageHandle, mapKey);
public unsafe Status OpenProtocol <T>(Handle handle, ref Guid protocol, out ReadonlyNativeReference <T> iface, Handle agent, Handle controller, uint attr) where T : unmanaged { fixed(Guid *_protocol = &protocol) fixed(ReadonlyNativeReference <T> *_iface = &iface) return((Status)RawCalliHelper.StdCall(_OpenProtocol, handle, _protocol, _iface, agent, controller, attr)); }
public unsafe Status EnableCursor(bool visible) { fixed(SimpleTextOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_EnableCursor, _this, visible)); }
public unsafe Status Read(ref ulong bufSize, IntPtr buf) { fixed(FileProtocol *_this = &this) fixed(ulong *_bufSize = &bufSize) return((Status)RawCalliHelper.StdCall(_Read, _this, _bufSize, buf)); }
public unsafe Status Open(out ReadonlyNativeReference <FileProtocol> newHandle, string filename, FileMode mode, FileAttribute attr) { fixed(FileProtocol *_this = &this) fixed(ReadonlyNativeReference <FileProtocol> *_newHandle = &newHandle) fixed(char *f = &filename._firstChar) return((Status)RawCalliHelper.StdCall(_Open, _this, _newHandle, f, mode, attr)); }
public unsafe Status OpenVolume(out ReadonlyNativeReference <FileProtocol> root) { fixed(SimpleFileSystemProtocol *_this = &this) fixed(ReadonlyNativeReference <FileProtocol> *_root = &root) return((Status)RawCalliHelper.StdCall(_OpenVolume, _this, _root)); }
public unsafe Status Reset(bool ExtendedVerification) { fixed(SimpleTextOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_Reset, _this, &ExtendedVerification)); }
public void SetMem(IntPtr buf, ulong size, byte val) => RawCalliHelper.StdCall(_SetMem, buf, size, val);
public unsafe Status SetPosition(ulong pos) { fixed(FileProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_SetPosition, _this, pos)); }
public unsafe Status TestString(ReadonlyNativeString str) { fixed(SimpleTextOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_TestString, _this, str)); }
public unsafe Status QueryMode(uint modeNumber, out ulong sizeOfInfo, out ReadonlyNativeReference <GraphicsOutputModeInformation> info) { fixed(GraphicsOutputProtocol *_this = &this) fixed(ulong *_sizeOfInfo = &sizeOfInfo) fixed(ReadonlyNativeReference <GraphicsOutputModeInformation> *_info = &info) return((Status)RawCalliHelper.StdCall(_QueryMode, _this, modeNumber, _sizeOfInfo, _info)); }
public unsafe Status QueryMode(ulong mode, out ulong columns, out ulong rows) { fixed(SimpleTextOutputProtocol *_this = &this) fixed(ulong *_columns = &columns, _rows = &rows) return((Status)RawCalliHelper.StdCall(_QueryMode, _this, mode, _columns, _rows)); }
// Change these 2 functions to use byte[] insteadd of NativeArray<byte>, and maybe string instead of ReadonlyNativeString public unsafe Status GetDriverName(NativeArray <byte> language, out ReadonlyNativeString name) { fixed(ComponentName2Protocol *_this = &this) fixed(ReadonlyNativeString * _name = &name) return((Status)RawCalliHelper.StdCall(_GetDriverName, _this, language, _name)); }
public unsafe Status SetMode(ulong mode) { fixed(SimpleTextOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_SetMode, _this, mode)); }
public void OutputString(void *handle, char *str) { RawCalliHelper.StdCall(_outputString, (byte *)handle, str); }
public unsafe Status SetAttribute(ulong attribute) { fixed(SimpleTextOutputProtocol *_this = &this) return((Status)RawCalliHelper.StdCall(_SetAttribute, _this, attribute)); }