Sign in to follow this  
Followers 0
woof

GUICtrlCreateAvi from dll

7 posts in this topic

Hello,

for my script (CreateM3U) I tried to compile my resources to a dll and use them with AutoIt. I have a .avi which works great called from file system. Trying to call the .dll resource does not work, I don't understand why.

Help file in GUICtrlCreateAvi indicates "The filename of the video. Only .avi files are supported.", but example refers to "shell32.dll" and works like charm. The "subfileid" in example is "150" and looking with Resource Hacker into shell32.dll shows the animation named also "150". In my self compiled dll (with Resource Hacker) it is named "4", but changing ani reference in example to this does not show my animation:

$ani1 = GUICtrlCreateAvi (@ScriptDir&"\CreateM3U.dll",4,50,10)

As I said, calling the .avi instead works with no problem even in example script, so I think it has no problems itself. Also the animation in .dll is played in Resource Hacker. (Download my dll.)

What am I doing wrong, what's the point I'm missing?

BTW, will there ever be a way to load a bitmap from .dll? GUICtrlCreatePic does not support something like that by now (no "subfileid"), am I right?

Regards,

Thorsten

Share this post


Link to post
Share on other sites



H woof,

at the moment I have no idea why it does not work.

I also have a problem here with using "-1" as ID-parameter.

However, you could do it with the following workaround:

Create an _empty_ file, i.e. dummy.avi.

Then add this as first!!! AVI resource, so the "resource name" should be "1".

I will examine the problem.

So long

Holger

Share this post


Link to post
Share on other sites

Hello,

sorry, I'm only part time on this problem at the moment.

Create an _empty_ file, i.e. dummy.avi.

Then add this as first!!! AVI resource, so the "resource name" should be "1".

I tried so, I hope I got you right, dummy as "1", real animation as "2". No luck (download).

Regards,

Thorsten

Share this post


Link to post
Share on other sites

This is the code I used to test and it works here (XPSP2):

#include <GUIConstants.au3>

GUICreate("Test")
GUICtrlCreateAvi(@ScriptDir & "\_CreateM3U.dll", 2, 10, 10, -1, -1, BitOr($ACS_NONTRANSPARENT, $ACS_AUTOPLAY))
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Hello,

This is the code I used to test and it works here (XPSP2)

not here (2000 SP4). Is there a way to "debug" a bit to find problems?

Regards,

Thorsten

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Ok, will do some test under 2K...

At the moment I have no idea or fast solution...

Edit: nothing new here, had to code on a different program...

Will do some tests later...

Edit2: did a test - same problem here under 2KSP4...have to check some things...

Question: do you run the script from network or is the Dll on a network share?

I run a test with the script and dll from "C:" (virtual) and then it worked...must be something special...

Edited by Holger

Share this post


Link to post
Share on other sites

At the moment I have no idea or fast solution...

Don't hurry, no need for a fast solution, my script basically works, I just want it nicer and want to try things.

do you run the script from network or is the Dll on a network share?

I run a test with the script and dll from "C:" (virtual) and then it worked...must be something special...

"C:\Programme\Multimedia\CreateM3U\test2.dll" (I renamed test file, but also in script), no network involved. I also tried "C:\test2.dll", no luck.

Regards,

Thorsten

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  
Followers 0