void VectorCommand::VectorCompletionHandler( IOReturn result, void* quads[], UInt32 numQuads ) { //printf( "VectorCommand::VectorCompletionHandler - status = 0x%08lx\n", result ); CFIndex count = CFArrayGetCount( mCommandArray ); for( CFIndex index = 0; (index < count); index++ ) { Cmd * cmd = (Cmd*)mResultBuffer[index].refCon; IOReturn status = mResultBuffer[index].result; // pack 'em up like the kernel would void * args[3]; args[0] = (void*)mResultBuffer[index].bytesTransferred; args[1] = (void*)mResultBuffer[index].ackCode; args[2] = (void*)mResultBuffer[index].responseCode; // call the completion routine cmd->CommandCompletionHandler( cmd, status, args, 3 ); if( mInflightCount > 0 ) { mInflightCount--; } } (*mCallback)( mRefCon, mStatus ); }