Hi everyone!

Not long after that Shawn helped me with the BCPwrapper, my boss came along... with another barcode scanner.
I told him that he should stick to the first one, but 'he's the boss' \:\/
(the new one is a small key-chain thingy...and *it's sooo much cooler* )

Anyways... The new scanner came with a much better SDK, so I thought I'd take a look at it, and the dll can't be registered.

Now I'm back at DynaWrap again, and I can contact the scanner, so I know that I have made some progress with it.
There is just some things that needs a bit of clarification =)

Here's my test so far:
 Code:
$Port = 15


$dyn = CreateObject("DynamicWrapper")
?? @error
$nul = $dyn.Register("C:\Windows\System\Csp2.dll", "csp2Init", "i=l", "f=s", "r=l")
?? @error
$dOpen = $dyn.csp2Init($Port)
?? @error
$nul = $dyn.Register("C:\Windows\System\Csp2.dll", "csp2DataAvailable","i=l", "f=s", "r=l")
?? @error
debug on
$dDA = $dyn.csp2DataAvailable()
?? @error
? @serror


By changing ports, I have verified that it works as far as opening it, but when I get to the error output after $dDA, I get:

-2147352562
Invalid number of parameters.

I have probably overlooked something, the question is what \:\)

In the SDK I found this:
 Code:
Declare Function csp2Init Lib "csp2.dll" (ByVal nComPort As Long) As Long
Declare Function csp2DataAvailable Lib "csp2.dll" () As Long 


So what makes the first one work, and the other not?

/Viggen