ylliX - Online Advertising Network

Logging from winapi callbacks

I am developing a C application in Visual Studio 2022, using winapi. I have some issues regarding logging (for debug purposes) from callbacks when using winapi thread pools. Below is a minimal example (without error handling, for shorter code): VOID CALLBACK WorkCallback(PTP_CALLBACK_INSTANCE instance, PVOID parameter, PTP_WORK work) { UNREFERENCED_PARAMETER(instance); UNREFERENCED_PARAMETER(parameter); UNREFERENCED_PARAMETER(work); printf(“Hello from WorkCallback\n\r”); } […]

Better logging with Emoji

Appleโ€™s developer tools provide a rich variety of debugging aids. Sometimes though, itโ€™s useful to do things the old fashioned way. With debugging, this often means just printing out data while your code runs, and then looking through the results to see whatโ€™s going on. Some scenarios where printing debug data helps include: When you […]