Sign in to follow this  
Followers 0
afrihagen

DLLcall

2 posts in this topic

I have a hardware device that has a .DLL to control it. The description does of course use C notation, and I want to use AutoIt.

The package contains a .lib, a .h, and a .dll file. A SDK command list gives:

BOOL DT_Robot_Init(HWND hWnd , int RobotTypeID, int DeviceID, char* ComX);

with the parameterdescription:

hWnd : The window handle

RobotTypeID : Name:1

DeviceID : Reserved

ComX : Reserved

The .h file contains the lines:

enum DTRobotTypes{rtNone,rtMiniCubis,rtPronto};

//---------------------------------------------------------------------

extern "C" __declspec(dllexport) BOOL DT_Robot_Init(HWND hWnd,int RobotTypeID,int DeviceID,char* ComX);

So; the question is how do I translate this?

Share this post


Link to post
Share on other sites



DLLCall(".\whateverdll.dll","int","DT_Robot_Init","hwnd",$hwnd,"int",1,"int",1,"str","")

Lar.

That worked. After some thinking I set $hwnd to 0, and the hardware literally swung into action!

TKS

Anders

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  
Followers 0