size_calc(....){
PIO_WORKITEM WorkItem;
IoAllocateWorkItem(pDeviceObject);
IoInitializeWorkItem(pDeviceObject,WorkItem;)
IoQueueWorkItem(WorkItem, WorkItemRoutin, DelayedWorkQueue, Context);
....
....
...
}
WorkItemRoutin(....,PVOID Context)
{
//do operation
Context->size=10;//just example
}
processCreationcallback()
{
int i=0;
size_calc();
if (Context->size > 0)
{
//do-some-operation
}
}