Update the Driver Source Code (Compact 2013)
3/26/2014
Before you build and run tests on the sample stream driver, customize the driver source code to return useful values by using the following procedure.
To update the driver source code
In Platform Builder, open your OS design project.
In Solution Explorer, navigate to the following path:
%_WINCEROOT%\platform\<Your BSP>\src\drivers\streamdriver
Expand the Source files node, and then open streamdriver.cpp.
Modify the functions SDT_Init and SDT_Open to return values other than 0 (zero is the default value and indicates failure), as shown in the following example.
extern "C" DWORD SDT_Init(LPCTSTR pContext, DWORD dwBusContext) { // Fill in initialization code here return 1; } extern "C" DWORD SDT_Open( DWORD hDeviceContext, DWORD AccessCode, DWORD ShareMode ) { // Fill in open code here return 1; }
Save streamdriver.cpp.
You can now use this sample driver for testing, or you can modify it further to create a fully featured device driver.