VicTT Posted August 8, 2005 Share Posted August 8, 2005 void yintomid( char *in, char *mid, char *out); How do I call this function from within AutoIt?This func. is present in a dll..I can't figure out how to define a char ptr with DllStructCreate..And I'm running blind..here..pls help Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
VicTT Posted August 8, 2005 Author Share Posted August 8, 2005 The function is supposed to return the result in char *out.. Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
VicTT Posted August 8, 2005 Author Share Posted August 8, 2005 YESSS!!!I got it to work!!! Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
VicTT Posted August 8, 2005 Author Share Posted August 8, 2005 Just in case someone is helped by this code, I'm going to post it here $struct=DllStructCreate("char[128];char[128];char[128];") DllStructSetData($struct,1,$in) DllStructSetData($struct,2,$mid) DllStructSetData($struct,3,$out) DllCall("dlmid.dll","none","yintomid","ptr",DllStructGetPtr($struct,1),"ptr",DllStructGetPtr($struct,2),"ptr",DllStructGetPtr($struct,3)) Msgbox(0,"",DllStructGetData($struct,3)) Can't cease to amaze myself Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
Valik Posted August 8, 2005 Share Posted August 8, 2005 Now that you've done it the hard way, look at DllCall()'s "str" type. You're also leaking memory doing it that way. Link to comment Share on other sites More sharing options...
VicTT Posted August 10, 2005 Author Share Posted August 10, 2005 Yea..I need to Destroy the struct afterwards..I tried it with "str" by default, but I couldn't get a pointer to the data.. Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
VicTT Posted August 10, 2005 Author Share Posted August 10, 2005 PS..Thanx for the Destroy tip..forgot to do that ..I'm pretty sloppy mostly Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
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