The Card Services component is a protected mode VxD module that is linked with the PCMCIA bus enumerator. It provides a protected mode PCMCIA Card Services 2.x interface for protected mode Card Services clients. Card Services passes the event notification from Socket Services to the PCMCIA bus enumerator, provides information from the PC cards to the PCMCIA bus enumerator, and sets up the configuration for PC cards in the adapter sockets.
This section describes the Card Services binding for VxD clients. The calling mechanism is the VxD service interface — any VxDs requiring access to Card Services must include PCCARD.INC. This include file contains the PCCARD service-access table that allows the client VxD to use the VxDCall macro to call Card Services.
The VxD Card Services interface is not available during system initialization. Clients should register with Card Services while processing the Init_Complete message. Clients registering at this point still have the opportunity to abort loading if Card Services is not present.
MASM version 6.x is required for the structure definitions in the Card Services interface.
PCCARD.386 offers two services: PCCARD_Get_Version and PCCARD_Card_Services. Access to all Card Services is through the PCCARD_Card_Services service. As with all VxD services, clients should call PCCARD_Get_Version to ensure that PCCARD is loaded before attempting to call PCCARD_Card_Services.
Parameters are passed in registers following the recommended binding in the PCMCIA Standards manual for 0:32 protected mode clients:
Register | Description |
[AL] | Function |
[DX] | Handle |
[ESI] | Pointer (32 bit offset) |
[CX] | ArgLength |
[EBX] | ArgPointer (32 bit offset) |
[AX] | Status |
[CF] | Reset to zero when request was successful, set to one when request has failed. |
All calls and returns are near.
All entry registers are preserved unless the same register is used for a return value.
The following table gives the arguments for callback handlers:
Register | Description |
[AL] | Function |
[CX] | Socket |
[DX] | Info |
[DI] | First word of RegisterClient argument packet ClientData field |
[ESI] | Third and fourth word of RegisterClient argument packet ClientData field |
[EBP] | MTD request |
[EBX] | Buffer |
[BX] | Misc. (when no buffer is specified) |
[AX] | Status on return to Card Services |
[CF] | Returned reset to zero when the callback completed successfully, set to one if Status is not SUCCESS. |
The following table gives the register_client argument packet ClientData field:
Offset | Description |
0 | 16 bit data determined by client |
2 | 16 bit reserved (reset to zero) |
4 | 32 bit offset determined by client |
For detailed information on the other functions, see the PCMCIA Standards manual.