// H to Pas Converter Ver.0.17.0.20
//     Date : 26 9 1999
//   Source : d3drm.h

unit d3drm;

{$X+}{$Z2}

interface

uses Windows, Ole2, ddraw, d3drmobj, d3drmdef, d3dtypes, d3d;

(*==========================================================================;
 *
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
 *
 *  File:       d3drm.h
 *  Content:    Direct3DRM include file
 *
 ***************************************************************************)





const
  IID_IDirect3DRM: TGUID = (
    D1:$2bc49361;D2:$8327;D3:$11cf;D4:($ac,$4a,$0,$0,$c0,$38,$25,$a1));
  IID_IDirect3DRM2: TGUID = (
    D1:$4516ecc8;D2:$8f20;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
  IID_IDirect3DRM3: TGUID = (
    D1:$4516ec83;D2:$8f20;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));

(*
 * Direct3DRM Object Class (for CoCreateInstance())
 *)
const
  CLSID_CDirect3DRM: TGUID = (
    D1:$4516ec41;D2:$8f20;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));



{$UNDEF INTERFACE}
// Error :  #define INTERFACE IDirect3DRM

type

  IDirect3DRM = class;
  LPDIRECT3DRM	= IDirect3DRM;
  IDirect3DRM2 = class;
  LPDIRECT3DRM2	= IDirect3DRM2;
  IDirect3DRM3 = class;
  LPDIRECT3DRM3	= IDirect3DRM3;


  IDirect3DRM = class ( IUnknown )
    //function IUNKNOWN_METHODS(Para0: PURE): Integer; stdcall;

    function CreateObject(rclsid: TCLSID; pUnkOuter: IUnknown; riid: TIID; var ppv: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateFrame(Para0: LPDIRECT3DRMFRAME; var Para1: LPDIRECT3DRMFRAME): HRESULT; virtual; stdcall; abstract;
    function CreateMesh(var Para0: LPDIRECT3DRMMESH): HRESULT; virtual; stdcall; abstract;
    function CreateMeshBuilder(var Para0: LPDIRECT3DRMMESHBUILDER): HRESULT; virtual; stdcall; abstract;
    function CreateFace(var Para0: LPDIRECT3DRMFACE): HRESULT; virtual; stdcall; abstract;
    function CreateAnimation(var Para0: LPDIRECT3DRMANIMATION): HRESULT; virtual; stdcall; abstract;
    function CreateAnimationSet(var Para0: LPDIRECT3DRMANIMATIONSET): HRESULT; virtual; stdcall; abstract;
    function CreateTexture(Para0: LPD3DRMIMAGE; var Para1: LPDIRECT3DRMTEXTURE): HRESULT; virtual; stdcall; abstract;
    function CreateLight(Para0: D3DRMLIGHTTYPE; Para1: D3DCOLOR; var Para2: LPDIRECT3DRMLIGHT): HRESULT; virtual; stdcall; abstract;
    function CreateLightRGB(Para0: D3DRMLIGHTTYPE; Para1: D3DVALUE; Para2: D3DVALUE;
	 Para3: D3DVALUE; var Para4: LPDIRECT3DRMLIGHT): HRESULT; virtual; stdcall; abstract;
    function CreateMaterial(Para0: D3DVALUE; var Para1: LPDIRECT3DRMMATERIAL): HRESULT; virtual; stdcall; abstract;
    function CreateDevice(Para0: DWORD; Para1: DWORD; var Para2: LPDIRECT3DRMDEVICE): HRESULT; virtual; stdcall; abstract;

(* Create a Windows Device using DirectDraw surfaces *)
    function CreateDeviceFromSurface(PGUID: PGUID; lpDD: IDirectDraw; lpDDSBack: IDirectDrawSurface;
	 Para0: LPDIRECT3DRMDEVICE): HRESULT; virtual; stdcall; abstract;

(* Create a Windows Device using D3D objects *)
    function CreateDeviceFromD3D(lpD3D: IDirect3D; lpD3DDev: IDirect3DDevice; Para0: LPDIRECT3DRMDEVICE): HRESULT; virtual; stdcall; abstract;

    function CreateDeviceFromClipper(lpDDClipper: IDirectDrawClipper; PGUID: PGUID;
	 width: Integer; height: Integer; var Para0: LPDIRECT3DRMDEVICE): HRESULT; virtual; stdcall; abstract;

    function CreateTextureFromSurface(lpDDS: IDirectDrawSurface; var Para0: LPDIRECT3DRMTEXTURE): HRESULT; virtual; stdcall; abstract;

    function CreateShadow(Para0: LPDIRECT3DRMVISUAL; Para1: LPDIRECT3DRMLIGHT;
	 px: D3DVALUE; py: D3DVALUE; pz: D3DVALUE; nx: D3DVALUE; ny: D3DVALUE; nz: D3DVALUE;
	 Para2: LPDIRECT3DRMVISUAL): HRESULT; virtual; stdcall; abstract;
    function CreateViewport(Para0: LPDIRECT3DRMDEVICE; Para1: LPDIRECT3DRMFRAME;
	 Para2: DWORD; Para3: DWORD; Para4: DWORD; Para5: DWORD; Para6: LPDIRECT3DRMVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function CreateWrap(Para0: D3DRMWRAPTYPE; Para1: LPDIRECT3DRMFRAME; ox: D3DVALUE;
	 oy: D3DVALUE; oz: D3DVALUE; dx: D3DVALUE; dy: D3DVALUE; dz: D3DVALUE; ux: D3DVALUE;
	 uy: D3DVALUE; uz: D3DVALUE; ou: D3DVALUE; ov: D3DVALUE; su: D3DVALUE; sv: D3DVALUE;
	 Para2: LPDIRECT3DRMWRAP): HRESULT; virtual; stdcall; abstract;
    function CreateUserVisual(Para0: D3DRMUSERVISUALCALLBACK; lPArg: Pointer; var Para1: LPDIRECT3DRMUSERVISUAL): HRESULT; virtual; stdcall; abstract;
    function LoadTexture(const Para0: PChar; var Para1: LPDIRECT3DRMTEXTURE): HRESULT; virtual; stdcall; abstract;
    function LoadTextureFromResource(rs: HRSRC; var Para0: LPDIRECT3DRMTEXTURE): HRESULT; virtual; stdcall; abstract;

    function SetSearchPath(Para0: LPCSTR): HRESULT; virtual; stdcall; abstract;
    function AddSearchPath(Para0: LPCSTR): HRESULT; virtual; stdcall; abstract;
    function GetSearchPath(size_return: PDWORD; path_return: LPSTR): HRESULT; virtual; stdcall; abstract;
    function SetDefaultTextureColors(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetDefaultTextureShades(Para0: DWORD): HRESULT; virtual; stdcall; abstract;

    function GetDevices(var Para0: LPDIRECT3DRMDEVICEARRAY): HRESULT; virtual; stdcall; abstract;
    function GetNamedObject(const Para0: PChar; var Para1: LPDIRECT3DRMOBJECT): HRESULT; virtual; stdcall; abstract;

    function EnumerateObjects(Para0: D3DRMOBJECTCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;

    function Load(Para0: Pointer; Para1: Pointer; var Para2: PIID; Para3: DWORD;
	 Para4: D3DRMLOADOPTIONS; Para5: D3DRMLOADCALLBACK; Para6: Pointer; Para7: D3DRMLOADTEXTURECALLBACK;
	 Para8: Pointer; Para9: LPDIRECT3DRMFRAME): HRESULT; virtual; stdcall; abstract;
    function Tick(Para0: D3DVALUE): HRESULT; virtual; stdcall; abstract;
  end;



{$UNDEF INTERFACE}
// Error :  #define INTERFACE IDirect3DRM2

  IDirect3DRM2 = class ( IUnknown )
    //function IUNKNOWN_METHODS(Para0: PURE): Integer; stdcall;

    function CreateObject(rclsid: TCLSID; pUnkOuter: IUnknown; riid: TIID; var ppv: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateFrame(Para0: LPDIRECT3DRMFRAME; var Para1: LPDIRECT3DRMFRAME2): HRESULT; virtual; stdcall; abstract;
    function CreateMesh(var Para0: LPDIRECT3DRMMESH): HRESULT; virtual; stdcall; abstract;
    function CreateMeshBuilder(var Para0: LPDIRECT3DRMMESHBUILDER2): HRESULT; virtual; stdcall; abstract;
    function CreateFace(var Para0: LPDIRECT3DRMFACE): HRESULT; virtual; stdcall; abstract;
    function CreateAnimation(var Para0: LPDIRECT3DRMANIMATION): HRESULT; virtual; stdcall; abstract;
    function CreateAnimationSet(var Para0: LPDIRECT3DRMANIMATIONSET): HRESULT; virtual; stdcall; abstract;
    function CreateTexture(Para0: LPD3DRMIMAGE; var Para1: LPDIRECT3DRMTEXTURE2): HRESULT; virtual; stdcall; abstract;
    function CreateLight(Para0: D3DRMLIGHTTYPE; Para1: D3DCOLOR; var Para2: LPDIRECT3DRMLIGHT): HRESULT; virtual; stdcall; abstract;
    function CreateLightRGB(Para0: D3DRMLIGHTTYPE; Para1: D3DVALUE; Para2: D3DVALUE;
	 Para3: D3DVALUE; var Para4: LPDIRECT3DRMLIGHT): HRESULT; virtual; stdcall; abstract;
    function CreateMaterial(Para0: D3DVALUE; var Para1: LPDIRECT3DRMMATERIAL): HRESULT; virtual; stdcall; abstract;
    function CreateDevice(Para0: DWORD; Para1: DWORD; var Para2: LPDIRECT3DRMDEVICE2): HRESULT; virtual; stdcall; abstract;

(* Create a Windows Device using DirectDraw surfaces *)
    function CreateDeviceFromSurface(PGUID: PGUID; lpDD: IDirectDraw; lpDDSBack: IDirectDrawSurface;
	 Para0: LPDIRECT3DRMDEVICE2): HRESULT; virtual; stdcall; abstract;

(* Create a Windows Device using D3D objects *)
    function CreateDeviceFromD3D(lpD3D: IDirect3D2; lpD3DDev: IDirect3DDevice2;
	 Para0: LPDIRECT3DRMDEVICE2): HRESULT; virtual; stdcall; abstract;

    function CreateDeviceFromClipper(lpDDClipper: IDirectDrawClipper; PGUID: PGUID; 
	 width: Integer; height: Integer; var Para0: LPDIRECT3DRMDEVICE2): HRESULT; virtual; stdcall; abstract;

    function CreateTextureFromSurface(lpDDS: IDirectDrawSurface; var Para0: LPDIRECT3DRMTEXTURE2): HRESULT; virtual; stdcall; abstract;

    function CreateShadow(Para0: LPDIRECT3DRMVISUAL; Para1: LPDIRECT3DRMLIGHT; 
	 px: D3DVALUE; py: D3DVALUE; pz: D3DVALUE; nx: D3DVALUE; ny: D3DVALUE; nz: D3DVALUE; 
	 Para2: LPDIRECT3DRMVISUAL): HRESULT; virtual; stdcall; abstract;
    function CreateViewport(Para0: LPDIRECT3DRMDEVICE; Para1: LPDIRECT3DRMFRAME; 
	 Para2: DWORD; Para3: DWORD; Para4: DWORD; Para5: DWORD; Para6: LPDIRECT3DRMVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function CreateWrap(Para0: D3DRMWRAPTYPE; Para1: LPDIRECT3DRMFRAME; ox: D3DVALUE;
	 oy: D3DVALUE; oz: D3DVALUE; dx: D3DVALUE; dy: D3DVALUE; dz: D3DVALUE; ux: D3DVALUE; 
	 uy: D3DVALUE; uz: D3DVALUE; ou: D3DVALUE; ov: D3DVALUE; su: D3DVALUE; sv: D3DVALUE; 
	 Para2: LPDIRECT3DRMWRAP): HRESULT; virtual; stdcall; abstract;
    function CreateUserVisual(Para0: D3DRMUSERVISUALCALLBACK; lPArg: Pointer; var Para1: LPDIRECT3DRMUSERVISUAL): HRESULT; virtual; stdcall; abstract;
    function LoadTexture(const Para0: PChar; var Para1: LPDIRECT3DRMTEXTURE2): HRESULT; virtual; stdcall; abstract;
    function LoadTextureFromResource(hModule: HMODULE; strName: PChar; strType: PChar; 
	 var Para0: LPDIRECT3DRMTEXTURE2): HRESULT; virtual; stdcall; abstract;

    function SetSearchPath(Para0: LPCSTR): HRESULT; virtual; stdcall; abstract;
    function AddSearchPath(Para0: LPCSTR): HRESULT; virtual; stdcall; abstract;
    function GetSearchPath(size_return: PDWORD; path_return: LPSTR): HRESULT; virtual; stdcall; abstract;
    function SetDefaultTextureColors(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetDefaultTextureShades(Para0: DWORD): HRESULT; virtual; stdcall; abstract;

    function GetDevices(var Para0: LPDIRECT3DRMDEVICEARRAY): HRESULT; virtual; stdcall; abstract;
    function GetNamedObject(const Para0: PChar; var Para1: LPDIRECT3DRMOBJECT): HRESULT; virtual; stdcall; abstract;

    function EnumerateObjects(Para0: D3DRMOBJECTCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;

    function Load(Para0: Pointer; Para1: Pointer; var Para2: PIID; Para3: DWORD; 
	 Para4: D3DRMLOADOPTIONS; Para5: D3DRMLOADCALLBACK; Para6: Pointer; Para7: D3DRMLOADTEXTURECALLBACK; 
	 Para8: Pointer; Para9: LPDIRECT3DRMFRAME): HRESULT; virtual; stdcall; abstract;
    function Tick(Para0: D3DVALUE): HRESULT; virtual; stdcall; abstract;

    function CreateProgressiveMesh(var Para0: LPDIRECT3DRMPROGRESSIVEMESH): HRESULT; virtual; stdcall; abstract;
  end;

{$UNDEF INTERFACE}
// Error :  #define INTERFACE IDirect3DRM3

  IDirect3DRM3 = class ( IUnknown )
    //function IUNKNOWN_METHODS(Para0: PURE): Integer; stdcall;

    function CreateObject(rclsid: TCLSID; pUnkOuter: IUnknown; riid: TIID; var ppv: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateFrame(Para0: LPDIRECT3DRMFRAME3; var Para1: LPDIRECT3DRMFRAME3): HRESULT; virtual; stdcall; abstract;
    function CreateMesh(var Para0: LPDIRECT3DRMMESH): HRESULT; virtual; stdcall; abstract;
    function CreateMeshBuilder(var Para0: LPDIRECT3DRMMESHBUILDER3): HRESULT; virtual; stdcall; abstract;
    function CreateFace(var Para0: LPDIRECT3DRMFACE2): HRESULT; virtual; stdcall; abstract;
    function CreateAnimation(var Para0: LPDIRECT3DRMANIMATION2): HRESULT; virtual; stdcall; abstract;
    function CreateAnimationSet(var Para0: LPDIRECT3DRMANIMATIONSET2): HRESULT; virtual; stdcall; abstract;
    function CreateTexture(Para0: LPD3DRMIMAGE; var Para1: LPDIRECT3DRMTEXTURE3): HRESULT; virtual; stdcall; abstract;
    function CreateLight(Para0: D3DRMLIGHTTYPE; Para1: D3DCOLOR; var Para2: LPDIRECT3DRMLIGHT): HRESULT; virtual; stdcall; abstract;
    function CreateLightRGB(Para0: D3DRMLIGHTTYPE; Para1: D3DVALUE; Para2: D3DVALUE;
	 Para3: D3DVALUE; var Para4: LPDIRECT3DRMLIGHT): HRESULT; virtual; stdcall; abstract;
    function CreateMaterial(Para0: D3DVALUE; var Para1: LPDIRECT3DRMMATERIAL2): HRESULT; virtual; stdcall; abstract;
    function CreateDevice(Para0: DWORD; Para1: DWORD; var Para2: LPDIRECT3DRMDEVICE3): HRESULT; virtual; stdcall; abstract;

(* Create a Windows Device using DirectDraw surfaces *)
    function CreateDeviceFromSurface(PGUID: PGUID; lpDD: IDirectDraw; lpDDSBack: IDirectDrawSurface; 
	 dwFlags: DWORD; var Para0: LPDIRECT3DRMDEVICE3): HRESULT; virtual; stdcall; abstract;

(* Create a Windows Device using D3D objects *)
    function CreateDeviceFromD3D(lpD3D: IDirect3D2; lpD3DDev: IDirect3DDevice2; 
	 var Para0: LPDIRECT3DRMDEVICE3): HRESULT; virtual; stdcall; abstract;

    function CreateDeviceFromClipper(lpDDClipper: IDirectDrawClipper; PGUID: PGUID; 
	 width: Integer; height: Integer; var Para0: LPDIRECT3DRMDEVICE3): HRESULT; virtual; stdcall; abstract;

    function CreateTextureFromSurface(lpDDS: IDirectDrawSurface; var Para0: LPDIRECT3DRMTEXTURE3): HRESULT; virtual; stdcall; abstract;

    function CreateShadow(Para0: IUnknown; Para1: LPDIRECT3DRMLIGHT; px: D3DVALUE; 
	 py: D3DVALUE; pz: D3DVALUE; nx: D3DVALUE; ny: D3DVALUE; nz: D3DVALUE; Para2: LPDIRECT3DRMSHADOW2): HRESULT; virtual; stdcall; abstract;
    function CreateViewport(Para0: LPDIRECT3DRMDEVICE3; Para1: LPDIRECT3DRMFRAME3; 
	 Para2: DWORD; Para3: DWORD; Para4: DWORD; Para5: DWORD; var Para6: LPDIRECT3DRMVIEWPORT2): HRESULT; virtual; stdcall; abstract;
    function CreateWrap(Para0: D3DRMWRAPTYPE; Para1: LPDIRECT3DRMFRAME3; ox: D3DVALUE;
	 oy: D3DVALUE; oz: D3DVALUE; dx: D3DVALUE; dy: D3DVALUE; dz: D3DVALUE; ux: D3DVALUE; 
	 uy: D3DVALUE; uz: D3DVALUE; ou: D3DVALUE; ov: D3DVALUE; su: D3DVALUE; sv: D3DVALUE; 
	 Para2: LPDIRECT3DRMWRAP): HRESULT; virtual; stdcall; abstract;
    function CreateUserVisual(Para0: D3DRMUSERVISUALCALLBACK; lPArg: Pointer; var Para1: LPDIRECT3DRMUSERVISUAL): HRESULT; virtual; stdcall; abstract;
    function LoadTexture(const Para0: PChar; var Para1: LPDIRECT3DRMTEXTURE3): HRESULT; virtual; stdcall; abstract;
    function LoadTextureFromResource(hModule: HMODULE; strName: PChar; strType: PChar; 
	 var Para0: LPDIRECT3DRMTEXTURE3): HRESULT; virtual; stdcall; abstract;

    function SetSearchPath(Para0: LPCSTR): HRESULT; virtual; stdcall; abstract;
    function AddSearchPath(Para0: LPCSTR): HRESULT; virtual; stdcall; abstract;
    function GetSearchPath(size_return: PDWORD; path_return: LPSTR): HRESULT; virtual; stdcall; abstract;
    function SetDefaultTextureColors(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetDefaultTextureShades(Para0: DWORD): HRESULT; virtual; stdcall; abstract;

    function GetDevices(var Para0: LPDIRECT3DRMDEVICEARRAY): HRESULT; virtual; stdcall; abstract;
    function GetNamedObject(const Para0: PChar; var Para1: LPDIRECT3DRMOBJECT): HRESULT; virtual; stdcall; abstract;

    function EnumerateObjects(Para0: D3DRMOBJECTCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;

    function Load(Para0: Pointer; Para1: Pointer; var Para2: PIID; Para3: DWORD; 
	 Para4: D3DRMLOADOPTIONS; Para5: D3DRMLOADCALLBACK; Para6: Pointer; Para7: D3DRMLOADTEXTURE3CALLBACK; 
	 Para8: Pointer; Para9: LPDIRECT3DRMFRAME3): HRESULT; virtual; stdcall; abstract;
    function Tick(Para0: D3DVALUE): HRESULT; virtual; stdcall; abstract;

    function CreateProgressiveMesh(var Para0: LPDIRECT3DRMPROGRESSIVEMESH): HRESULT; virtual; stdcall; abstract;

(* Used with IDirect3DRMObject2 *)
    function RegisterClient(rguid: TGUID; lpdwID: PWORD): HRESULT; virtual; stdcall; abstract;
    function UnregisterClient(rguid: TGUID): HRESULT; virtual; stdcall; abstract;

    function CreateClippedVisual(Para0: LPDIRECT3DRMVISUAL; var Para1: LPDIRECT3DRMCLIPPEDVISUAL): HRESULT; virtual; stdcall; abstract;
    function SetOptions(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetOptions(Para0: PWORD): HRESULT; virtual; stdcall; abstract;
  end;


(* Create a Direct3DRM API *)
function Direct3DRMCreate(var lplpDirect3DRM: IDirect3DRM): Integer; stdcall;

const
  D3DRM_OK	= DD_OK;
  D3DRMERR_BADOBJECT	= $8876030D;
  D3DRMERR_BADTYPE	= $8876030E;
  D3DRMERR_BADALLOC	= $8876030F;
  D3DRMERR_FACEUSED	= $88760310;
  D3DRMERR_NOTFOUND	= $88760311;
  D3DRMERR_NOTDONEYET	= $88760312;
  D3DRMERR_FILENOTFOUND	= $88760313;
  D3DRMERR_BADFILE	= $88760314;
  D3DRMERR_BADDEVICE	= $88760315;
  D3DRMERR_BADVALUE	= $88760316;
  D3DRMERR_BADMAJORVERSION	= $88760317;
  D3DRMERR_BADMINORVERSION	= $88760318;
  D3DRMERR_UNABLETOEXECUTE	= $88760319;
  D3DRMERR_LIBRARYNOTFOUND	= $8876031A;
  D3DRMERR_INVALIDLIBRARY	= $8876031B;
  D3DRMERR_PENDING	= $8876031C;
  D3DRMERR_NOTENOUGHDATA	= $8876031D;
  D3DRMERR_REQUESTTOOLARGE	= $8876031E;
  D3DRMERR_REQUESTTOOSMALL	= $8876031F;
  D3DRMERR_CONNECTIONLOST	= $88760320;
  D3DRMERR_LOADABORTED	= $88760321;
  D3DRMERR_NOINTERNET	= $88760322;
  D3DRMERR_BADCACHEFILE	= $88760323;
  D3DRMERR_BOXNOTSET	= $88760324;
  D3DRMERR_BADPMDATA	= $88760325;
  D3DRMERR_CLIENTNOTREGISTERED	= $88760326;
  D3DRMERR_NOTCREATEDFROMDDS	= $88760327;
  D3DRMERR_NOSUCHKEY	= $88760328;
  D3DRMERR_INCOMPATABLEKEY	= $88760329;
  D3DRMERR_ELEMENTINUSE	= $8876032A;
  D3DRMERR_TEXTUREFORMATNOTFOUND	= $8876032B;
  D3DRMERR_NOTAGGREGATED	= $8876032C;





implementation

function Direct3DRMCreate ; external 'D3DRM.DLL' ;

end.
