CardEnumFiles Function

The CardEnumFiles function, defined by a smart card module, receives an array of the names of files available in a specified directory of a smart card.

Syntax

DWORD WINAPI CardEnumFiles(
  __in   PCARD_DATA pCardData,
  __in   LPSTR pszDirectoryName,
  __out  LPSTR *pmszFileNames,
  __out  LPDWORD pdwcbFileName,
  __in   DWORD dwFlags
);

Parameters

  • pCardData [in]
    A pointer to a CARD_DATA structure received from a call to the CardAcquireContext function.

  • pszDirectoryName [in]
    A pointer to a null-terminated string that contains the name of the directory that contains the files to enumerate.

  • pmszFileNames [out]
    A pointer to a buffer that, on output, contains an array of null-terminated strings that specify the names of the files in the directory specified by the pszDirectory parameter.

    This buffer is allocated by the smart card module and freed by the caller. When you have finished using the buffer, free it by calling the PFN_CSP_FREE function.

  • pdwcbFileName [out]
    PA pointer to a DWORD value that, on output, specifies the size, in bytes, of the pmszFileNames buffer.

  • dwFlags [in]
    Reserved. This parameter must be set to zero.

Return Value

If the function succeeds, the function returns zero.

If the function fails, it returns a nonzero error value or one of the following possible error values.

Return code/value Description
SCARD_E_INVALID_PARAMETER 21485322280x80100004

The dwFlags parameter contains a value other than zero.

Requirements

Minimum supported client Windows XP, Windows 2000 Professional with SP4
Minimum supported server Windows Server 2003, Windows 2000 Server with SP4
Header Cardmod.h

See Also

Microsoft Base Smart Card Cryptographic Service Provider

CARD_DATA

CardAcquireContext

CardCreateDirectory

CardCreateFile

Send comments about this topic to Microsoft

Build date: 3/5/2009