Allocates a memory buffer of the specified size and returns a pointer to it.
- Parameters
-
cb | is a size of the buffer to be allocated, in bytes. |
- Returns
- On success the function returns a pointer to the allocated buffer. This buffer must be freed after usage using one of the free functions declared in the Chusov::Memory namespace, e.g. FreeData, SecureFreeData, FreeStringW, SecureFreeString, etc. On failure the function returns NULL. Use the GetLastChsvError function to get extended error information.