AN APPLICATION TO TEST IF A STREAM IS LOADED
The following code when implemented as the main( ) of a Compact 7 Console application tests if the stream MYD1: has been loaded. You can use it to test any stream loaded by changing the prefix used.
LPCTSTR wstream = _T("MYD1:"); HANDLE hStr = CreateFile(wstream, GENERIC_READ | GENERIC_WRITE, 0, NULL, NULL, 0); if (hStr == (HANDLE)-1) { RETAILMSG(1, (_T("BasicTestApp: Cannot open stream: %s"),wstream)); } else { RETAILMSG(1, (_T("BasicTestApp: Opened stream: %s"),wstream)); }
Code snippet is from a console application to test if a Stream Driver has been loaded
Get Professional Windows® Embedded Compact 7 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.