Jump to content
Sign in to follow this  
Mannyfresh31

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

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Colduction
      Hi AutoIt Scripters/Programmers. I have a question about MIME Tools for Notepad++:
      I've recently found a UDF about Base64 in forum, but they can't decode\encode correctly some emojis , other UTFs and etc. so i decided to use mimeTools.dll of Notepad++ or main site
      My problem is how to use this dll in AutoIt Language?

      I will be happy with your comments and answers❤ Thanks.
    • By FrancescoDiMuro
      Good morning Forums 
      In these days, I am working on a project that involved me to use some Windows APIs to obtain some information about Terminal Servers.
      I'm doing this using wtsapi32.dll in a VBA Project, but, the lack of knowledge about few things threated in the articles make this quite difficult to
      implement and understand at the same time.
      The most difficult thing I'm facing is "translating" C/C++ functions or struct in VBA when pointers are used, or pointers of pointers, and so on.
      Since VBA seems to not have a pointer type, to make those functions work I need to implement other functions taken from other DLLs, and this confuses me a lot.
      For example, starting from this code, I splitted all the functions and all the definitions to understand why they are there, and why I need to use them.
      At the end, I've found out that the code I was going to implement starting from the functions provided in the Microsoft Docs won't be ever be able to work without some supplementary functions which are not mentioned anywhere.
      So, I was wondering if someone would please point me out to a good and practical exaplanation about pointers (in general) or specifically for VBA, because I need to use them quite often in these days, and I'd like to understand what I am doing.
      Thanks in advance.

      Best Regards and Stay at home 🏡
       
    • By zuladabef
      All my scripts were working fine and now I am getting this error.  How do I resolve it?  Which folder(s) do the DLLs need to be in?
      ! Dll not found or Call Dll error !  
    • By RAMzor
      Hello all!
      I got the Acroname Programmable USB Hub based on BrainStem platform. I will use it to manage ports and read current.
      They have development kit (BRAINSTEM DEVELOPMENT KIT) with examples for any languages like C#, C++, LabVIEW and python but no AutoIt.
      The kit include BrainStem2.dll (x32 and x64), BrainStem2_LabVIEW.dll, BrainStem2CLI.dll and many examples.
      Anyone used this dll and implemented it in AutoIt?
      Please share some example for Device Discovering, User LED Flashing or power enable/disable on port to start play with this HUB
      BrainStem Reference 
       
      BrainStem2 lib+example.7z USB HUB User Manual s79-usbhub-3p_v1.10_0.pdf
    • By matwachich
      Hi guys!
      A pretty simple UDF to convert HTML to PDF using wkHTMLtoPDF.
      It uses the C API of the tool (DLL), so no external process, no ActiveX or COM sh*t.
      See the example, and the documentation of wkHTMLtoPDF.
      Cheers
      https://github.com/matwachich/wkhtmltopdf-au3
×
×
  • Create New...