afrihagen Posted April 23, 2007 Posted April 23, 2007 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?
afrihagen Posted April 24, 2007 Author Posted April 24, 2007 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!TKSAnders
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now