📄 sense4.h
字号:
DWORD WINAPI S4CreateDir(
IN SENSE4_CONTEXT *pS4Ctx,
IN LPCSTR lpszDirID,
IN DWORD dwDirSize,
IN DWORD dwFlags
);
/**
set the current directory
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter lpszPath [in] ID of the specified directory
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4ChangeDir(
IN SENSE4_CONTEXT *pS4Ctx,
IN LPCSTR lpszPath
);
/**
erase the root and empty the device if the specified direcotry is the device root,
otherwise erase all files or child direcotries of the specified directory.
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter lpszDirID [in] reserved, must be NULL
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4EraseDir(
IN SENSE4_CONTEXT *pS4Ctx,
IN LPCTSTR lpszDirID
);
/**
verify the pin, to reach a security status before call S4CreateDir,S4EraseDir,S4Execute,S4WriteFile.
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter pbPin [in] PIN value
@parameter dwPinLen [in] the PIN value length, the length of User PIN is 8 bytes,the length of developer PIN is 24 bytes
@parameter dwPinType [in] PIN type
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4VerifyPin(
IN SENSE4_CONTEXT *pS4Ctx,
IN BYTE *pbPin,
IN DWORD dwPinLen,
IN DWORD dwPinType
);
/**
change PIN or key value。
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter pbOldPin [in] old PIN or key value
@parameter dwOldPinLen [in] the length of old PIN or key value
@parameter pbNewPin [in] new PIN or key value
@parameter dwNewPinLen [in] the legnth of new PIN or key value
@parameter dwPinType [in] PIN or key type
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4ChangePin(
IN SENSE4_CONTEXT *pS4Ctx,
IN BYTE *pbOldPin,
IN DWORD dwOldPinLen,
IN BYTE *pbNewPin,
IN DWORD dwNewPinLen,
IN DWORD dwPinType
);
/**
create a new file or update file data
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter lpszFileID [in] ID of the specified file
@parameter dwOffset [in] offset to write the file
@parameter pBuffer [in] input data buffer
@parameter dwBufferSize [in] input data length
@parameter dwFileSize [in] file size
@parameter pdwBytesWritten [out] return the length of data written into the file
@parameter dwFlags [in] flag
@parameter bFileType [in] file type
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4WriteFile(
IN SENSE4_CONTEXT *pS4Ctx,
IN LPCSTR lpszFileID,
IN DWORD dwOffset,
IN VOID *pBuffer,
IN DWORD dwBufferSize,
IN DWORD dwFileSize,
OUT DWORD *pdwBytesWritten,
IN DWORD dwFlags,
IN BYTE bFileType
);
/**
execute the specified executable file of current directory on virtual machine
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter lpszFileID [in] ID of the executable file
@parameter pInBuffer [in] input data buffer
@parameter dwInbufferSize [in] input data length
@parameter pOutBuffer [out] output data buffer
@parameter dwOutBufferSize [in] output data buffer size
@parameter pdwBytesReturned [out] output data length
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4Execute(
IN SENSE4_CONTEXT *pS4Ctx,
IN LPCSTR lpszFileID,
IN VOID *pInBuffer,
IN DWORD dwInbufferSize,
OUT VOID *pOutBuffer,
IN DWORD dwOutBufferSize,
OUT DWORD *pdwBytesReturned
);
/**
execute the specified executable file of current directory on virtual machine
or on XA User mode
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter lpszFileID [in] ID of the executable file
@parameter dwFlag [in] executing mode
@parameter pInBuffer [in] input data buffer
@parameter dwInbufferSize [in] input data length
@parameter pOutBuffer [out] output data buffer
@parameter dwOutBufferSize [in] output data buffer size
@parameter pdwBytesReturned [out] output data length
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4ExecuteEx(
IN SENSE4_CONTEXT *pS4Ctx,
IN LPCSTR lpszFileID,
IN DWORD dwFlag,
IN VOID *pInBuffer,
IN DWORD dwInbufferSize,
OUT VOID *pOutBuffer,
IN DWORD dwOutBufferSize,
OUT DWORD *pdwBytesReturned
);
/**
create a new child directory for the current directory, and set the new
directory to current directory. if creating the root directory, the function
will create a ATR file at the same time.
@parameter pS4Ctx [in] the context pointer of the device, the device must has been opened
@parameter lpszDirID [in] ID of the new directory
@parameter dwDirSize [in] size of the new directory
@parameter dwFlags [in] flag
@parameter pCreateDirInfo [in] S4CREATEDIRINFO structure pointer
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4CreateDirEx(
IN SENSE4_CONTEXT *pS4Ctx,
IN LPCSTR lpszDirID,
IN DWORD dwDirSize,
IN DWORD dwFlags,
IN S4CREATEDIRINFO *pCreateDirInfo
);
/**
open the EliteIV device using specific mode
@paramter pS4Ctx [in][out] the context pointer of the device
@paramter pS4OpenInfo [in] S4OPENINFO structure pointer
@return value
if the function succeeds,the return vlaue is S4_SUCCESS, otherwise return other defined return value.
*/
DWORD WINAPI S4OpenEx(
IN OUT SENSE4_CONTEXT *pS4Ctx,
IN S4OPENINFO *pS4OpenInfo
);
//@}
#ifdef __cplusplus
}
#endif
#endif //__SENSE4_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -