/* File: DxbRegHndlr.h */
#ifndef DxbRegHndlr_h
#define DxbRegHndlr_h

#if !defined NT5
#define NETCARDS_REG_PATH TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkCards")
#define DXB_REGKEY_BASE_BOARD_INSTANCE TEXT("SYSTEM\\CurrentControlSet\\Services")
#endif // #if !defined NT5
#define MFG_NAME			TEXT("Manufacturer")
#define MFG_NAME_DIGI	TEXT("Digi")
#define PROD_NAME			TEXT("ProductName")
#define PROD_NAME_DIGI	TEXT("DigiDxb")

#define MAX_PARAMS_KEY_NAME 1024
typedef struct REG_DESCRIPTOR
{
	DWORD InstanceNo;
	TCHAR DosDeviceName[MAX_DOS_DEVICE_NAME];
	mgmt_board_info_t	BoardInfo;
#if defined NT5
   TCHAR RegPath[MAX_PARAMS_KEY_NAME];
#endif // #if !defined NT5
}REG_DESCRIPTOR_T;

BOOL regEnumerateBoards(DWORD * const pnBoards);

BOOL regGetDosDeviceName(DWORD const nBoard,
								 TCHAR * const pOutBuffer,
								 DWORD const cbBufferMax);

BOOL
regGetComName(uint32	const BoardNumber,
				  uint32 const PortNumber,
				  uint32 const ChannelNumber,
				  char * const szComName,
				  size_t const cbComName);

#if !defined NT5
BOOL regSerialize(
			uint32	BoardNumber,	/* 1 to total boards or ignored if not applicable */
			uint16	Command,			/* obvious */
			void		*mpkt,			/* msg packet.  This is the data portion of the ioctl. */
			uint16	mpktlen,			/* need to know its length */
			void		*rpkt,			/* response packet.  This is the data portion of the ioctl response */
			uint16	rpktlen);			/* I hate access violations. */
#endif // #if !defined NT5

BOOL regGetBoardInfo(DWORD const BoardNumber, void * const pBuf);

#endif // #ifndef DxbRegHndlr_h
