各位有没有陕西咸阳使用德卡T10-f 调用 readcard.dll读医疗保障卡和电子凭证的代码,我按照说明文档一直调不成功

   <DllImport("C:\readcard\readcard.dll", EntryPoint:="ReadSSECard_s", SetlastError:=True, CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function ReadSSECard_s(ByRef Retstr As String, ByRef errinfo As String) As Integer
    End Function


 Private Sub Button43_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button43.Click

        Dim aaa = ""
        Dim cwsz = ""
        Dim asdf = ReadSSECard_s(aaa, cwsz)
        txtryzd.Text = asdf

    End Sub

下面为开发文档

通过此方法可以获取社保卡基本信息,返回信息为明文,调用业务接口时将返回信息放在请求入参的“就诊凭证编号”参数上。
ReadSSECard_s
输入参数:

输出参数:
String Retstr 卡串
String errinfo 错误信息
返回值:
Int 0 成功 非0 失败

不知道哪里写错了,一直提示初始化不了

img

dllnotfound异常。确认路径是否正确。

   <DllImport("C:\readcard\readcard.dll", EntryPoint:="ReadSSECard_s", SetlastError:=True, CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function ReadSSECard_s(ByRef Retstr As char, ByRef errinfo As char) As Integer
    End Function
 
 Private Sub Button43_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button43.Click
        Dim aaa  as char
        Dim cwsz as char
        Dim asdf = ReadSSECard_s(aaa, cwsz)
        txtryzd.Text = asdf
    End Sub

使用上的代码可以调成功,但是返回的字节太短,参数使用 string 类型 ,报 “引发类型为“System.ExecutionEngineException”的异常。”,不知道啥原因