CardCreateDirectory Function

The CardCreateDirectory function, defined by a smart card module, creates a subdirectory of the root directory in the file system on a smart card.

Syntax

DWORD WINAPI CardCreateDirectory(
  __in  PCARD_DATA pCardData,
  __in  LPSTR pszDirectory,
  __in  CARD_DIRECTORY_ACCESS_CONDITION AccessCondition
);

Parameters

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

  • pszDirectory [in]
    A pointer to a null-terminated string that contains the name of the new directory. The string must contain eight or fewer ANSI characters.

  • AccessCondition [in]
    A member of the CARD_DIRECTORY_ACCESS_CONDITION enumeration that specifies access control permissions for the new directory.

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
ERROR_FILE_EXISTS 1280x80

A directory with the same name as the value of the pszDirectory parameter already exists, or there is not enough memory on the smart card to create the new directory.

SCARD_W_SECURITY_VIOLATION 21485323300x8010006A

The caller did not authenticate to the smart card before calling this function.

SCARD_E_INVALID_PARAMETER 21485322280x80100004

The value of the AccessCondition parameter is not a valid value of the CARD_DIRECTORY_ACCESS_CONDITION enumeration.

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

Send comments about this topic to Microsoft

Build date: 3/5/2009