CardCreateFile Function
The CardCreateFile function, defined by a smart card module, creates a file in the specified directory of a smart card.
Syntax
DWORD WINAPI CardCreateFile(
__in PCARD_DATA pCardData,
__in LPSTR pszDirectoryName,
__in LPSTR pszFileName,
__in DWORD cbInitialCreationSize,
__in CARD_FILE_ACCESS_CONDITION AccessCondition
);
Parameters
pCardData [in]
A pointer to the CARD_DATA structure received from a call to the CardAcquireContext function.pszDirectoryName [in]
A pointer to a null-terminated string that contains a directory name. The CardCreateFile function creates the new file in this directory. The function fails if the specified directory does not exist.pszFileName [in]
A pointer to a null-terminated string that contains the name of the file to create.cbInitialCreationSize [in]
The size, in bytes, of the new file.AccessCondition [in]
A member of the CARD_FILE_ACCESS_CONDITION enumeration that specifies access control permissions for the new file.
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 file with the same name as the value of the pszFileName parameter already exists. |
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
Send comments about this topic to Microsoft
Build date: 3/5/2009