CardRequestWindow

This function allocates a window within system memory used to access PC Card memory or I/O space. The window must be mapped by the CardMapWindow function before the window can access the PC Card.

Syntax

CARD_WINDOW_HANDLE CardRequestWindow( CARD_CLIENT_HANDLE hCardClient
PCARD_WINDOW_PARMS pCardWinParms );

Parameters

hCardClient
Client handle obtained from the CardRegisterClient function.
pCardWinParms
Pointer to a CARD_WINDOW_PARMS structure.

Return Values

A driver handle indicates success. NULL indicates failure, and GetLastError returns one of the following values:

CERR_BAD_ARGS
Indicates that the pointer specified for pCardWinParms is invalid.
CERR_BAD_SOCKET
Indicates that the socket identifier specified for the hSocket member for CARD_WINDOW_PARMS is invalid or that no PC Card is inserted.
CERR_OUT_OF_RESOURCE
Indicates that Card Services is unable to allocate memory to track the memory window or that the system has no windows available that match the requested window attributes.

Remarks

This function allocates a memory or I/O window according to the values specified in CARD_WINDOW_PARMS. You can use the returned handle for subsequent calls to the CardMapWindow and CardModifyWindow functions.

Driver Name

PCMCIA

See Also

CardMapWindow, CardModifyWindow, CardReleaseWindow