How to Create and Delete Channels
The following code shows how to create two MultiCam channels for a Domino Alpha 2 board, using by-handle and by-name methods. At the end, after application code, both channels are deleted. The Status variable can be used for error checking.
[C]
//Connecting to driver
MCSTATUS Status = McOpenDriver(NULL);
//Instantiating a first channel using the by-handle method
MCHANDLE MyAlphaChannel1;
Status = McCreate(MC_CHANNEL_ALPHA_X, &MyAlphaChannel1);
//Instantiating a second channel using the by-name method
MCHANDLE MyAlphaChannel2;
Status = McCreateNm("Alpha_Y", &MyAlphaChannel2);
//...
//Application code
//...
//Deleting the channels
Status = McDelete(MyAlphaChannel1);
Status = McDelete(MyAlphaChannel2);
//Disconnecting from driver
Status = McCloseDriver();