www.pudn.com > DelphiX_for7.zip   To Read all the content


[file head]:
(*==========================================================================;
*
* Copyright (C) 1994-1999 Microsoft Corporation. All Rights Reserved.
*
* DirectX header version 98.11.20
*
* Present by Hiroyuki Hori.
*
* E-Mail: hori@ingjapan.ne.jp
* Homepage: http://www.ingjapan.ne.jp/hori/index.html
* Homepage: http://www.ingjapan.ne.jp/hori/index-e.html
*
* Present unit:
* DirectX.pas DirectX 7 (DirectX 7 SDK)
* DShow.pas DirectShow (DirectX Media SDK 5.1)
* DAnim.pas DirectAnimation (DirectX Media SDK 5.1)
*
*--------------------------------------------------------------------------
*
* DirectMusic header version 1.0
*
* Present by Kazuya Yamane
*
* e-mail : kazuya-y@infosakyu.ne.jp
* URL : http://www.infosakyu.ne.jp/~kazuya-y/index.html
*
***************************************************************************)

unit DirectX;

interface

{$Z4}
{$A+}
{ $WEAKPACKAGEUNIT}

{$I
... ...

[file tail]:
... ...
irectSoundCaptureEnumerateA; external DSoundLib;
function DirectSoundCaptureEnumerateW; external DSoundLib;
function DirectSoundCaptureEnumerate; external DSoundLib name 'DirectSoundCaptureEnumerateA';

function MAKEFOURCC(ch0, ch1, ch2, ch3: Char) : DWORD;
begin
Result := Ord(ch0) + (Ord(ch1) shl 8) + (Ord(ch2) shl 16) + (Ord(ch3) shl 24);
end;

function MAKE_DMHRESULTSUCCESS(code: Cardinal) : HResult;
begin
Result := MakeResult(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)));
end;

function MAKE_DMHRESULTERROR(code: Cardinal) : HResult;
begin
Result := MakeResult(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)));
end;

// The number of bytes to allocate for an event with 'cb' data bytes.
//
function QWORD_ALIGN(x: LONGLONG): LONGLONG;
begin
Result := x + 7;
PDWORD(@Result)^ := PDWORD(@Result)^ and (not 7);
end;

function DMUS_EVENT_SIZE(cb: LONGLONG): LONGLONG;
begin
Result := QWORD_ALIGN(SizeOf(DMUS_EVENTHEADER) + cb);
end;

end.