Jump to content

I need help with DLL Funtions


Recommended Posts

Hi Everybody I want know if there is someone kind enough to help me translate this code in to Autoit please don't blame me cause I'm a newbe 

here is the code I need to translate also I want know if it's possible to look through a DLL  functions

 

Declaration in Visual Basic 6: 
Simply add the DLL import unit 'cashdll.bas' to your project, 
or add following line to the declarations part: 
Declare Function CASH_OPENCOM Lib "CASH.DLL" (ByVal CASH_COMPORT As Long) As Long 

 

Declaration in Visual Basic 6: 
Simply add the DLL import unit 'cashdll.bas' to your project, 
or add following line to the declarations part: 
Declare Sub CASH_CLOSECOM Lib "CASH.DLL" ()

 

 

and here is the code I have written so far

down below is the DLL attached also a screen shot of the  exit code of SciTE

#include<Array.au3>


$CashDLL = DllOpen("C:\Users\manue\Downloads\Casll DLL\cash.dll")


if $CashDLL Then MsgBox (0,"","CashDLL Open",0)


$HOPPER_OPENCOM = DllCall($CashDLL,"LONG","HOPPER_OPENCOM")


if isarray ($HOPPER_OPENCOM) Then
    _Arraydisplay ($HOPPER_OPENCOM)
Else
    MsgBox (0,"",@error,0)

EndIf


$HOPPER_CLOSECOM = DllCall($CashDLL,"NONE","HOPPER_CLOSECOM")

if isarray ($HOPPER_CLOSECOM) Then
    _Arraydisplay ($HOPPER_CLOSECOM)
Else
    MsgBox (0,"",@error,0)

    EndIf


DllClose ($CashDLL)

 

 

SCiTE Code.JPG

cash.dll

Link to comment
Share on other sites

As the manual clearly states, you need to open a specified COM port at initialisation of the board. Something like this perhaps (untested!):

$myCOMport = 1
$HOPPER_OPENCOM = DllCall($CashDLL,"LONG","HOPPER_OPENCOM", "long", $myCOMport)

You can examine a dll for example with dependency walker.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...