Article View: borland.public.cppbuilder.multimedia
Article #729Re: Form in Dll
From: Marcelo R. Lopez, Jr.
Date: Mon, 23 Jun 2003 16:23
Date: Mon, 23 Jun 2003 16:23
41 lines
2022 bytes
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.
Technical Details
Message-ID:
<3ef7289f$2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!wn14feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ed384cc$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d0fc,e4417fc3831ef86f X-Google-Attributes: gid10d0fc,public X-Google-ArrivalTime: 2003-06-23 09:22:58 PST Reply-To: "Marcelo R. Lopez, Jr." <marcelol@directvinternet.com> From: "Marcelo R. Lopez, Jr." <marcelol@directvinternet.com> Newsgroups: borland.public.cppbuilder.multimedia References: <3ed384cc$1@newsgroups.borland.com> Subject: Re: Form in Dll Date: Mon, 23 Jun 2003 12:23:48 -0400 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 64.221.40.13 Message-ID: <3ef7289f$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1056385183 64.221.40.13 (23 Jun 2003 09:19:43 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!wn14feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail