Dinkleburger
asked on
Component unidentified in DLL
Hello When i drop XAplayer Component on a form it everything works
But when i try to use the same code from the form in my DLL it wont work..
This is the complete working code on the form
//////////////////////////
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ExtCtrls, XAPlayer, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
XAPlayer1: TXAPlayer;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender : TObject);
//Var
//Player: XAPlayer.TXAPlayer;
Begin
//Player:= Nil;
XAPlayer1.LoadXAudio;
XAPlayer1.InputOpen ('C:\charlie rich - the most beautiful girl.mp3');
XAPlayer1.play;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end.
////////////////////
I include the XAPlayer in my uses.
Thanks in advance DB
But when i try to use the same code from the form in my DLL it wont work..
This is the complete working code on the form
//////////////////////////
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ExtCtrls, XAPlayer, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
XAPlayer1: TXAPlayer;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender
//Var
//Player: XAPlayer.TXAPlayer;
Begin
//Player:= Nil;
XAPlayer1.LoadXAudio;
XAPlayer1.InputOpen ('C:\charlie rich - the most beautiful girl.mp3');
XAPlayer1.play;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end.
////////////////////
I include the XAPlayer in my uses.
Thanks in advance DB
maybe you must use the registerclass-method in somewhere in your dll-modul
Perhaps you have to create it first using its Create method.
good point, geo :-)
ASKER
Hi geo
Do you mean create the Component?
the component is called XAPlayer, if so
can you show me what the create code should look like
Thanks
Do you mean create the Component?
the component is called XAPlayer, if so
can you show me what the create code should look like
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for that it works now the Mp3 is playing without user interface Cool
DB
DB