Subversion Repositories spacemission

Rev

Rev 10 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 16
Line 25... Line 25...
25
 *    URL    : http://www.infosakyu.ne.jp/~kazuya-y/index.html
25
 *    URL    : http://www.infosakyu.ne.jp/~kazuya-y/index.html
26
 *
26
 *
27
 ***************************************************************************)
27
 ***************************************************************************)
28
{
28
{
29
(c)2004 Jaro Benes Recompilation with Erik Unger's headers
29
(c)2004 Jaro Benes Recompilation with Erik Unger's headers
30
(c)2024 Daniel Marschall, small fixes
-
 
31
 
30
 
32
Join in order:
31
Join in order:
33
  1) DirectDraw
32
  1) DirectDraw
34
  2) Direct3D
33
  2) Direct3D
35
  3) Direct3DRM
34
  3) Direct3DRM
Line 14457... Line 14456...
14457
 *)
14456
 *)
14458
  JOY_OEMPOLL_PASSDRIVERDATA  = 7;
14457
  JOY_OEMPOLL_PASSDRIVERDATA  = 7;
14459
 
14458
 
14460
//DirectPlay file
14459
//DirectPlay file
14461
 
14460
 
14462
{$IFDEF UseDirectPlay} // Daniel Marschall 12.04.2024 Added to avoid Windows showing "This app requires DirectPlay"
-
 
14463
 
-
 
14464
(*==========================================================================;
14461
(*==========================================================================;
14465
 *
14462
 *
14466
 *  Copyright (C) Microsoft Corporation.  All Rights Reserved.
14463
 *  Copyright (C) Microsoft Corporation.  All Rights Reserved.
14467
 *
14464
 *
14468
 *  File:       dplay.h dplobby.h
14465
 *  File:       dplay.h dplobby.h
Line 14529... Line 14526...
14529
 * Various structures used to invoke DirectPlay.
14526
 * Various structures used to invoke DirectPlay.
14530
 *
14527
 *
14531
 ****************************************************************************)
14528
 ****************************************************************************)
14532
 
14529
 
14533
type
14530
type
-
 
14531
{$IFDEF UNICODE}
-
 
14532
  PCharAW = PWideChar;
-
 
14533
{$ELSE}
-
 
14534
  PCharAW = PAnsiChar;
-
 
14535
{$ENDIF}
14534
(*
14536
(*
14535
 * TDPID
14537
 * TDPID
14536
 * DirectPlay player and group ID
14538
 * DirectPlay player and group ID
14537
 *)
14539
 *)
14538
  TDPID = DWORD;
14540
  TDPID = DWORD;
Line 14675... Line 14677...
14675
                               // GUID_NULL for all applications.
14677
                               // GUID_NULL for all applications.
14676
    dwMaxPlayers: DWORD;       // Maximum # players allowed in session
14678
    dwMaxPlayers: DWORD;       // Maximum # players allowed in session
14677
    dwCurrentPlayers: DWORD;   // Current # players in session (read only)
14679
    dwCurrentPlayers: DWORD;   // Current # players in session (read only)
14678
    case integer of
14680
    case integer of
