----------------------------------------
-- File : dxfile.ads --
-- Translator:Dongfeng.Gu,2018/10/30 --
-- Mail: [email protected] --
-- Progress:100% --
----------------------------------------
with win32; use win32;
with win32.rpcdce;
with win32.Winerror;
with win32.Objbase; use win32.Objbase;
with win32.winnt; use win32.winnt;
with win32.windef; use win32.windef;
package dxfile is
type LPCGUID is access constant win32.rpcdce.GUID;
type LPLPCGUID is access all LPCGUID;
subtype DXFILEFORMAT is DWORD;
DXFILEFORMAT_BINARY : constant := 0;
DXFILEFORMAT_TEXT : constant := 1;
DXFILEFORMAT_COMPRESSED : constant := 2;
subtype DXFILELOADOPTIONS is DWORD;
DXFILELOAD_FROMFILE : constant := 16#00#;
DXFILELOAD_FROMRESOURCE : constant := 16#01#;
DXFILELOAD_FROMMEMORY : constant := 16#02#;
DXFILELOAD_FROMSTREAM : constant := 16#04#;
DXFILELOAD_FROMURL : constant := 16#08#;
type tagDXFILELOADRESOURCE is record
hModule: windef.HMODULE;
lpName: LPCTSTR;
lpType: LPCTSTR;
end record;
subtype DXFILELOADRESOURCE is tagDXFILELOADRESOURCE;
type LPDXFILELOADRESOURCE is access all tagDXFILELOADRESOURCE;
type tagDXFILELOADMEMORY is record
lpMemory: LPVOID;
dSize: DWORD;
end record;
subtype DXFILELOADMEMORY is tagDXFILELOADMEMORY;
type LPDXFILELOADMEMORY is access all tagDXFILELOADMEMORY;
type IDirectXFile;
type LPIDirectXFile is access all IDirectXFile;
type LPLPIDirectXFile is access all LPIDirectXFile;
subtype LPDirectXFile is LPIDirectXFile;
subtype LPLPDirectXFile is LPLPIDirectXFile;
type IDirectXFileEnumObject;
type LPIDirectXFileEnumObject is access all IDirectXFileEnumObject;
type LPLPIDirectXFileEnumObject is access all LPIDirectXFileEnumObject;
subtype LPDirectXFileEnumObject is LPIDirectXFileEnumObject;
subtype LPLPDirectXFileEnumObject is LPLPIDirectXFileEnumObject;
type IDirectXFileSaveObject;
type LPIDirectXFileSaveObject is access all IDirectXFileSaveObject;
type LPLPIDirectXFileSaveObject is access all LPIDirectXFileSaveObject;
subtype LPDirectXFileSaveObject is LPIDirectXFileSaveObject;
subtype LPLPDirectXFileSaveObject is LPLPIDirectXFileSaveObject;
type IDirectXFileObject;
type LPIDirectXFileObject is access all IDirectXFileObject;
type LPLPIDirectXFileObject is access all LPIDirectXFileObject;
subtype LPDirectXFileObject is LPIDirectXFileObject;
subtype LPLPDirectXFileObject is LPLPIDirectXFileObject;
type IDirectXFileData;
type LPIDirectXFileData is access all IDirectXFileData;
type LPLPIDirectXFileData is access all LPIDirectXFileData;
subtype LPDirectXFileData is LPIDirectXFileData;
subtype LPLPDirectXFileData is LPLPIDirectXFileData;
type IDirectXFileDataReference;
type LPIDirectXFileDataReference is access all IDirectXFileDataReference;
type LPLPIDirectXFileDataReference is access all LPIDirectXFileDataReference;
subtype LPDirectXFileDataReference is LPIDirectXFileDataReference;
subtype LPLPDirectXFileDataReference is LPLPIDirectXFileDataReference;
type IDirectXFileBinary;
type LPIDirectXFileBinary is access all IDirectXFileBinary;
type LPLPIDirectXFileBinary is access all LPIDirectXFileBinary;
subtype LPDirectXFileBinary is LPIDirectXFileBinary;
subtype LPLPDirectXFileBinary is LPLPIDirectXFileBinary;
procedure DirectXFileCreate(lplpDirectXFile:dxfile.LPLPDIRECTXFILE) with Import,Convention=>stdcall,external_name=>"DirectXFileCreate";
type IDirectXFile is record
QueryInterface:access procedure(THIS:LPIDirectXFile;riid:REFIID;ppvObj:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPIDirectXFile) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIDirectXFile) return ULONG with Convention=>Stdcall;
CreateEnumObject:access procedure(THIS:LPIDirectXFile;Arg2:LPVOID;Arg3:DXFILELOADOPTIONS;Arg4:LPLPDIRECTXFILEENUMOBJECT) with Convention=>Stdcall;
CreateSaveObject:access procedure(THIS:LPIDirectXFile;Arg2:LPCSTR;Arg3:DXFILEFORMAT;Arg4:LPLPDIRECTXFILESAVEOBJECT) with Convention=>Stdcall;
RegisterTemplates:access procedure(THIS:LPIDirectXFile;Arg2:LPVOID;Arg3:DWORD) with Convention=>Stdcall;
end record;
type IDirectXFileEnumObject is record
QueryInterface:access procedure(THIS:LPIDirectXFileEnumObject;riid:REFIID;ppvObj:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPIDirectXFileEnumObject) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIDirectXFileEnumObject) return ULONG with Convention=>Stdcall;
GetNextDataObject:access procedure(THIS:LPIDirectXFileEnumObject;Arg2:LPLPDIRECTXFILEDATA) with Convention=>Stdcall;
GetDataObjectById:access procedure(THIS:LPIDirectXFileEnumObject;Arg2:REFGUID;Arg3:LPLPDIRECTXFILEDATA) with Convention=>Stdcall;
GetDataObjectByName:access procedure(THIS:LPIDirectXFileEnumObject;Arg2:LPCSTR;Arg3:LPLPDIRECTXFILEDATA) with Convention=>Stdcall;
end record;
type IDirectXFileSaveObject is record
QueryInterface:access procedure(THIS:LPIDirectXFileSaveObject;riid:REFIID;ppvObj:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPIDirectXFileSaveObject) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIDirectXFileSaveObject) return ULONG with Convention=>Stdcall;
SaveTemplates:access procedure(THIS:LPIDirectXFileSaveObject;Arg2:DWORD;Arg3:LPLPCGUID) with Convention=>Stdcall;
CreateDataObject:access procedure(THIS:LPIDirectXFileSaveObject;Arg2:REFGUID;Arg3:LPCSTR;Arg4:LPCGUID;Arg5:DWORD;Arg6:LPVOID;Arg7:LPLPDIRECTXFILEDATA) with Convention=>Stdcall;
SaveData:access procedure(THIS:LPIDirectXFileSaveObject;Arg2:LPDIRECTXFILEDATA) with Convention=>Stdcall;
end record;
type IDirectXFileObject is record
QueryInterface:access procedure(THIS:LPIDirectXFileObject;riid:REFIID;ppvObj:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPIDirectXFileObject) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIDirectXFileObject) return ULONG with Convention=>Stdcall;
GetName:access procedure(THIS:LPIDirectXFileObject;Arg2:LPSTR;Arg3:LPDWORD) with Convention=>Stdcall;
GetId:access procedure(THIS:LPIDirectXFileObject;Arg2:LPGUID) with Convention=>Stdcall;
end record;
type IDirectXFileData is record
QueryInterface:access procedure(THIS:LPIDirectXFileData;riid:REFIID;ppvObj:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPIDirectXFileData) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIDirectXFileData) return ULONG with Convention=>Stdcall;
GetName:access procedure(THIS:LPIDirectXFileData;Arg2:LPSTR;Arg3:LPDWORD) with Convention=>Stdcall;
GetId:access procedure(THIS:LPIDirectXFileData;Arg2:LPGUID) with Convention=>Stdcall;
GetData:access procedure(THIS:LPIDirectXFileData;Arg2:LPCSTR;Arg3:LPDWORD;Arg4:LPLPvoid) with Convention=>Stdcall;
GetType:access procedure(THIS:LPIDirectXFileData;Arg2:LPLPCGUID) with Convention=>Stdcall;
GetNextObject:access procedure(THIS:LPIDirectXFileData;Arg2:LPLPDIRECTXFILEOBJECT) with Convention=>Stdcall;
AddDataObject:access procedure(THIS:LPIDirectXFileData;Arg2:LPDIRECTXFILEDATA) with Convention=>Stdcall;
AddDataReference:access procedure(THIS:LPIDirectXFileData;Arg2:LPCSTR;Arg3:LPCGUID) with Convention=>Stdcall;
AddBinaryObject:access procedure(THIS:LPIDirectXFileData;Arg2:LPCSTR;Arg3:LPCGUID;Arg4:LPCSTR;Arg5:LPVOID;Arg6:DWORD) with Convention=>Stdcall;
end record;
type IDirectXFileDataReference is record
QueryInterface:access procedure(THIS:LPIDirectXFileDataReference;riid:REFIID;ppvObj:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPIDirectXFileDataReference) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIDirectXFileDataReference) return ULONG with Convention=>Stdcall;
GetName:access procedure(THIS:LPIDirectXFileDataReference;Arg2:LPSTR;Arg3:LPDWORD) with Convention=>Stdcall;
GetId:access procedure(THIS:LPIDirectXFileDataReference;Arg2:LPGUID) with Convention=>Stdcall;
Resolve:access procedure(THIS:LPIDirectXFileDataReference;Arg2:LPLPDIRECTXFILEDATA) with Convention=>Stdcall;
end record;
type IDirectXFileBinary is record
QueryInterface:access procedure(THIS:LPIDirectXFileBinary;riid:REFIID;ppvObj:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPIDirectXFileBinary) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIDirectXFileBinary) return ULONG with Convention=>Stdcall;
GetName:access procedure(THIS:LPIDirectXFileBinary;Arg2:LPSTR;Arg3:LPDWORD) with Convention=>Stdcall;
GetId:access procedure(THIS:LPIDirectXFileBinary;Arg2:LPGUID) with Convention=>Stdcall;
GetSize:access procedure(THIS:LPIDirectXFileBinary;Arg2:LPDWORD) with Convention=>Stdcall;
GetMimeType:access procedure(THIS:LPIDirectXFileBinary;Arg2:access LPCSTR) with Convention=>Stdcall;
Read:access procedure(THIS:LPIDirectXFileBinary;Arg2:LPVOID;Arg3:DWORD;Arg4:LPDWORD) with Convention=>Stdcall;
end record;
CLSID_CDirectXFile:constant win32.rpcdce.GUID:=(16#4516ec43#,16#8f20#,16#11d0#,(16#9b#,16#6d#,16#00#,16#00#,16#c0#,16#78#,16#1b#,16#c3#));
IID_IDirectXFile:constant win32.rpcdce.GUID:=(16#3d82ab40#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
IID_IDirectXFileEnumObject:constant win32.rpcdce.GUID:=(16#3d82ab41#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
IID_IDirectXFileSaveObject:constant win32.rpcdce.GUID:=(16#3d82ab42#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
IID_IDirectXFileObject:constant win32.rpcdce.GUID:=(16#3d82ab43#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
IID_IDirectXFileData:constant win32.rpcdce.GUID:=(16#3d82ab44#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
IID_IDirectXFileDataReference:constant win32.rpcdce.GUID:=(16#3d82ab45#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
IID_IDirectXFileBinary:constant win32.rpcdce.GUID:=(16#3d82ab46#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
TID_DXFILEHeader:constant win32.rpcdce.GUID:=(16#3d82ab43#,16#62da#,16#11cf#,(16#ab#,16#39#,16#0#,16#20#,16#af#,16#71#,16#e4#,16#33#));
FACDD : constant := 16#876#;
function MAKE_DDHRESULT( code:WORD ) return HRESULT is (win32.Winerror.MAKE_HRESULT( 1,FACDD, code ));
DXFILE_OK : constant := 0;
DXFILEERR_BADOBJECT : constant HRESULT:= MAKE_DDHRESULT(850);
DXFILEERR_BADVALUE : constant HRESULT:= MAKE_DDHRESULT(851);
DXFILEERR_BADTYPE : constant HRESULT:= MAKE_DDHRESULT(852);
DXFILEERR_BADSTREAMHANDLE : constant HRESULT:= MAKE_DDHRESULT(853);
DXFILEERR_BADALLOC : constant HRESULT:= MAKE_DDHRESULT(854);
DXFILEERR_NOTFOUND : constant HRESULT:= MAKE_DDHRESULT(855);
DXFILEERR_NOTDONEYET : constant HRESULT:= MAKE_DDHRESULT(856);
DXFILEERR_FILENOTFOUND : constant HRESULT:= MAKE_DDHRESULT(857);
DXFILEERR_RESOURCENOTFOUND : constant HRESULT:= MAKE_DDHRESULT(858);
DXFILEERR_URLNOTFOUND : constant HRESULT:= MAKE_DDHRESULT(859);
DXFILEERR_BADRESOURCE : constant HRESULT:= MAKE_DDHRESULT(860);
DXFILEERR_BADFILETYPE : constant HRESULT:= MAKE_DDHRESULT(861);
DXFILEERR_BADFILEVERSION : constant HRESULT:= MAKE_DDHRESULT(862);
DXFILEERR_BADFILEFLOATSIZE : constant HRESULT:= MAKE_DDHRESULT(863);
DXFILEERR_BADFILECOMPRESSIONTYPE : constant HRESULT:= MAKE_DDHRESULT(864);
DXFILEERR_BADFILE : constant HRESULT:= MAKE_DDHRESULT(865);
DXFILEERR_PARSEERROR : constant HRESULT:= MAKE_DDHRESULT(866);
DXFILEERR_NOTEMPLATE : constant HRESULT:= MAKE_DDHRESULT(867);
DXFILEERR_BADARRAYSIZE : constant HRESULT:= MAKE_DDHRESULT(868);
DXFILEERR_BADDATAREFERENCE : constant HRESULT:= MAKE_DDHRESULT(869);
DXFILEERR_INTERNALERROR : constant HRESULT:= MAKE_DDHRESULT(870);
DXFILEERR_NOMOREOBJECTS : constant HRESULT:= MAKE_DDHRESULT(871);
DXFILEERR_BADINTRINSICS : constant HRESULT:= MAKE_DDHRESULT(872);
DXFILEERR_NOMORESTREAMHANDLES : constant HRESULT:= MAKE_DDHRESULT(873);
DXFILEERR_NOMOREDATA : constant HRESULT:= MAKE_DDHRESULT(874);
DXFILEERR_BADCACHEFILE : constant HRESULT:= MAKE_DDHRESULT(875);
DXFILEERR_NOINTERNET : constant HRESULT:= MAKE_DDHRESULT(876);
--
-- THE END.
--
end dxfile;