Subversion Repositories spacemission

Rev

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

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