14679
      0 : (
14681
      0 : (
14680
    lpszSessionName: PChar;  // Name of the session
14682
    lpszSessionName: PCharAW;  // Name of the session
14681
    lpszPassword: PChar;     // Password of the session (optional)
14683
    lpszPassword: PCharAW;     // Password of the session (optional)
14682
    dwReserved1: DWORD;        // Reserved for future MS use.
14684
    dwReserved1: DWORD;        // Reserved for future MS use.
14683
    dwReserved2: DWORD;
14685
    dwReserved2: DWORD;
14684
    dwUser1: DWORD;            // For use by the application
14686
    dwUser1: DWORD;            // For use by the application
14685
    dwUser2: DWORD;
14687
    dwUser2: DWORD;
14686
    dwUser3: DWORD;
14688
    dwUser3: DWORD;
Line 14796... Line 14798...
14796
  TDPName = packed record
14798
  TDPName = packed record
14797
    dwSize: DWORD;    // Size of structure
14799
    dwSize: DWORD;    // Size of structure
14798
    dwFlags: DWORD;   // Not used. Must be zero.
14800
    dwFlags: DWORD;   // Not used. Must be zero.
14799
    case Integer of
14801
    case Integer of
14800
      0 : (
14802
      0 : (
14801
    lpszShortName : PChar; // The short or friendly name
14803
    lpszShortName : PCharAW; // The short or friendly name
14802
    lpszLongName : PChar;  // The long or formal name
14804
    lpszLongName : PCharAW;  // The long or formal name
14803
      );
14805
      );
14804
      1 : (
14806
      1 : (
14805
    lpszShortNameA : PAnsiChar;
14807
    lpszShortNameA : PAnsiChar;
14806
    lpszLongNameA : PAnsiChar;
14808
    lpszLongNameA : PAnsiChar;
14807
      );
14809
      );
Line 14820... Line 14822...
14820
  TDPCredentials = packed record
14822
  TDPCredentials = packed record
14821
    dwSize: DWORD;    // Size of structure
14823
    dwSize: DWORD;    // Size of structure
14822
    dwFlags: DWORD;   // Not used. Must be zero.
14824
    dwFlags: DWORD;   // Not used. Must be zero.
14823
    case Integer of
14825
    case Integer of
14824
      0 : (
14826
      0 : (
14825
    lpszUsername: PChar;   // User name of the account
14827
    lpszUsername: PCharAW;   // User name of the account
14826
    lpszPassword: PChar;   // Password of the account
14828
    lpszPassword: PCharAW;   // Password of the account
14827
    lpszDomain:   PChar;   // Domain name of the account
14829
    lpszDomain:   PCharAW;   // Domain name of the account
14828
      );
14830
      );
14829
      1 : (
14831
      1 : (
14830
    lpszUsernameA: PAnsiChar;   // User name of the account
14832
    lpszUsernameA: PAnsiChar;   // User name of the account
14831
    lpszPasswordA: PAnsiChar;   // Password of the account
14833
    lpszPasswordA: PAnsiChar;   // Password of the account
14832
    lpszDomainA:   PAnsiChar;   // Domain name of the account
14834
    lpszDomainA:   PAnsiChar;   // Domain name of the account
Line 14847... Line 14849...
14847
  TDPSecurityDesc = packed record
14849
  TDPSecurityDesc = packed record
14848
    dwSize: DWORD;                  // Size of structure
14850
    dwSize: DWORD;                  // Size of structure
14849
    dwFlags: DWORD;                 // Not used. Must be zero.
14851
    dwFlags: DWORD;                 // Not used. Must be zero.
14850
    case Integer of
14852
    case Integer of
14851
      0 : (
14853
      0 : (
14852
    lpszSSPIProvider : PChar;  // SSPI provider name
14854
    lpszSSPIProvider : PCharAW;  // SSPI provider name
14853
    lpszCAPIProvider : PChar;  // CAPI provider name
14855
    lpszCAPIProvider : PCharAW;  // CAPI provider name
14854
    dwCAPIProviderType: DWORD;      // Crypto Service Provider type
14856
    dwCAPIProviderType: DWORD;      // Crypto Service Provider type
14855
    dwEncryptionAlgorithm: DWORD;   // Encryption Algorithm type
14857
    dwEncryptionAlgorithm: DWORD;   // Encryption Algorithm type
14856
      );
14858
      );
14857
      1 : (
14859
      1 : (
14858
    lpszSSPIProviderA : PAnsiChar;  // SSPI provider name
14860
    lpszSSPIProviderA : PAnsiChar;  // SSPI provider name
Line 14872... Line 14874...
14872
  PDPAccountDesc = ^TDPAccountDesc;
14874
  PDPAccountDesc = ^TDPAccountDesc;
14873
  TDPAccountDesc = packed record
14875
  TDPAccountDesc = packed record
14874
    dwSize: DWORD;    // Size of structure
14876
    dwSize: DWORD;    // Size of structure
14875
    dwFlags: DWORD;   // Not used. Must be zero.
14877
    dwFlags: DWORD;   // Not used. Must be zero.
14876
    case Integer of
14878
    case Integer of
14877
      0 : (lpszAccountID : PChar);  // Account identifier
14879
      0 : (lpszAccountID : PCharAW);  // Account identifier
14878
      1 : (lpszAccountIDA : PAnsiChar);
14880
      1 : (lpszAccountIDA : PAnsiChar);
14879
      2 : (lpszAccountIDW : PWideChar);
14881
      2 : (lpszAccountIDW : PWideChar);
14880
  end;
14882
  end;
14881
 
14883
 
14882
(*
14884
(*
Line 14902... Line 14904...
14902
  PDPChat = ^TDPChat;
14904
  PDPChat = ^TDPChat;
14903
  TDPChat = packed record
14905
  TDPChat = packed record
14904
    dwSize: DWORD;
14906
    dwSize: DWORD;
14905
    dwFlags: DWORD;
14907
    dwFlags: DWORD;
14906
    case Integer of
14908
    case Integer of
14907
      0 : (lpszMessage : PChar);  // Message string
14909
      0 : (lpszMessage : PCharAW);  // Message string
14908
      1 : (lpszMessageA : PAnsiChar);
14910
      1 : (lpszMessageA : PAnsiChar);
14909
      2 : (lpszMessageW : PWideChar);
14911
      2 : (lpszMessageW : PWideChar);
14910
  end;
14912
  end;
14911
 
14913
 
14912
(*
14914
(*
Line 16150... Line 16152...
16150
  PDPLAppInfo = ^TDPLAppInfo;
16152
  PDPLAppInfo = ^TDPLAppInfo;
16151
  TDPLAppInfo = packed record
16153
  TDPLAppInfo = packed record
16152
    dwSize: DWORD;            // Size of this structure
16154
    dwSize: DWORD;            // Size of this structure
16153
    guidApplication: TGUID;   // GUID of the Application
16155
    guidApplication: TGUID;   // GUID of the Application
16154
    case Integer of           // Pointer to the Application Name
16156
    case Integer of           // Pointer to the Application Name
16155
      0: (lpszAppName: PChar);
16157
      0: (lpszAppName: PCharAW);
16156
      1: (lpszAppNameW: PWideChar);
16158
      1: (lpszAppNameW: PWideChar);
16157
      3: (lpszAppNameA: PChar);
16159
      3: (lpszAppNameA: PChar);
16158
  end;
16160
  end;
16159
 
16161
 
16160
(*
16162
(*
Line 16176... Line 16178...
16176
  PDPApplicationDesc = ^TDPApplicationDesc;
16178
  PDPApplicationDesc = ^TDPApplicationDesc;
16177
  TDPApplicationDesc = packed record
16179
  TDPApplicationDesc = packed record
16178
    dwSize: DWORD;
16180
    dwSize: DWORD;
16179
    dwFlags: DWORD;
16181
    dwFlags: DWORD;
16180
    case integer of
16182
    case integer of
16181
      0 : (lpszApplicationName: PChar;
16183
      0 : (lpszApplicationName: PCharAW;
16182
           guidApplication: TGUID;
16184
           guidApplication: TGUID;
16183
           lpszFilename: PChar;
16185
           lpszFilename: PCharAW;
16184
           lpszCommandLine: PChar;
16186
           lpszCommandLine: PCharAW;
16185
           lpszPath: PChar;
16187
           lpszPath: PCharAW;
16186
           lpszCurrentDirectory: PChar;
16188
           lpszCurrentDirectory: PCharAW;
16187
           lpszDescriptionA: PAnsiChar;
16189
           lpszDescriptionA: PAnsiChar;
16188
           lpszDescriptionW: PWideChar);
16190
           lpszDescriptionW: PWideChar);
16189
      1 : (lpszApplicationNameA: PAnsiChar;
16191
      1 : (lpszApplicationNameA: PAnsiChar;
16190
           filler1: TGUID;
16192
           filler1: TGUID;
16191
           lpszFilenameA: PAnsiChar;
16193
           lpszFilenameA: PAnsiChar;
Line 16207... Line 16209...
16207
  PDPApplicationDesc2 = ^TDPApplicationDesc2;
16209
  PDPApplicationDesc2 = ^TDPApplicationDesc2;
16208
  TDPApplicationDesc2 = packed record
16210
  TDPApplicationDesc2 = packed record
16209
    dwSize: DWORD;
16211
    dwSize: DWORD;
16210
    dwFlags: DWORD;
16212
    dwFlags: DWORD;
16211
    case integer of
16213
    case integer of
16212
      0 : (lpszApplicationName: PChar;
16214
      0 : (lpszApplicationName: PCharAW;
16213
           guidApplication: TGUID;
16215
           guidApplication: TGUID;
16214
           lpszFilename: PChar;
16216
           lpszFilename: PCharAW;
16215
           lpszCommandLine: PChar;
16217
           lpszCommandLine: PCharAW;
16216
           lpszPath: PChar;
16218
           lpszPath: PCharAW;
16217
           lpszCurrentDirectory: PChar;
16219
           lpszCurrentDirectory: PCharAW;
16218
           lpszDescriptionA: PAnsiChar;
16220
           lpszDescriptionA: PAnsiChar;
16219
           lpszDescriptionW: PWideChar;
16221
           lpszDescriptionW: PWideChar;
16220
           lpszAppLauncherName: PChar);
16222
           lpszAppLauncherName: PCharAW);
16221
      1 : (lpszApplicationNameA: PAnsiChar;
16223
      1 : (lpszApplicationNameA: PAnsiChar;
16222
           filler1: TGUID;
16224
           filler1: TGUID;
16223
           lpszFilenameA: PAnsiChar;
16225
           lpszFilenameA: PAnsiChar;
16224
           lpszCommandLineA: PAnsiChar;
16226
           lpszCommandLineA: PAnsiChar;
16225
           lpszPathA: PAnsiChar;
16227
           lpszPathA: PAnsiChar;
Line 16842... Line 16844...
16842
 *
16844
 *
16843
 ****************************************************************************)
16845
 ****************************************************************************)
16844
 
16846
 
16845
  DPLAD_SYSTEM = DPLMSG_SYSTEM;
16847
  DPLAD_SYSTEM = DPLMSG_SYSTEM;
16846
 
16848
 
16847
{$ENDIF} // IFDEF UseDirectPlay
-
 
16848
 
-
 
16849
 
16849
 
16850
//DirectSetup file
16850
//DirectSetup file
16851
(*==========================================================================
16851
(*==========================================================================
16852
 *
16852
 *
16853
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
16853
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
Line 17039... Line 17039...
17039
// API
17039
// API
17040
//
17040
//
17041
var
17041
var
17042
  DirectXSetupW : function (hWnd: HWND; lpszRootPath: PWideChar; dwFlags: DWORD) : Integer; stdcall;
17042
  DirectXSetupW : function (hWnd: HWND; lpszRootPath: PWideChar; dwFlags: DWORD) : Integer; stdcall;
17043
  DirectXSetupA : function (hWnd: HWND; lpszRootPath: PAnsiChar; dwFlags: DWORD) : Integer; stdcall;
17043
  DirectXSetupA : function (hWnd: HWND; lpszRootPath: PAnsiChar; dwFlags: DWORD) : Integer; stdcall;
17044
  DirectXSetup : function (hWnd: HWND; lpszRootPath: PChar; dwFlags: DWORD) : Integer; stdcall;
17044
  DirectXSetup : function (hWnd: HWND; lpszRootPath: PCharAW; dwFlags: DWORD) : Integer; stdcall;
17045
 
17045
 
17046
  DirectXDeviceDriverSetupW : function (hWnd: HWND; lpszDriverClass: PWideChar;
17046
  DirectXDeviceDriverSetupW : function (hWnd: HWND; lpszDriverClass: PWideChar;
17047
     lpszDriverPath: PWideChar; dwFlags: DWORD) : Integer; stdcall;
17047
     lpszDriverPath: PWideChar; dwFlags: DWORD) : Integer; stdcall;
17048
  DirectXDeviceDriverSetupA : function (hWnd: HWND; lpszDriverClass: PAnsiChar;
17048
  DirectXDeviceDriverSetupA : function (hWnd: HWND; lpszDriverClass: PAnsiChar;
17049
     lpszDriverPath: PAnsiChar; dwFlags: DWORD) : Integer; stdcall;
17049
     lpszDriverPath: PAnsiChar; dwFlags: DWORD) : Integer; stdcall;
17050
  DirectXDeviceDriverSetup : function (hWnd: HWND; lpszDriverClass: PChar;
17050
  DirectXDeviceDriverSetup : function (hWnd: HWND; lpszDriverClass: PCharAW;
17051
     lpszDriverPath: PChar; dwFlags: DWORD) : Integer; stdcall;
17051
     lpszDriverPath: PCharAW; dwFlags: DWORD) : Integer; stdcall;
17052
 
17052
 
17053
  DirectXRegisterApplicationW : function
17053
  DirectXRegisterApplicationW : function
17054
     (hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppW) : Integer; stdcall;
17054
     (hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppW) : Integer; stdcall;
17055
  DirectXRegisterApplicationA : function
17055
  DirectXRegisterApplicationA : function
17056
     (hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppA) : Integer; stdcall;
17056
     (hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppA) : Integer; stdcall;
Line 22642... Line 22642...
22642
 *  File:       dplay.h
22642
 *  File:       dplay.h
22643
 *  Content:    DirectPlay include file
22643
 *  Content:    DirectPlay include file
22644
 *
22644
 *
22645
 ***************************************************************************)
22645
 ***************************************************************************)
22646
 
22646
 
22647
{$IFDEF UseDirectPlay} // Daniel Marschall 12.04.2024 Added to avoid Windows showing "This app requires DirectPlay"
-
 
22648
function DPErrorString(Value: HResult) : string;
22647
function DPErrorString(Value: HResult) : string;
22649
begin
22648
begin
22650
  case Value of
22649
  case Value of
22651
    CLASS_E_NOAGGREGATION: Result := 'A non-NULL value was passed for the pUnkOuter parameter in DirectPlayCreate, DirectPlayLobbyCreate, or IDirectPlayLobby2::Connect.';
22650
    CLASS_E_NOAGGREGATION: Result := 'A non-NULL value was passed for the pUnkOuter parameter in DirectPlayCreate, DirectPlayLobbyCreate, or IDirectPlayLobby2::Connect.';
22652
    DPERR_ACCESSDENIED: Result := 'The session is full or an incorrect password was supplied.';
22651
    DPERR_ACCESSDENIED: Result := 'The session is full or an incorrect password was supplied.';
Line 22701... Line 22700...
22701
    DPERR_UNSUPPORTED: Result := 'The function is not available in this implementation. Returned from IDirectPlay3::GetGroupConnectionSettings and IDirectPlay3::SetGroupConnectionSettings if they are called from a session that is not a lobby session.';
22700
    DPERR_UNSUPPORTED: Result := 'The function is not available in this implementation. Returned from IDirectPlay3::GetGroupConnectionSettings and IDirectPlay3::SetGroupConnectionSettings if they are called from a session that is not a lobby session.';
22702
    DPERR_USERCANCEL: Result := 'Can be returned in two ways. 1) The user canceled the connection process during a call to the IDirectPlay3::Open method. 2) The user clicked Cancel in one of the DirectPlay service provider dialog boxes during a call to IDirectPlay3::EnumSessions.';
22701
    DPERR_USERCANCEL: Result := 'Can be returned in two ways. 1) The user canceled the connection process during a call to the IDirectPlay3::Open method. 2) The user clicked Cancel in one of the DirectPlay service provider dialog boxes during a call to IDirectPlay3::EnumSessions.';
22703
    else Result := 'Unrecognized Error';
22702
    else Result := 'Unrecognized Error';
22704
  end;
22703
  end;
22705
end;
22704
end;
22706
{$ENDIF} // UseDirectPlay
-
 
22707
 
22705
 
22708
//DirectSetup file
22706
//DirectSetup file
22709
 
22707
 
22710
(*==========================================================================
22708
(*==========================================================================
22711
 *
22709
 *
Line 22985... Line 22983...
22985
{$ELSE}
22983
{$ELSE}
22986
    DirectInputCreate := DirectInputCreateA;
22984
    DirectInputCreate := DirectInputCreateA;
22987
{$ENDIF}
22985
{$ENDIF}
22988
  end;
22986
  end;
22989
  {DirectInput}
22987
  {DirectInput}
22990
  {$IFDEF UseDirectPlay} // Daniel Marschall 12.04.2024 Added to avoid Windows showing "This app requires DirectPlay"
-
 
22991
  {DirectPlay}
22988
  {DirectPlay}
22992
  if not IsNTandDelphiRunning then
22989
  if not IsNTandDelphiRunning then
22993
  begin
22990
  begin
22994
    DPlayDLL := LoadLibrary('DPlayX.dll');
22991
    DPlayDLL := LoadLibrary('DPlayX.dll');
22995
 
22992
 
Line 23013... Line 23010...
23013
    DirectPlayLobbyCreate := DirectPlayLobbyCreateA;
23010
    DirectPlayLobbyCreate := DirectPlayLobbyCreateA;
23014
  {$ENDIF}
23011
  {$ENDIF}
23015
 
23012
 
23016
  end;
23013
  end;
23017
  {DirectPlay}
23014
  {DirectPlay}
23018
  {$ENDIF} // UseDirectPlay
-
 
23019
  {DirectSetup}
23015
  {DirectSetup}
23020
  if not IsNTandDelphiRunning then
23016
  if not IsNTandDelphiRunning then
23021
  begin
23017
  begin
23022
    LoadDSetup;
23018
    LoadDSetup;
23023
  end;
23019
  end;
Line 23066... Line 23062...
23066
  {$ENDIF}
23062
  {$ENDIF}
23067
  {Direct3DRM}
23063
  {Direct3DRM}
23068
  {DirectInput}
23064
  {DirectInput}
23069
  FreeLibrary(DInputDLL);
23065
  FreeLibrary(DInputDLL);
23070
  {DirectInput}
23066
  {DirectInput}
23071
  {$IFDEF UseDirectPlay} // Daniel Marschall 12.04.2024 Added to avoid Windows showing "This app requires DirectPlay"
-
 
23072
  {DirectPlay}
23067
  {DirectPlay}
23073
  if DPlayDLL <> 0 then FreeLibrary(DPlayDLL);
23068
  if DPlayDLL <> 0 then FreeLibrary(DPlayDLL);
23074
  {DirectPlay}
23069
  {DirectPlay}
23075
  {$ENDIF}
-
 
23076
  {DirectSetup}
23070
  {DirectSetup}
23077
  FreeLibrary(DSetupDLL);
23071
  FreeLibrary(DSetupDLL);
23078
  {DirectSetup}
23072
  {DirectSetup}
23079
  {DirectSound}
23073
  {DirectSound}
23080
  FreeLibrary(DSoundDLL);
23074
  FreeLibrary(DSoundDLL);