MCPcopy Create free account
hub / github.com/beefytech/Beef / BfpThread_GetName

Function BfpThread_GetName

BeefySysLib/platform/win/Platform.cpp:2227–2249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2225}
2226
2227BFP_EXPORT void BFP_CALLTYPE BfpThread_GetName(BfpThread* thread, char* outName, int* inOutNameSize, BfpThreadResult* outResult)
2228{
2229 ImportKernel();
2230
2231 PWSTR wStr = NULL;
2232 if (gGetThreadDescription != NULL)
2233 {
2234 gGetThreadDescription((HANDLE)thread, &wStr);
2235 if (wStr == NULL)
2236 {
2237 OUTRESULT(BfpThreadResult_UnknownError);
2238 return;
2239 }
2240
2241 String str = UTF8Encode(wStr);
2242 TryStringOut(str, outName, inOutNameSize, (BfpResult*)outResult);
2243
2244 LocalFree(wStr);
2245 return;
2246 }
2247
2248 OUTRESULT(BfpThreadResult_UnknownError);
2249}
2250
2251BFP_EXPORT BfpThread* BFP_CALLTYPE BfpThread_GetCurrent()
2252{

Callers

nothing calls this directly

Calls 2

TryStringOutFunction · 0.85
ImportKernelFunction · 0.70

Tested by

no test coverage detected