Q&A

  • vb를 델파이로 컨버젼하려합니다,,도와주세요 ㅜ.ㅜ
vb 로 만들어진것을 델파이로 만들려고 하는데 델파이 데이터형을 어떻해 변경해
줘야할지 모르겠어요,,,고수님 부탁합니다.

Attribute VB_Name = "TeleditOtbill"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function DLL_OTBill Lib "C:teleditTCDLL.dll" (ByVal inputstr As String, ByRef Outputstr As Byte) As Long

Private Sub clear_Click()

price.Text = ""
destAddr0 = ""
destAddr1 = ""
destAddr2 = ""
iden0 = ""
iden1 = ""

End Sub

Private Sub commerce_Click()

On Error Resume Next

    Dim payinfo As String
    Dim retcode As String
    Dim point() As Byte
    Dim i As Integer
    Dim result As String
    ReDim point(0 To 255)
    
    '변수 저장 하는 곳
    Dim Tprice As String
    Dim TdestAddr As String
    Dim Tiden As String
    
    Tprice = price.Text
    TdestAddr = destAddr0.Text & destAddr1.Text & destAddr2.Text
    Tiden = iden0.Text & iden1.Text
    
    point(0) = String(256, vbNullChar)
    
    ''''''''''''''''''
    '    bill
    ''''''''''''''''''
    payinfo = "ID=test;PWD=test;ItemType =Amount;ItemCount =1;ItemInfo = 1|" & Tprice & "|1|1270000000|test;DstAddr=" & TdestAddr & ";Iden=" & Tiden
    retcode = DLL_OTBill(payinfo, point(0))
    
    result = ""
    result = StrConv(point(), vbUnicode)

    If parsor(result, "Result") = "0" Then
    ' 결제 성공시 프로세스
      results.Text = "Result=" & parsor(result, "Result") & "   " & "TID=" & parsor(result, "TID")
      
    Else
    ' 결제 실패시 프로세스
      results.Text = "Result=" & parsor(result, "Result") & "   " & "ErrMsg=" & parsor(result, "ErrMsg")
  
    End If
End Sub


Function parsor(inputstr As String, findstr As String) As String

    Dim arr As Variant
    Dim i As Integer
    Dim temp As Variant
    
    
        arr = Split(inputstr, Chr(10))
    
        For i = 0 To UBound(arr)
            temp = Split(arr(i), Chr(61))
            
            If StrComp(Trim(temp(0)), findstr, 1) = 0 Then
                parsor = Trim(temp(1))
                Exit Function
            End If
        Next i
        
        parsor = ""
        Exit Function

End Function
0  COMMENTS