From: DrPizza <Dr...@qu...> - 2006-03-07 23:16:59
|
> -----Original Message----- > From: Henry Nestler [mailto:Henry.Ne@Arcor.de] > Sent: 07 March 2006 19:46 > To: DrPizza > Cc: Cooperative Linux Development > Subject: Re: [coLinux-devel] nonblocking ZwWriteFile for cobd > > DrPizza wrote: > > pass a function pointer/context pointer (APC) > > > > void CALLBACK myAPCFunction(void* context) { ... > > } > > ZwCreateFile(&FileHandle, ...); > > ZwReadFile(FileHandle, > > NULL, > > &myAPCFunction, > > myAPCFunctionContext, > > &isb, > > linuxvm, > > size, > > &data->offset, > > NULL); > > Exactly this I need. > > We can coLinux send the finish via 'end_request' inside linux > kernel after block read or write request is complete. > > Must I create the "myAPCFunctionContext" with a special function? > Or can I simple use any of my (static) variable. > It must be allocated from non swapable area? The context is just a void*, so it can point to any (non-stack) variable. It shouldn't even need to be non-pagable; APC_LEVEL is pagable. So, no, no special function required. > /I not understand, why MS means I should not use args 2,3 and 4/ :( I think you can ignore them. The ZwReadFile documentation even documents the arguments so I don't think there's any problem with using them. If I had my IFS kit to hand I suspect they're fully documented there. |