In VB.Net sieht es so aus. Brauche aber das Delphi äquivalent.
' Get certification ID as assigned by BSI ("BSI-K-TR-0374-2019" for cryptovision TSE).
' @param[out] certificationId Returned identifier string (Not null terminated) [REQUIRED]
' If successfully executed, the buffer has to freed by the function caller [@ref se_free()].
' @param[out] certificationIdLength length of the returned identifier string [REQUIRED]
' @return @ref ExecutionOk execution of the function has been successful
' @return @ref ErrorSECommunicationFailed Secure Element communication failed
' @since v2.1
' se_result_t se_getCertificationId(char**certificationId, uint32_t*certificationIdLength);
<DllImport("se-
api-c.dll", EntryPoint:="se_getCertificationId", CharSet:=CharSet.Ansi)>
Private Function GetCertificationIdSub(ByRef certificationId As IntPtr,
ByRef certificationIdLength As Integer) As SeReturnCode
End Function
Public Structure GetCertificationIdReturn
Public ReturnCode As SeReturnCode
Public certificationId As String
End Structure
Public Function GetCertificationId()
Dim ReturnStruct As GetCertificationIdReturn
Dim certificationId As IntPtr
Dim certificationIdLength As Integer
ReturnStruct.ReturnCode = GetCertificationIdSub(certificationId, certificationIdLength)
If SeReturnCode.ExecutionOk = ReturnStruct.ReturnCode Then
ReturnStruct.certificationId = PtrToStringAnsiAndFree(certificationId, certificationIdLength)
Else
ReturnStruct.certificationId = String.Empty
End If
Return ReturnStruct
End Function