Jump to content
Sign in to follow this  
stefythebest

help with image, please!

Recommended Posts

Hello!! I'm a newbie in autoit and i'm trying to make a simple gui with a button to load an image. I have a dll (written in c++ with opencv) which opens an image file from a selected path and i want to call it from my gui.

The DllCall returns 0, so it works, but the image can't be displayed (even if in the dll function a window opens automatically thanks to an opencv function)

thank you for your help! :">

Share this post


Link to post
Share on other sites

sorry, i haven't posted my code!!!

func action_agd_Button_1()

$dll1 = DllOpen("C:/Documents and Settings/Media/Desktop/PROVE_DLL/nuova dll/Debug/nuova dll.dll")

$risultato = DllCall($dll1, "void", "ApriImmagine", "void", "")

DllClose($dll1)

MsgBox(0,"Risultato della chiamata",$risultato)

;$result = DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", "Cancellare i dati?", "str", "Cancella dati", "int", 1)

endfunc

Share this post


Link to post
Share on other sites

Thank you for your help!

I make a type int in the return typre of my function and now the code is:

$dll1 = DllOpen("C:/Documents and Settings/Media/Desktop/rgb2gray/Debug/rgb2gray.dll")

$risultato = DllCall($dll1, "int", "fnRgb2gray", "int", 1)

MsgBox(0,"Risultato della chiamata",$risultato[1])

DllClose($dll1)

However, when i try to show the parameters of the function fnRgb2gray, i obtain this error:

Subscript used with non-Array variable.:

could anyone help me?

Obviously, the dll function doesn't make its work...

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...