/*++
*******************************************************************************
* Copyright (c) 1990-98 Digi International Inc., All Rights Reserved				*
* 																										*
* This software contains proprietary and confidential information of Digi		*
* International Inc.  By accepting transfer of this copy, Recipient agrees		*
* to retain this software in confidence, to prevent disclosure to others,		*
* and to make no use of this software other than that for which it was			*
* delivered.  This is an unpublished copyrighted work of Digi International	*
* Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly	*
* prohibited.																						*
* 																										*
* Restricted Rights Legend																		*
*																										*
* Use, duplication, or disclosure by the Government is subject to					*
* restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in			*
* Technical Data and Computer Software clause at DFARS 252.227-7031 or			*
* subparagraphs (c)(1) and (2) of the Commercial Computer Software -				*
* Restricted Rights at 48 CFR 52.227-19, as applicable.								*
*																										*
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343				*
*																										*
*******************************************************************************

Module Name:

   detect.h

Abstract:

   User api to the digi detect dll.

--*/

#ifndef DETECT_H
#define DETECT_H

#if defined(DETECT_INTERNAL)

#if defined(__cplusplus)
extern "C" {
#endif

#if defined(_DEBUG)
static void WINAPIV DebugOutput(TCHAR const * const pszFmt, ...)
{
   va_list val;
   TCHAR sz[2048];

   va_start(val, pszFmt);
   _vstprintf(sz, pszFmt, val);
   va_end(val);

#define THIS_FILE TEXT("DigiDtct.Dll")
   OutputDebugString(THIS_FILE TEXT(": "));
   OutputDebugString(sz);
}
#else
static void WINAPIV DebugOutput(TCHAR const * const pszFmt, ...);
   #define DebugOutput  TRUE ? ((void)0) : DebugOutput
#endif


#define   ElementCount(a)     (sizeof (a) / sizeof (a)[0])
#define   BYTES_PER_KBYTE     1024
#define   KBytesToBytes(k)    ((k) * BYTES_PER_KBYTE)


typedef enum
{
   InterfaceTypeUndefined = -1,
   Internal,
   Isa,
   Eisa,
   MicroChannel,
   TurboChannel,
   PCIBus,
   VMEBus,
   NuBus,
   PCMCIABus,
   CBus,
   MPIBus,
   MPSABus,
   ProcessorInternal,
   InternalPowerBus,
   MaximumInterfaceType
}
INTERFACE_TYPE, * PINTERFACE_TYPE;


extern void GetString(int const nID, TCHAR * const pszMsg, int const cchMax);
extern int Message(int const nID, int const uiType);

#endif   // DETECT_INTERNAL

enum
{
   Arg_ParentWindow,
   Arg_ComponentName,

   Arg_BusType,
   Arg_BusNumber,

   // Only for PCI
   Arg_SlotNumber,

   // Only for ISA
   Arg_IOBaseList = Arg_SlotNumber,
   Arg_MemBaseList,
   Arg_IRQList,

   Arg_Count
};

extern DWORD WINAPI DetectEntry(DWORD const cArgs, char const * const apszArgs[], char const ** const pszTextOut);   // !! INF Only !!

#if defined(__cplusplus)
}
#endif

#endif
