Muokkaa

Jaa


Obtaining a PCMCIA_INTERFACE_STANDARD Interface

This section describes how a driver can obtain a PCMCIA_INTERFACE_STANDARD interface for a PCMCIA memory card from the PCMCIA bus driver.

A driver obtains a PCMCIA_INTERFACE_STANDARD interface by creating and sending an IRP_MJ_PNP request that specifies a IRP_MN_QUERY_INTERFACE minor function code. The driver carries out the following operations:

  • Allocates and zero-fills a PCMCIA_INTERFACE_STANDARD Interface Memory Card Routines structure in the paged memory pool.

  • Creates an IRP for the query interface request and gets the next stack location for the new IRP.

  • Sets the following members in the new stack location:

    • The Parameters.QueryInterface.Interface member points to the driver-allocated PCMCIA_INTERFACE_STANDARD structure that was allocated by the driver.
    • The Parameters.QueryInterface.InterfaceType member specifies a standard PCMCIA interface by the GUID value GUID_PCMCIA_INTERFACE_STANDARD.
  • Sets a completion routine and sends the request down the driver stack.

If the request is successful, the PCMCIA bus driver fills in the PCMCIA_INTERFACE_STANDARD structure pointed to by Parameters.QueryInterface.Interface.

A driver must be running at IRQL < DISPATCH_LEVEL to send this request down the driver stack.