Solved

waveOutOpen () callback function problem

Posted on 1997-03-23
1
1,574 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
1 Comment
 
LVL 3

Accepted Solution

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 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

20 Experts available now in Live!

Get 1:1 Help Now