Does anyone know how can i declare this function to VB because i get lots of errors when i try to lunch it so im expecting i should refere a variable to a pointer to make it work, but nothing works. Here is the function with the parameters:
So i ported the following AutoIt function in this format but it doesen't work at all:
Code:
$simResultsStruct = "float win; float tie; float lose; float winSd; float tieSd; float loseSd; float d94; float d90; int evaluations"
$simResults = DllStructCreate($simResultsStruct)
$result = DllCall($dll, "none", "SimulateHand", "str", $hand2, "ptr", DllStructGetPtr($simResults), "float", 0, "float", 1, "uint", 0)
Code:
Public Type simstruct
win as single
tie as single
winSd as single
tieSd as single
loseSd as single
d94 as single
d90 as single
evaluations as integer
End Type
Public Declare Function SimulateHand lib "psim.dll" (hand as string, simResults as simstruct, param1 as single, param2 as single, param3 as integer)
Private Command1_Click()
dim a as integer
SimulateHand("AsKs3s4s5s", a, 0, 1, 0)
msgbox "You win: " & a & "% percent of the time, error?"
End Sub