| 15 | } |
| 16 | |
| 17 | const Result CtrlrWindows::writeResource (void *handle, const LPSTR resourceId, const LPSTR resourceType, const MemoryBlock &resourceData) |
| 18 | { |
| 19 | HANDLE hResource = (HANDLE)handle; |
| 20 | |
| 21 | if (hResource) |
| 22 | { |
| 23 | return (UpdateResource (hResource, resourceType, resourceId, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPVOID) resourceData.getData(), (DWORD)resourceData.getSize()) ? Result::ok() : Result::fail("WIN32 UpdateResource failed")); |
| 24 | } |
| 25 | else |
| 26 | { |
| 27 | return (Result::fail("Windows Native: UpdateResource, resource HANDLE cast failed")); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | const Result CtrlrWindows::readResource (void *handle, const LPSTR resourceId, const LPSTR resourceType, MemoryBlock &resourceData) |
| 32 | { |