From: dema@metal.dnepropetrovsk.ua (D.V.Uzhakov)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re:Re:Errors in TPW 1.5 'mmsystem.pas'
Summary: MMSYSTEM WAVEFORM
Keywords: ERROR BORLAND TURBO PASCAL FOR WINDOWS 1.5
Date: 17 Dec 92 20:31:43 GMT
Reply-To: dema%metal.dnepropetrovsk.ua@ussr.eu.net
Organization: Dneprometal

In article Message-ID:          <1992Dec9.060000.10061@emr1.emr.ca>
jagrant@emr1.emr.ca             writes:

>   I guess it depends on how Pascal's PHWaveOut is defined.  I suspect
>   that it is a pointer to a HWaveOut and that the HWaveOut is probably
>   defined in a similar fashion to the C version (i.e. a pointer to an
>   unused private struct (record in Pascal?) or simply as a UINT).
>   Check the include files for Pascal - I bet they are the same.
>
>   Does Pascal have the equivalent of STRICT?
>

No ! In 'mmsystem.pas' for TPW 1.5 , writeen :
...
{ waveform audio data types }
type
  PHWave = ^HWave;
  HWave = Word;

  PHWaveIn = ^HWaveIn;
  HWaveIn = Word;

  PHWaveOut = ^HWaveOut;
  HWaveOut = Word;

...
   I think, TPW 1.5 file 'mmsystem.pas' is error in passed parameter "HWAVE"
in functions :
function waveOutPause           (hWaveOut: PHWaveOut ): Word;
function waveOutRestart         (hWaveOut: PHWaveOut ): Word;
function waveOutReset           (hWaveOut: PHWaveOut ): Word;
function waveOutBreakLoop       (hWaveOut: PHWaveOut  ): Word;
function waveOutGetPosition     (hWaveOut: PHWaveOut ; lpInfo: PMMTime;  uSize: Word): Word;
function waveOutGetPitch        (hWaveOut: PHWaveOut ; lpdwPitch: PLongint): Word;
function waveOutSetPitch        (hWaveOut: PHWaveOut; dwPitch: Longint): Word;
function waveOutGetPlaybackRate (hWaveOut: PHWaveOut;lpdwRate: PLongint): Word;
function waveOutSetPlaybackRate (hWaveOut: PHWaveOut; dwRate: Longint): Word;
function waveOutGetID           (hWaveOut: PHWaveOut; lpuDeviceID: PWord): Word;
function waveOutMessage         (hWaveOut: PHWaveOut; uMessage: Word;  dw1, dw2: Longint): Longint;

function waveInClose            (hWaveIn: PHWaveIn): Word;
function waveInPrepareHeader    (hWaveIn: PHWaveIn; lpWaveInHdr: PWaveHdr;  uSize: Word): Word;
function waveInUnprepareHeader  (hWaveIn: PHWaveIn; lpWaveInHdr: PWaveHdr; uSize: Word): Word;
function waveInAddBuffer        (hWaveIn: PHWaveIn; lpWaveInHdr: PWaveHdr; uSize: Word): Word;
function waveInStart            (hWaveIn: PHWaveIn): Word;
function waveInStop             (hWaveIn: PHWaveIn): Word;
function waveInReset            (hWaveIn: PHWaveIn): Word;
function waveInGetPosition      (hWaveIn: PHWaveIn; lpInfo: PMMTime; uSize: Word): Word;
function waveInGetID            (hWaveIn: PHWaveIn; lpuDeviceID: PWord): Word;
function waveInMessage          (hWaveIn: PHWaveIn; uMessage: Word; dw1, dw2: Longint): Longint;

Correct passed : ... ( hWaveOut: HWaveOut ;  ...     !!!

Only  this functions is correct in passed parameter "HWAVE"  :

function waveOutOpen            (lphWaveOut: PHWaveOut; uDeviceID: Word; lpFormat: PWaveFormat; dwCallback, dwInstance, dwFlags: Longint): Word;
function waveInOpen             (lphWaveIn:  PHWaveIn ; uDeviceID: Word; lpFormat: PWaveFormat; dwCallback, dwInstance, dwFlags: Longint): Word;

Tray all this function in program for TPW 1.5 !

   Thanks in advance for any replies.
   Dementiy.
---------------------------------------------------------------------------
  Dementiy V. Uzhakov                  DNEPROMETALOOPTTORG, UKRAINE
  dema@metal.dnepropetrovsk.ua         Chief Departmment Information
---------------------------------------------------------------------------
Xref: sparky comp.os.ms-windows.programmer.misc:4377 comp.os.ms-windows.programmer.tools:1776