site logo  DevDriver1testc

HomePage | Categories |* BLOG *| RecentChanges | RecentlyCommented | Login/Register
/*************************************************************************
 *
 * test.exe
 *
 * A simple test program to communicate with the Hello World driver.
 * It opens and closes the driver which will beep in response.
 *
 */

#define INCL_DOSFILEMGR          /* File Manager values */
#define INCL_DOSPROCESS
#define INCL_DOSERRORS           /* DOS Error values    */
#include <os2.h>
#include <stdio.h>
#include <string.h>


void main( )
{
	ULONG rc;
	ULONG ulAction     = 0L;
	HFILE hfFileHandle = 0L;


	rc = DosOpen( "Hello$",
	          &hfFileHandle,
	          &ulAction,
	          0,
	          FILE_NORMAL, FILE_OPEN, OPEN_SHARE_DENYNONE, NULL );
	printf("DosOpen return %d\n", rc);

	if( rc == 0 ) {
	    DosSleep(10000L);
	    rc = DosClose(hfFileHandle);
	    printf("DosClose return %d\n", rc);
	}
}

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.7
Page was generated in 0.2195 seconds