Log in

View Full Version : Question about calling functions of a dll in programming environments


Inc
18th October 2004, 12:02
Hi!

I do use PureBasic (purebasic.com) as IDE/Environment to generate some non-complex Frontends etc.

Now, Purebasic uses internally via PlayMovie(x) directshow to playback that allocated movie. BUT there are problems when playing back or seeking within mpeg2's or VOBs, ... mpeg1 is NO problem hmmm..
I also reported that Problem in the PB forums, but no helpful replies where given.

So AS PureBasic can handle external dlls, it should be possible to use an external dll to playback a moviecontent in a given Window within the main WindowInterface?

I thought about avcodec.dll ?? Coud this be done?
I already parsed the available functions withn avcodec.dll, but how can I call them or even use them?



An Purebasic dll example:

The syntax for the dll generating in Purebasic contains:

ProcedureDLL MyFunction()
MessageRequester("Hello", "This is a Message out of a PureBasic DLL !", 0)
EndProcedure


And the client application calls that dll in the following way:

If OpenLibrary(0, "PureBasic.dll")
CallFunction(0, "MyFunction")
CloseLibrary(0)
EndIf

Many thanks!!
Inc.