Solved

Song wont Play

Posted on 2002-04-24
1
168 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

624 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