Windows 95/98/98SE/ME Sample

Windows 95/98/98SE/ME sample consists of 2 modules – sample driver and sample application, which demonstrates access to the driver. The sample driver is designed to demonstrate the technique of writing a Card Services client under Windows 95/98/98SE/ME.

Sample Driver

Windows 95/98/98SE/ME has internal Card Services, so any PC Card driver should be a Card Services client, as under Windows NT.

During SYS_DYNAMIC_DEVICE_INIT message processing, the driver registers itself like a CS client. During SYS_DYNAMIC_DEVICE_EXIT the driver deregisters itself. If driver was loaded via application, and it was built in CHECKED version, then inside of CS callback driver demonstrates techniques of interaction with memory cards, using CS read memory call. If driver was loaded via CM, as specified in .INF file card, then it should receive a PNP_NEW_DEVNODE message. During this message processing, the driver demonstrates techniques of registering PnP dispatches for the device node. This PnP dispatcher demonstrates how to filter resources of the device and starts the device.

In addition, the sample driver contains processing of IOCTLs from the user-mode application. To implement it, driver should process W32_DEVICEIOCONTROL message. This was done to demonstrate interaction with the sample application. Sample IOCTLs passes a string to the application, using synchronous or asynchronous request processing.

To adapt the driver code of your card, please modify manufacturer name and product name in the head of the MAIN.H header file. In addition, please modify SAMPLE.INF file to reflect real ID of your card and card parameters.

Sample Application

The sample application was specially written to demonstrate the communication with the sample driver. During initializing it loads the sample driver and provides the possibility to send synchronous or asynchronous requests to the driver.