Jump to content

DllCall Parameter Help


Recommended Posts

Hi all.

Complete scripting (autoit + others) newbie. Sorry :)

I am experimenting with easybyte's cryptocx6 encryption DLL.

The dll comes with a demo application which can encypt / decrypt test strings etc in VB

I can see how to call the relevant function within the DLL, but don't know how to send the relevant parameters to it...

In VB, to set up the parameters etc, the functions needs (for example):

Dim Crypt As New EasyByte_Software.Cryptocxv6

Crypt.LicenseKey = "DEMO"

Crypt.InputText = "String to encrypt"

Crypt.Password = "thepassword"

; The encryption function is 'AESStringEncrypt'

txtResult = Crypt.AESStringEncrypt

Any pointers on how to set these parameters correctly (I don't know the method reference numbers - and there is nothing in the documentation)...

Any help greatly appreciated. Cheers

I don't think i can attach the DLL to the post - although I can't see the author's website stating the DEMO version cannot be distributed... just incase better not.

The trial version is here - hope that helps.

Edited by plastix
Link to comment
Share on other sites

  • Moderators

Hi all.

Complete scripting (autoit + others) newbie. Sorry :)

I am experimenting with easybyte's cryptocx6 encryption DLL.

The dll comes with a demo application which can encypt / decrypt test strings etc in VB

I can see how to call the relevant function within the DLL, but don't know how to send the relevant parameters to it...

In VB, to set up the parameters etc, the functions needs (for example):

; Crypt is the encryption object

Crypt.LicenseKey = "DEMO"

Crypt.InputText = "String to encrypt"

Crypt.Password = "thepassword"

The encryption function is 'AESStringEncrypt'

Any pointers on how to set these parameters correctly (I don't know the method reference numbers - and there is nothing in the documentation)...

Any help greatly appreciated. Cheers

You'll find others willing to help that have knowledge of the DLL information, if they don't have to go hunt down the DLL. :mellow:

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

thanks for reply.

i have registered the 'crypt.DLL'.

$o_Crypt = ObjCreate("EasyByte_Software.Cryptocxv6")

$o_Crypt.LicenseKey = "DEMO"

$o_Crypt.Password = "password"

$o_Crypt.InputText = "This is the string"

How do i execute the function "AESStringEncrypt" to capture the return ?

$result = $o_Crypt.AESStringEncrypt produces errors

Infact, there is a more complex VB set up that would be nice to know how to syntax etc in Auto-It:

Dim Crypt As New EasyByte_Software.Cryptocxv6

Call Crypt.License( "licensekey" )

Dim txtSource As Variant

Dim txtDest As Variant

Set Crypt.EncryptionMethod = New CryptRijndaelEncryptionMethod

txtSource = "This is the data to encrypt"

On Error Resume Next

Call Crypt.EncryptionMethod.SetSecretKeyFromPassPhrase("This is a weak pass phrase!", 128)

txtDest = Crypt.Encrypt(txtSource, True)

Of course both 'EasyByte_Software.Cryptocxv6' & 'CryptRijndaelEncryptionMethod' are objects... from your last pointer i can see how to substantiate an object, but i don't see any reference to how to SET the property of the 'EasyByte_Software.Cryptocxv6' to a NEW EncryptionMethod etc...

What are the "CALL" / "SET" equivalents... and how can the 'Set Crypt.EncryptionMethod = New CryptRijndaelEncryptionMethod' line be coded ?

I appreciate this is running before crawling for me, but I like to jump in at the deep end... I have looked in the CHM helpfile without much luck.

Many thanks again :)

Edited by plastix
Link to comment
Share on other sites

Don't like to bump messages... but technically this is what i'm doing (sorry :mellow: )

Looking into using external DLL for any heavy duty processing - i'd prefer to use Auto-It primarily rather than fiddle with VB primarily and use Auto-itX secondarily...

Can anyone "translate" this VB into an equivalent set of calls in Auto-It... can't seem to make it work out... I have the DLL in the script folder, but can also register it if required.

REGISTER DLL:$file = "" & @ScriptDir & "\XceedCry.dll"

RunWait('Regsvr32 /s "' & $file & '"')

Documented Call...

Dim xEnc As New XceedEncryption

Call xEnc.License( "your license key" )

Dim vaSource As Variant

Dim vaDest As Variant

Set xEnc. EncryptionMethod = New XceedRijndaelEncryptionMethod

vaSource = "This is the data to encrypt"

On Error Resume Next

Call xEnc. EncryptionMethod.SetSecretKeyFromPassPhrase("This is a weak pass phrase!", 128)

vaDest = xEnc.Encrypt(vaSource, True)

All help greatly appreciated. Cheers :)

PS - again. don't think i'm allowed to attach the trial DLL. Sorry

Edited by plastix
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...