Freigeben über


CardCreateDirectory function

This topic is not current. For the most current information about the Smart Card API, see Smart Card Minidriver Specification.

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
128 (0x80)
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
2148532330 (0x8010006A)
The caller did not authenticate to the smart card before calling this function.
SCARD_E_INVALID_PARAMETER
2148532228 (0x80100004)
The value of the AccessCondition parameter is not a valid value of the CARD_DIRECTORY_ACCESS_CONDITION enumeration.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Cardmod.h

See also

Microsoft Base Smart Card Cryptographic Service Provider

CARD_DATA

CardAcquireContext