Subversion Repositories spacemission

Compare Revisions

Regard whitespace Rev HEAD → Rev 1

/VCL_DELPHIX_D6/DXETable.pas
5,36 → 5,15
{$INCLUDE DelphiXcfg.inc}
 
uses
Windows, SysUtils,
{$IfDef StandardDX}
{$ifdef DX7}
DirectDraw, Direct3D,DirectInput,DirectPlay,DirectSound;
{$else}
{$IfDef DX9}
DirectDraw, Direct3D9, Direct3D, D3DX9, {Direct3D8,} DX7toDX8, DirectInput, DirectPlay8, DirectSound;
// {$Else}
// {$IfDef DX81}
// D3DX8, Direct3D8, DirectInput8, DirectXGraphics, DX7toDX8, DirectPlay8;
// {$Else}
// DirectInput, Direct3D, Direct3DRM, DirectPlay;
{$EndIf}
{$EndIf}
{$Else}
DirectX;
{$EndIf}
Windows, SysUtils, DirectX;
 
 
function WindowsErrorMsg(ErrorCode: HRESULT): string;
function DDrawErrorMsg(ErrorCode: HRESULT): string;
function D3DErrorMsg(ErrorCode: HRESULT): string;
{$IFDEF D3DRM}
function D3DRMErrorMsg(ErrorCode: HRESULT): string;
{$ENDIF}
function DSoundErrorMsg(ErrorCode: HRESULT): string;
function DInputErrorMsg(ErrorCode: HRESULT): string;
{$IFDEF UseDirectPlay}
function DPlayErrorMsg(ErrorCode: HRESULT): string;
{$EndIf} // UseDirectPlay
 
implementation
 
225,7 → 204,7
Result := WindowsErrorMsg(ErrorCode);
end;
end;
{$IFDEF D3DRM}
 
function D3DRMErrorMsg(ErrorCode: HRESULT): string;
begin
case ErrorCode of
247,7 → 226,7
Result := WindowsErrorMsg(ErrorCode);
end;
end;
{$ENDIF}
 
function DSoundErrorMsg(ErrorCode: HRESULT): string;
begin
case ErrorCode of
292,82 → 271,15
DIERR_INPUTLOST : Result := 'DIERR_INPUTLOST';
DIERR_ACQUIRED : Result := 'DIERR_ACQUIRED';
DIERR_NOTACQUIRED : Result := 'DIERR_NOTACQUIRED';
HRESULT(E_PENDING) : Result := 'E_PENDING';
E_PENDING : Result := 'E_PENDING';
else
Result := WindowsErrorMsg(ErrorCode);
end;
end;
{$IFDEF UseDirectPlay}
{$IfDef DX9}
 
