Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Component unidentified in DLL

Posted on 2002-04-10
6
Medium Priority
?
216 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:Dinkleburger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6931377
maybe you must use the registerclass-method in somewhere in your  dll-modul
0
 
LVL 17

Expert Comment

by:geobul
ID: 6931495
Perhaps you have to create it first using its Create method.

0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6932064
good point, geo :-)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Dinkleburger
ID: 6933152
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
0
 
LVL 17

Accepted Solution

by:
geobul earned 80 total points
ID: 6933217
Hi,
It depends on what parameters Create method needs. For visual controls the usual syntax is:

Var
  Player: TXAPlayer;
....
Begin
 Player := TXAPlayer.Create(Form1);
 // or Player := TXAPlayer.Create(nil);
 try
  Player.Parent := Form1; // important for visualization
  ....//use it here
 finally
  Player.Free; // free the object at last
 end;
end;

--------
hi meikl :-)

Regards, Geo
0
 

Author Comment

by:Dinkleburger
ID: 6933512
Thanks for that it works now the Mp3 is playing without user interface Cool
DB
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question