GUID guid;
CoCreateGuid(&guid);BYTE * str;
UuidToString((UUID*)&guid, &str);str 的内存是要在调用完UuidToString释放么,不释放的话是不是会内存泄露???
RpcStringFree 可是释放 str 的内存么??
CoCreateGuid(&guid);BYTE * str;
UuidToString((UUID*)&guid, &str);str 的内存是要在调用完UuidToString释放么,不释放的话是不是会内存泄露???
RpcStringFree 可是释放 str 的内存么??
The RpcStringFree function frees a character string allocated by the RPC run-time library.I try the follow code:
GUID guid;
CoCreateGuid(&guid); BYTE * str;
UuidToString((UUID*)&guid, &str); RpcStringFree(&str);then i found invoke the RpcStringFree function, the str address has been changed to 0x00000000, i think the point has been free.