function DPlayErrorMsg(ErrorCode: HRESULT): string;
begin
case ErrorCode of
DPN_OK : Result := 'DPN_OK';
DPNERR_ALREADYINITIALIZED : Result := 'DPNERR_ALREADYINITIALIZED';
//DPNERR_ACCESSDENIED : Result := 'DPNERR_ACCESSDENIED';
//DPNERR_ACTIVEPLAYERS : Result := 'DPNERR_ACTIVEPLAYERS';
DPNERR_BUFFERTOOSMALL : Result := 'DPNERR_BUFFERTOOSMALL';
//DPNERR_CANTADDPLAYER : Result := 'DPNERR_CANTADDPLAYER';
DPNERR_CANTCREATEGROUP : Result := 'DPNERR_CANTCREATEGROUP';
DPNERR_CANTCREATEPLAYER : Result := 'DPNERR_CANTCREATEPLAYER';
//DPNERR_CANTCREATESESSION : Result := 'DPNERR_CANTCREATESESSION';
//DPNERR_CAPSNOTAVAILABLEYET : Result := 'DPNERR_CAPSNOTAVAILABLEYET';
DPNERR_EXCEPTION : Result := 'DPNERR_EXCEPTION';
DPNERR_GENERIC : Result := 'DPNERR_GENERIC';
DPNERR_INVALIDFLAGS : Result := 'DPNERR_INVALIDFLAGS';
DPNERR_INVALIDOBJECT : Result := 'DPNERR_INVALIDOBJECT';
DPNERR_INVALIDPARAM : Result := 'DPNERR_INVALIDPARAM, DPNERR_INVALIDPARAMS';
DPNERR_INVALIDPLAYER : Result := 'DPNERR_INVALIDPLAYER';
DPNERR_INVALIDGROUP : Result := 'DPNERR_INVALIDGROUP';
DPNERR_NOCAPS : Result := 'DPNERR_NOCAPS';
DPNERR_NOCONNECTION : Result := 'DPNERR_NOCONNECTION';
//DPNERR_NOMEMORY : Result := 'DPNERR_NOMEMORY, DPNERR_OUTOFMEMORY';
//DPNERR_NOMESSAGES : Result := 'DPNERR_NOMESSAGES';
//DPNERR_NONAMESERVERFOUND : Result := 'DPNERR_NONAMESERVERFOUND';
//DPNERR_NOPLAYERS : Result := 'DPNERR_NOPLAYERS';
//DPNERR_NOSESSIONS : Result := 'DPNERR_NOSESSIONS';
DPNERR_PENDING : Result := 'DPNERR_PENDING';
//DPNERR_SENDTOOBIG : Result := 'DPNERR_SENDTOOBIG';
//DPNERR_TIMEOUT : Result := 'DPNERR_TIMEOUT';
//DPNERR_UNAVAILABLE : Result := 'DPNERR_UNAVAILABLE';
DPNERR_UNSUPPORTED : Result := 'DPNERR_UNSUPPORTED';
//DPNERR_BUSY : Result := 'DPNERR_BUSY';
DPNERR_USERCANCEL : Result := 'DPNERR_USERCANCEL';
DPNERR_NOINTERFACE : Result := 'DPNERR_NOINTERFACE';
//DPNERR_CANNOTCREATESERVER : Result := 'DPNERR_CANNOTCREATESERVER';
DPNERR_PLAYERLOST : Result := 'DPNERR_PLAYERLOST';
//DPNERR_SESSIONLOST : Result := 'DPNERR_SESSIONLOST';
DPNERR_UNINITIALIZED : Result := 'DPNERR_UNINITIALIZED';
//DPNERR_NONEWPLAYERS : Result := 'DPNERR_NONEWPLAYERS';
DPNERR_INVALIDPASSWORD : Result := 'DPNERR_INVALIDPASSWORD';
DPNERR_CONNECTING : Result := 'DPNERR_CONNECTING';
//DPNERR_BUFFERTOOLARGE : Result := 'DPNERR_BUFFERTOOLARGE';
//DPNERR_CANTCREATEPROCESS : Result := 'DPNERR_CANTCREATEPROCESS';
//DPNERR_APPNOTSTARTED : Result := 'DPNERR_APPNOTSTARTED';
DPNERR_INVALIDINTERFACE : Result := 'DPNERR_INVALIDINTERFACE';
//DPNERR_NOSERVICEPROVIDER : Result := 'DPNERR_NOSERVICEPROVIDER';
//DPNERR_UNKNOWNAPPLICATION : Result := 'DPNERR_UNKNOWNAPPLICATION';
//DPNERR_NOTLOBBIED : Result := 'DPNERR_NOTLOBBIED';
//DPNERR_SERVICEPROVIDERLOADED : Result := 'DPNERR_SERVICEPROVIDERLOADED';
DPNERR_NOTREGISTERED : Result := 'DPNERR_NOTREGISTERED';
// Security related errors
//DPNERR_AUTHENTICATIONFAILED : Result := 'DPNERR_AUTHENTICATIONFAILED';
//DPNERR_CANTLOADSSPI : Result := 'DPNERR_CANTLOADSSPI';
//DPNERR_ENCRYPTIONFAILED : Result := 'DPNERR_ENCRYPTIONFAILED';
//DPNERR_SIGNFAILED : Result := 'DPNERR_SIGNFAILED';
//DPNERR_CANTLOADSECURITYPACKAGE : Result := 'DPNERR_CANTLOADSECURITYPACKAGE';
//DPNERR_ENCRYPTIONNOTSUPPORTED : Result := 'DPNERR_ENCRYPTIONNOTSUPPORTED';
//DPNERR_CANTLOADCAPI : Result := 'DPNERR_CANTLOADCAPI';
//DPNERR_NOTLOGGEDIN : Result := 'DPNERR_NOTLOGGEDIN';
//DPNERR_LOGONDENIED : Result := 'DPNERR_LOGONDENIED';
else
Result := WindowsErrorMsg(ErrorCode);
end;
end;
{$Else}
function DPlayErrorMsg(ErrorCode: HRESULT): string;
begin
case ErrorCode of
DP_OK : Result := 'DP_OK';
DPERR_ALREADYINITIALIZED : Result := 'DPERR_ALREADYINITIALIZED';
DPERR_ACCESSDENIED : Result := 'DPERR_ACCESSDENIED';
430,6 → 342,5
Result := WindowsErrorMsg(ErrorCode);
end;
end;
{$EndIf}
{$EndIf} // UseDirectPlay
 
end.