I’ve searched in google, but cannot find how can I add my own function to Threadpool. I have a function with signature void MyFunction(void *param);. How I can create Threadpool and add this function for assynchronos execution. I know that exist TrySubmitThreadpoolCallback() function, but I cannot understand how to use it. I’ll be very glad to see simple example.
I’ve searched in google, but cannot find how can I add my own function
Share
In order to be able to use
TrySubmitThreadpoolCallbackyou should change signature of your function toAnd then you can use it without problem. Remember that in windows most callbacks should have the
CALLBACKin their definition, because default calling convention in C is__cdeclbut in Windows API it is usually__stdcall(read itCALLBACK).