- Linux MultiMedia Studio Computer Accessories User Manual
Mint v4 PC Programming Guide
48
MN1278 05.2001
…
…
/*================================================================*/
/* END : Replace this */
/*================================================================*/
which show code that is only relevant to the example. This is code that should be replaced with code specific to
that operating system.
Only code in the files MySimplePCI.h and MySimplePCI.cpp should be modified. Do NOT modify
SimplePCI.h and SimplePCI.cpp
Constructor.
A constructor must be supplied. This constructor must call the CSimplePCI constructor, passing the node and
card number. Any other parameters required by the class may be passed. The CMySimplePCI constructor is as
follows
/*--------------------------------------------------------------------*/
/* CMySimplePCI */
/* */
/* Function: Constructor */
/* */
/* Argument list: */
/* int nNode - Node number : not currently used */
/* int nCard - PCI card number */
/* Return value: */
/* */
/*--------------------------------------------------------------------*/
CMySimplePCI::CMySimplePCI( int nNode, int nCard ) : CSimplePCI ( nNode, nCard )
{
/*==================================================================*/
/* START : Replace this */
====================================================================*/
m_hndFile = INVALID_HANDLE_VALUE;
/*------------------------------------------------------------------*/
/* Find if we are running under Win9X or WinNT. */
/*------------------------------------------------------------------*/
OSVERSIONINFO VersionInfo;
VersionInfo.dwOSVersionInfoSize = sizeof ( OSVERSIONINFO );
GetVersionEx ( &VersionInfo );
m_bWinNT=(0!=(VersionInfo.dwPlatformId&VER_PLATFORM_WIN32_NT));
/*==================================================================*/
/* END : Replace this */
====================================================================*/
doDeviceOpen ();
}
The constructor should initialize any required data and then call doDeviceOpen() to allow communications with
the controller to start.