| 2225 | } |
| 2226 | |
| 2227 | BFP_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 | |
| 2251 | BFP_EXPORT BfpThread* BFP_CALLTYPE BfpThread_GetCurrent() |
| 2252 | { |
nothing calls this directly
no test coverage detected