mirror of
https://github.com/ksherlock/mpw.git
synced 2025-02-08 07:30:34 +00:00
MM::Native::GetHandleSize
This commit is contained in:
parent
acb5733e6c
commit
f4d4100c5d
@ -228,6 +228,18 @@ namespace MM
|
||||
}
|
||||
|
||||
|
||||
uint16_t GetHandleSize(uint32_t handle, uint32_t &handleSize)
|
||||
{
|
||||
handleSize = 0;
|
||||
|
||||
const auto iter = HandleMap.find(handle);
|
||||
|
||||
if (iter == HandleMap.end()) return SetMemError(MacOS::memWZErr);
|
||||
handleSize = iter->second.size;
|
||||
return SetMemError(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,6 +19,8 @@ namespace MM
|
||||
|
||||
uint16_t DisposeHandle(uint32_t handle);
|
||||
uint16_t DisposePtr(uint32_t pointer);
|
||||
|
||||
uint16_t GetHandleSize(uint32_t handle, uint32_t &handleSize);
|
||||
}
|
||||
|
||||
bool Init(uint8_t *memory, uint32_t memorySize, uint32_t reserved);
|
||||
|
Loading…
x
Reference in New Issue
Block a user