  ; ===========================================
  ; packet.inc copyright MASM32 1998 - 2003
  ; ===========================================

;PACKET_DllMain PROTO :DWORD,:DWORD,:DWORD

;BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG  BufferSize)
PacketGetAdapterNames PROTO STDCALL :DWORD, :DWORD

;LPADAPTER PacketOpenAdapter(LPTSTR AdapterName)
PacketOpenAdapter PROTO STDCALL :DWORD 

;LPPACKET PacketAllocatePacket(void)
PacketAllocatePacket PROTO STDCALL

;VOID PacketInitPacket(LPPACKET lpPacket,PVOID  Buffer,UINT  Length)
PacketInitPacket PROTO STDCALL :DWORD, :DWORD, :DWORD

;VOID PacketFreePacket(LPPACKET lpPacket)
PacketFreePacket PROTO STDCALL :DWORD

;BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites)
PacketSetNumWrites PROTO STDCALL :DWORD, :DWORD

;BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync);
PacketSendPacket PROTO STDCALL :DWORD, :DWORD, :DWORD

;VOID PacketCloseAdapter(LPADAPTER lpAdapter)
PacketCloseAdapter PROTO STDCALL :DWORD

MAX_LINK_NAME_LENGTH equ 64

ADAPTER struct 
	hFile dd ?				
	SymbolicLink db MAX_LINK_NAME_LENGTH dup(?) 
	NumWrites dw ?							
	ReadEvent dd ?								
	ReadTimeOut dw ?			
ADAPTER ends
LPADAPTER typedef ptr ADAPTER


PACKET struct   
	hEvent dd ?		
	OverLapped OVERLAPPED <>	
	Buffer PVOID ?		
	Length_ dw ?	
	ulBytesReceived dd ?	
	bIoComplete BOOLEAN ?     	
PACKET ends
LPPACKET typedef ptr PACKET
