?
Solved

waveOutOpen () callback function problem

Posted on 1997-03-23
1
Medium Priority
?
1,731 Views
Last Modified: 2008-03-17
I can't set the callback function for the waveOutOpen () windows API call. Here is my callback function:

procedure Callback (hWave: HWAVEOUT; uMsg: UINT; dwInstance:DWORD; dwParam1:DWORD; dwParam2: DWORD);
begin
  if (uMsg = MM_WOM_DONE) then
    Application.MessageBox ('done',done',mb_Ok);
end;


and here is my waveOutOpen () system call:

waveOutOpen (@AHWaveOut,
             wCount,
             @AWaveFormatEx,
             DWORD (@Callback),
             0,
             CALLBACK_FUNCTION);

This works fine without callback function. Why doesn't this work with this callback function ? The system crashes or tells me about an illegal read...

Help !
0
Comment
Question by:yragael
[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 3

Accepted Solution

by:
sperling earned 400 total points
ID: 1334932
procedure Callback (hWave: HWAVEOUT; uMsg: UINT;
                 dwInstance:DWORD; dwParam1:DWORD; dwParam2: DWORD);


Append a stdcall; to that line.

Regards,

Erik.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
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…
Suggested Courses
Course of the Month11 days, 5 hours left to enroll

770 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