calling flash from resource?

Started by trodon, October 12, 2006, 07:39:40 PM

Previous topic - Next topic

trodon

hi, i was wondering if someone can help me,
is there any possibility to play some flash movie from resource, for example add some .swf in resource, and then how to call (play) this resource?


asmrixstar

You should just be able to use the Web dll included in the radasm package.

The dll and source code is available from http://www.radasm.com

I dont think its possible to use a 'LoadFlash' api (Like 'LoadBitmap' I think you mean) but you can include your file as binary data and then just dump it to the temp dir and delete on exit.

Look for an animated gif example that may just be what your looking for ;)

trodon

hi asmrixstar, thank you for ansver.
I know that animated gif can be included, but i was wondering, what is about other resource files.
i also wondering, is there any posibility to open some program from resource.
for example, auto run from cd-dvd when click on play button, auto run opens file from disc......but can i make simple dialog box with button, and when i press this button that open some file direct from resource (for example notepad)
in radasm i can easy add some resource in add resource option, i was added notepad in RCDATA tupe
and when i compile this exefile, she is in .RSRC section, but i dont know how to call this notepad from resource.
Quoteyou can include your file as binary data and then just dump it to the temp dir and delete on exit.
thats also interesting, but how to dump some file from resource and then call to open, can you post some example with this?

sorry4 bad english

Best regards

Ehtyar

In theory you could use VirtualAlloc, and give the memory execute permission, but i'm unsure if dep would allow you to do so, or whether or not you can run an entirely seperate program with this method. On the other hand, it's rather simple to extract resources at runtime, and just call ShellExecute or CreateProcess.
Some APIs you might consider reading up on:
FindResource
LoadResource
LockResource
CreateFile
WriteFile
CloseHandle, in that order ;)

Hope it helps, Ehtyar.