CardDeleteDirectory Function

The CardDeleteDirectory function, defined by a smart card module, deletes a directory from a smart card. The directory must be empty, and the caller must have permission to delete that directory.


DWORD WINAPI CardDeleteDirectory(
  __in  PCARD_DATA pCardData,
  __in  LPSTR pszDirectoryName


  • 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 to delete.

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

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


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




Send comments about this topic to Microsoft

Build date: 3/5/2009