Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Song wont Play

Posted on 2002-04-24
1
Medium Priority
?
169 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
[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
1 Comment
 
LVL 6

Accepted Solution

by:
DrDelphi earned 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

721 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