Yes, you can do it, of course.
I would write the
Dowork
function this way
Dowork(ProgressCallback funcaddr)
{
if ( funcaddr != 0)
{
while(true)
{
res = funcaddr(pinfo);
}
}
}
Anyway:
- Where is
res
defined? - As well, where is
pinfo
defined? - Why are you iterating on a neverending loop, simply discarding the callback return value?