To add a dongle type that can be used by the framer, add the dongle type's identifying string and pointers to its type_Init, type_SetSpeed, and type_Deinit functions to the OEMdongleTable array. The sample source code that defines the array in OEMDONGLE.C looks like this:
DONGLE_TYPE OEMDongleTable[] =
{
{"OEM", OEM_Init, OEM_SetSpeed, OEM_Deinit }
};
U32 OEMDongleTableLen = (sizeof(OEMDongleTable)/sizeof(DONGLE_TYPE));
The DONGLE_TYPE structure is defined in _DONGLE.H:
// Data structure used to hold Dongle information
typedef struct _DONGLE_TYPE
{
char* typeName; // Name of dongle in the registry
IRLAPFRM_DONGLE_INIT init; // Pointer to init function
IRLAPFRM_DONGLE_SET set; // Pointer to setSpeed function
IRLAPFRM_DONGLE_DEINIT deinit; // Pointer to deinit function
} DONGLE_TYPE, *PDONGLE_TYPE;
So, for example, if your IR dongle device model is named the REDEYE-88 you could edit the OEMDongleTable array in OEMDONGLE.C to look like this:
DONGLE_TYPE OEMDongleTable[] =
{
{"RED88", RED88_Init, RED88_SetSpeed, RED88_Deinit}
};
You also have to write the name of your dongle type into the registry. The framer gets the names of the dongle types installed on a Windows 95 computer by reading the registry. To add your own dongle type name to the registry during development, you will have to adapt the INFRARED.INF file shipped with the DDK or use the Regedit utility. Continuing with the example, your dongle type name is "RED88." At the registry path HKEY_LOCAL_MACHINE\Enum\Infrared\Framer add the following key and value:
DongleType="RED88"
You must also add the name of your VxD to the registry. For example, if the name of your VxD is RED88.VXD, then at the registry path HKEY_LOCAL_MACHINE\Enum\Infrared\Framer you must add the following key and value:
SpeedDriver="RED88.VXD"
For information on editing the INFRARED.INF file to accomplish these changes to the registry when your VxD is installed using Setup, see Creating an Installation Diskette and Installing the IR Communications Software.