src/SeeDll/Packet32.c
/*!
  \brief Returns the status of the kernel dump process, i.e. tells if one of the limits defined with PacketSetDumpLimits() was reached.
  \param AdapterObject Pointer to an _ADAPTER structure.
  \param sync if TRUE, the function blocks until the dump is finished, otherwise it returns immediately.
  \return TRUE if the dump is ended, FALSE otherwise.

  PacketIsDumpEnded() informs the user about the limits that were set with a previous call to 
  PacketSetDumpLimits().

  \warning If no calls to PacketSetDumpLimits() were performed or if the dump process has no limits 
  (i.e. if the arguments of the last call to PacketSetDumpLimits() were both 0), setting sync to TRUE will
  block the application on this call forever.
*/
\brief Returns the status of the kernel dump process, i.e. tells if one of the limits defined with PacketSetDumpLimits() was reached.
\param AdapterObject Pointer to an _ADAPTER structure.
\param sync if TRUE, the function blocks until the dump is finished, otherwise it returns immediately.
\return TRUE if the dump is ended, FALSE otherwise.

PacketIsDumpEnded() informs the user about the limits that were set with a previous call to
PacketSetDumpLimits().

\warning If no calls to PacketSetDumpLimits() were performed or if the dump process has no limits
were both 0), setting sync to TRUE will
block the application on this call forever.
\ brief Returns the status of the kernel dump process i . e . tells if one of the limits defined with PacketSetDumpLimits () was reached . \ param AdapterObject Pointer to an _ADAPTER structure . \ param sync if TRUE the function blocks until the dump is finished otherwise it returns immediately . \ return TRUE if the dump is ended FALSE otherwise . PacketIsDumpEnded () informs the user about the limits that were set with a previous call to PacketSetDumpLimits () . \ warning If no calls to PacketSetDumpLimits () were performed or if the dump process has no limits were both 0 ) setting sync to TRUE will block the application on this call forever .
BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync)
{
	DWORD		BytesReturned;
	int		IsDumpEnded;
	BOOLEAN	res;
#ifndef _WINNT4
	if(AdapterObject->Flags != INFO_FLAG_NDIS_ADAPTER)
	{
		ODS("PacketIsDumpEnded: not allowed on wan adapters\n");
		return FALSE;
	}
#endif 
	if(sync)
		WaitForSingleObject(AdapterObject->ReadEvent, INFINITE);
    res = DeviceIoControl(AdapterObject->hFile,
		pBIOCISDUMPENDED,
		NULL,
		0,
		&IsDumpEnded,
		4,
		&BytesReturned,
		NULL);
	if(res == FALSE) return TRUE; 
	return (BOOLEAN)IsDumpEnded;
}
BOOLEAN PacketIsDumpEnded ( LPADAPTER AdapterObject , BOOLEAN sync ) { DWORD BytesReturned ; int IsDumpEnded ; BOOLEAN res ; #ifndef _WINNT4 if ( AdapterObject -> Flags != INFO_FLAG_NDIS_ADAPTER ) { ODS ( " \n " ) ; return FALSE ; } #endif if ( sync ) WaitForSingleObject ( AdapterObject -> ReadEvent , INFINITE ) ; res = DeviceIoControl ( AdapterObject -> hFile , pBIOCISDUMPENDED , NULL , 0 , & IsDumpEnded , 4 , & BytesReturned , NULL ) ; if ( res == FALSE ) return TRUE ; return ( BOOLEAN ) IsDumpEnded ; }
\brief Returns the status of the kernel dump process, i.e.
\ brief Returns the status of the kernel dump process i . e .
// _WINNT4
 // If the IOCTL returns an error we consider the dump finished
