Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15162

About RC6.stdCall

$
0
0
I'm testing RC6.stdCall. When the program runs to the callback function, VB6-IDE will stop working. I don't know if my usage is correct, here is the test code:

Code:

Public Sub DoTest_Callback()
    Dim arr As Variant
   
    arr = Array("Peal", "Apple", "Peach")
   
    ForEach arr, AddressOf ForEach_ShowName
   
End Sub

Public Sub ForEach(arr, pfnAction As Long)
    Dim i As Long, sRet As String
   
    For i = 0 To UBound(arr)
        sRet = New_c.stdCall(retByte, pfnAction, arr(i))
        Debug.Print sRet
    Next i

End Sub

Private Function ForEach_ShowName(name As String) As String
    ForEach_ShowName = "This is " + name
End Function


Viewing all articles
Browse latest Browse all 15162

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>