The CardRequestWindow function allocates a window within system memory used to access PC Card memory or I/O space. The window must be mapped by CardMapWindow before the window can access the PC Card.
CARD_WINDOW_HANDLE CardRequestWindow( CARD_CLIENT_HANDLE hCardClient PCARD_WINDOW_PARMS pCardWinParms );
If successful, CardRequestWindow returns a driver handle; otherwise the return value is NULL. If the return value is NULL, GetLastError returns one of the following:
Value | Description |
---|---|
CERR_BAD_ARGS | Indicates the pointer specified for pCardWinParms is invalid. |
CERR_BAD_SOCKET | Indicates the socket identifier specified for the hSocket member for the CARD_WINDOW_PARMS structure is invalid, or a PC Card not inserted. |
CERR_OUT_OF_RESOURCE | Indicates Card Services is unable to allocate memory to track the memory window. |
CardRequestWindow allocates a memory or I/O window according to the values specified in the CARD_WINDOW_PARMS structure. You can use the returned handle for subsequent calls to CardMapWindow and CardModifyWindow.
CardMapWindow, CardModifyWindow, CardReleaseWindow