Jump to content

[ SOLVED ] How to use api call


Borje
 Share

Recommended Posts

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 by Borje
Link to comment
Share on other sites

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

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

The only I know is this from a visual basic code

Public Declare Function EP_RegHardwareID Lib "test.dll" () As String

Try 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

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

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 by Inverted
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...