MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / writeResource

Method writeResource

Source/Native/CtrlrWindows.cpp:17–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17const 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
31const Result CtrlrWindows::readResource (void *handle, const LPSTR resourceId, const LPSTR resourceType, MemoryBlock &resourceData)
32{

Callers

nothing calls this directly

Calls 2

getDataMethod · 0.45
getSizeMethod · 0.45

Tested by

no test coverage detected