🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
3 messages
3 total messages Started by Sebastien Fourot Tue, 27 May 2003 15:31
Form in Dll
#701
Author: Sebastien Fourot
Date: Tue, 27 May 2003 15:31
12 lines
1260 bytes
Hello, 
My problem is : I have a program that uses the Component TMediaPlayer, and I want 
export the function "Play" of this Component into a DLL. But when I debug the DLL 
with a calling application, an access violation arrive when the Dll calls 
MediaPlayer->Play.

I don't know Why?

Please help me.

Thanks.
Re: Form in Dll
#702
Author: Maynard Philbrook
Date: Tue, 27 May 2003 22:15
23 lines
1929 bytes
You can not call VCL code created in other Moduals in that manner.
 you must use standard procedure calls to interchange the action so that the
procedures will thus call the VCL code in its own modual.
 ect..
  the VCL in an exe and dll uses 2 differenent RTL..
 i guess you could use force your app to use packages which then would
cure the problem but then you would have an app with a bunch of Package
files you need to supply, this gets to look like VB the,.,.


Sebastien Fourot wrote:

> Hello,
> My problem is : I have a program that uses the Component TMediaPlayer, and I want
> export the function "Play" of this Component into a DLL. But when I debug the DLL
> with a calling application, an access violation arrive when the Dll calls
> MediaPlayer->Play.
>
> I don't know Why?
>
> Please help me.
>
> Thanks.
Re: Form in Dll
#729
Author: Marcelo R. Lopez, Jr.
Date: Mon, 23 Jun 2003 16:23
41 lines
2022 bytes
Export your own "Play" function, declare the TMediaPlayer Component as
Global, or give it an access method within the form ...then call it from
your program

TMyForm * myForm; // Global to Module....

// Export this function
void PlayFunc()
{
    if (myForm)
        myForm->PlayInterface();
}

TMyForm::TMyForm()
{
    myForm = this;
}

TMyForm::PlayInterface( )  // MUST be defined as PUBLIC in the class
definition
{
    MediaPlayer->Play();
}


"Sebastien Fourot" <fourot1@sxb.bsf.alcatel.fr> wrote in message
news:3ed384cc$1@newsgroups.borland.com...
>
> Hello,
> My problem is : I have a program that uses the Component TMediaPlayer, and
I want
> export the function "Play" of this Component into a DLL. But when I debug
the DLL
> with a calling application, an access violation arrive when the Dll calls
> MediaPlayer->Play.
>
> I don't know Why?
>
> Please help me.
>
> Thanks.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads