Solved

Song wont Play

Posted on 2002-04-24
1
163 Views
Last Modified: 2010-04-04
Hello ALL
I am writing A DLL
and have problem with the procedure below
It wont play the song...


///////////////////////// CODE  ////
Procedure CREATE;
         Var
         CHAN : HSTREAM;
       
Begin
Chan:=0;
 BASS_StreamFree(chan);
    chan := BASS_StreamCreateFile(FALSE, 'C:\charlie rich - the most beautiful girl', 0,0,0);
    BASS_StreamPlay(chan, FALSE, BASS_SAMPLE_LOOP);
     end;

//////
AS you can see the song is in C:\
the error message i get for this is

uncompatible type String and Pointer.

But this same code works in a normal delphi app
but not from My DLL
Thanks in advance Dinkleburger
0
Comment
Question by:Dinkleburger
1 Comment
 
LVL 6

Accepted Solution

by:
DrDelphi earned 50 total points
ID: 6966188
I am completely unfamiliar with the BASS_StreamCreateFile routine, but given the error message that you are getting, I am going to guess that the song title parameter should be PChar. Try this:


chan := BASS_StreamCreateFile(FALSE,PChar('C:\charlie rich - the most beautiful girl'), 0,0,0);



Good luck!!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now