ms_open( )
Cautions | Errors | Example | See Also
Name: int ms_open (name, oflags) Inputs:
Returns: Includes: Category: Mode: Platform: Description
The ms_open( ) function opens an MSI device and returns a unique handle to identify the device. All subsequent references to the opened device must be made using the device handle.
- Note: If a parent process opens a device and enables events, there is no guarantee that the child process will receive a particular event.
Cautions
Errors
The ms_open( ) function does not return errors in the standard return code format. If an error occurred during the ms_open( ) call, a -1 will be returned, and the specific error number will be returned in the errno global variable. If a call to ms_open( ) is successful, the return value will be a handle for the opened device.
Example
#include <windows.h> /* For Windows applications only */ #include <errno.h> #include "srllib.h" #include "dtilib.h" #include "msilib.h" main() { int bddev; /* Board device descriptor variable */ /* Open board 1 device */ if ( ( bddev = ms_open( "msiB1", 0 ) ) == -1 ) { printf( "Cannot open board msiB1. errno = %d\n", errno ); exit( 1 ); } /* * Continue processing * . * . * . */ /* Done processing - close device */ if ( ms_close( bddev ) == -1 ) { printf( "Cannot close board msiB1. errno = %d", errno ); } }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation