Borje Posted October 7, 2009 Share Posted October 7, 2009 (edited) Hello all Is that anybody here can help me with this. How to use api call to example a file "test.dll" and then have result as a string If the test.dll have EP_harwareID what must I do then to call this EP_harwareID and have the result back as a string ? Please can any one give some example.. Thanks Edited October 8, 2009 by Borje Link to comment Share on other sites More sharing options...
SimonWebstation Posted October 7, 2009 Share Posted October 7, 2009 The Dll must have your function an this function you can call witch DllCall mfg. SimonMany of my answers are translated of google, because I'am from Germany Link to comment Share on other sites More sharing options...
Borje Posted October 7, 2009 Author Share Posted October 7, 2009 Yes my dll has this function.. But my question is how to use the dllcall to call this ? Link to comment Share on other sites More sharing options...
boogieoompa Posted October 7, 2009 Share Posted October 7, 2009 Not sure if this is what you are looking for but here is a sample API call from one of my scripts that saves it to a variable. This is the only way I know how to do it and the paramaters obviously need to change dependign on the DLL being referenced but something like this... $key = DllStructGetData($tRI_KD, 'VKey') Link to comment Share on other sites More sharing options...
Borje Posted October 7, 2009 Author Share Posted October 7, 2009 (edited) No I have try DllCall("test.dll", "int", "EP_RegHardwareID") but that is not working. Edited October 7, 2009 by Borje Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 7, 2009 Share Posted October 7, 2009 DllCall() and the DllStruct* functions can probably do the job, but you have to provide more interface details. There are too many ways it could be done to guess how this DLL was designed. Do you have a link to the interface description? Or contact with the DLL's coder? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Borje Posted October 7, 2009 Author Share Posted October 7, 2009 The only I know is this from a visual basic code Public Declare Function EP_RegHardwareID Lib "test.dll" () As String Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 7, 2009 Share Posted October 7, 2009 The only I know is this from a visual basic codePublic Declare Function EP_RegHardwareID Lib "test.dll" () As StringTry the source forum: Enigma Protector Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Borje Posted October 8, 2009 Author Share Posted October 8, 2009 I have contact with the developer of this dll file and the answer from him is: You can use Enigma API in your project, for example, to get hardware id just call EP_RegHardwareID function, it will return current hardware id. So you will be able to show it. And my question is what I need to do for call this EP_RegHardwareID I can not find out what I should do.. Link to comment Share on other sites More sharing options...
Inverted Posted October 8, 2009 Share Posted October 8, 2009 (edited) What does the function return ? A string,a value ? What sized value ? And remember that it returns an array, not just the return value. Try this : $return = DllCall("test.dll", "int", "EP_RegHardwareID") MsgBox (4096, "", $return[0]) Or try other parameter instead of "int" if it doesn't work. Edited October 8, 2009 by Inverted Link to comment Share on other sites More sharing options...
Borje Posted October 8, 2009 Author Share Posted October 8, 2009 Thank you Inverted. Your example works exactly as I want it to do.. Thanks again.. 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