none
固定长度字符串数组 RRS feed

  • 问题

  • Private Type HY_RT_S
        lLeft As Long
        lRight As Long
        lTop As Long
        lBottom As Long
    End Type

    Private Type ID_CD_S
        sText(10) As String * 256
        Rect(10) As HY_RT_S
    End Type

    请问上面两个vb程序转为vb.net

     

    Imports System.Runtime.InteropServices
    声明:
    Private Declare Function Get_cData Lib "Core.dll" (ByVal iType As Integer, ByVal sNameIn As String, ByVal sNameOut As String, ByVal szNameOut As String, ByRef PstOut As ID_CD_S) As Integer

    通过
    Private Sub aa() '调用结构
            dim iResult as integer
          dim sNameIn,sNameOut,sZNameOut as string
            '初始化结构
            Dim ids As New ID_CD_S
            ReDim ids.sText(9)
            ReDim ids.Rect(9)
            Dim i As Integer
            For i = 0 To 9
                ids.sText(i) = Space(256)
            Next
            sNameIn="C:\1.bmp"
            szNameOut="C:\11.bmp"
            iResult=Get_cData(1,sNameIn,"","",ids)
            '执行上面这句话时,系统报错,提示参数不正确
        End Sub
    '我用了多种方法,不能解决,请帮着分析一下,这样的问题怎么解决,谢谢

    2008年6月16日 0:21

答案

全部回复