// Local callback for overlapped I/O.
VOID CALLBACK CAkDefaultIOHookDeferred::FileIOCompletionRoutine(
  DWORD dwErrorCode,
  DWORD dwNumberOfBytesTransfered,
  LPOVERLAPPED lpOverlapped
)
{
	AkAsyncIOTransferInfo * pXferInfo = (AkAsyncIOTransferInfo*)(lpOverlapped->hEvent);

	ReleaseOverlapped( lpOverlapped );

	AKRESULT eResult = AK_Fail;
	if ( ERROR_SUCCESS == dwErrorCode )
	{
		eResult = AK_Success;
		pXferInfo->uSizeTransferred = dwNumberOfBytesTransfered;
	}

	pXferInfo->pCallback( pXferInfo, eResult );
}
// Local callback for overlapped I/O.
VOID CALLBACK CAkDefaultIOHookDeferred::FileIOCompletionRoutine(
  DWORD dwErrorCode,
  DWORD
#ifdef _DEBUG
  dwNumberOfBytesTransfered
#endif
  ,
  LPOVERLAPPED lpOverlapped
) {
  AkAsyncIOTransferInfo *pXferInfo = (AkAsyncIOTransferInfo *)(lpOverlapped->hEvent);

  ReleaseOverlapped( lpOverlapped );

  AKRESULT eResult = AK_Fail;
  if ( ERROR_SUCCESS == dwErrorCode ) {
    eResult = AK_Success;
    AKASSERT( dwNumberOfBytesTransfered >= pXferInfo->uRequestedSize && dwNumberOfBytesTransfered <= pXferInfo->uBufferSize );
  }

  pXferInfo->pCallback( pXferInfo, eResult );
}