Skip to content

Commit

Permalink
Merge pull request #170 from reflectronic/imapi
Browse files Browse the repository at this point in the history
Add Image Mastering API
  • Loading branch information
tannergooding authored Feb 12, 2021
2 parents 4bb66be + 9b67c61 commit a6814fb
Show file tree
Hide file tree
Showing 216 changed files with 14,483 additions and 0 deletions.
24 changes: 24 additions & 0 deletions TerraFX.Interop.Windows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,27 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TlHelp32", "TlHelp32", "{BB
generation\um\TlHelp32\um-TlHelp32.h = generation\um\TlHelp32\um-TlHelp32.h
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "imapi", "imapi", "{BC069863-A717-4C9E-8D98-ACF9239E903A}"
ProjectSection(SolutionItems) = preProject
generation\um\imapi\generate.rsp = generation\um\imapi\generate.rsp
generation\um\imapi\header.txt = generation\um\imapi\header.txt
generation\um\imapi\um-imapi.h = generation\um\imapi\um-imapi.h
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "imapi2", "imapi2", "{565AEC0D-94C9-46CB-8947-71E02C3C128D}"
ProjectSection(SolutionItems) = preProject
generation\um\imapi2\generate.rsp = generation\um\imapi2\generate.rsp
generation\um\imapi2\header.txt = generation\um\imapi2\header.txt
generation\um\imapi2\um-imapi2.h = generation\um\imapi2\um-imapi2.h
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "imapi2fs", "imapi2fs", "{56D9CA05-6CF6-458A-AB1D-C85FBC239634}"
ProjectSection(SolutionItems) = preProject
generation\um\imapi2fs\generate.rsp = generation\um\imapi2fs\generate.rsp
generation\um\imapi2fs\header.txt = generation\um\imapi2fs\header.txt
generation\um\imapi2fs\um-imapi2fs.h = generation\um\imapi2fs\um-imapi2fs.h
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xamlOM", "xamlOM", "{9337A17E-7551-48F3-B73D-AF8086062660}"
ProjectSection(SolutionItems) = preProject
generation\um\xamlOM\generate.rsp = generation\um\xamlOM\generate.rsp
Expand Down Expand Up @@ -2080,6 +2101,9 @@ Global
{ED73B6ED-F05F-49B9-9E01-0A27AEAA69F5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{A40DA57D-3CE9-4CAA-B94F-62BEA1704A4F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{BB1D1950-8068-4353-A482-0A2C60ED4644} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{BC069863-A717-4C9E-8D98-ACF9239E903A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{565AEC0D-94C9-46CB-8947-71E02C3C128D} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{56D9CA05-6CF6-458A-AB1D-C85FBC239634} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{9337A17E-7551-48F3-B73D-AF8086062660} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
46 changes: 46 additions & 0 deletions generation/remap.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ IDXGIInfoQueue.GetMessageW=GetMessage
IGraphicsEffectSource**=void**
IID_AudioReverb=CLSID_AudioReverb
IID_AudioVolumeMeter=CLSID_AudioVolumeMeter
IID_BlockRange=CLSID_BlockRange
IID_BlockRangeList=CLSID_BlockRangeList
IID_BootOptions=CLSID_BootOptions
IID_CODECAPI_AVAudioChannelConfig=STATIC_CODECAPI_AVAudioChannelConfig
IID_CODECAPI_AVAudioChannelCount=STATIC_CODECAPI_AVAudioChannelCount
IID_CODECAPI_AVAudioSampleRate=STATIC_CODECAPI_AVAudioSampleRate
Expand Down Expand Up @@ -431,6 +434,13 @@ IID_DirectManipulationUpdateManager=CLSID_DirectManipulationUpdateManager
IID_DirectManipulationViewport=CLSID_DirectManipulationViewport
IID_DOMDocument=CLSID_DOMDocument
IID_DOMFreeThreadedDocument=CLSID_DOMFreeThreadedDocument
IID_EnumFsiItems=CLSID_EnumFsiItems
IID_EnumProgressItems=CLSID_EnumProgressItems
IID_FileSystemImageResult=CLSID_FileSystemImageResult
IID_FsiDirectoryItem=CLSID_FsiDirectoryItem
IID_FsiFileItem=CLSID_FsiFileItem
IID_FsiNamedStreams=CLSID_FsiNamedStreams
IID_FsiStream=CLSID_FsiStream
IID_FXEcho=CLSID_FXEcho
IID_FXEQ=CLSID_FXEQ
IID_FXMasteringLimiter=CLSID_FXMasteringLimiter
Expand All @@ -442,8 +452,29 @@ IID_InMemoryPropertyStoreMarshalByValue=CLSID_InMemoryPropertyStoreMarshalByValu
IID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT=STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
IID_KSDATAFORMAT_SUBTYPE_PCM=STATIC_KSDATAFORMAT_SUBTYPE_PCM
IID_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX=STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX
IID_MSDiscMasterObj=CLSID_MSDiscMasterObj
IID_MSDiscRecorderObj=CLSID_MSDiscRecorderObj
IID_MSEnumDiscRecordersObj=CLSID_MSEnumDiscRecordersObj
IID_MsftDiscFormat2Data=CLSID_MsftDiscFormat2Data
IID_MsftDiscFormat2Erase=CLSID_MsftDiscFormat2Erase
IID_MsftDiscFormat2RawCD=CLSID_MsftDiscFormat2RawCD
IID_MsftDiscFormat2TrackAtOnce=CLSID_MsftDiscFormat2TrackAtOnce
IID_MsftDiscRecorder2=CLSID_MsftDiscRecorder2
IID_MsftFileSystemImage=CLSID_MsftFileSystemImage
IID_MsftIsoImageManager=CLSID_MsftIsoImageManager
IID_MsftMultisessionRandomWrite=CLSID_MsftMultisessionRandomWrite
IID_MsftMultisessionSequential=CLSID_MsftMultisessionSequential
IID_MsftRawCDImageCreator=CLSID_MsftRawCDImageCreator
IID_MsftStreamConcatenate=CLSID_MsftStreamConcatenate
IID_MsftStreamInterleave=CLSID_MsftStreamInterleave
IID_MsftStreamPrng001=CLSID_MsftStreamPrng001
IID_MsftStreamZero=CLSID_MsftStreamZero
IID_MsftWriteEngine2=CLSID_MsftWriteEngine2
IID_MsftWriteSpeedDescriptor=CLSID_MsftWriteSpeedDescriptor
IID_PrintDocumentPackageTarget=CLSID_PrintDocumentPackageTarget
IID_PrintDocumentPackageTargetFactory=CLSID_PrintDocumentPackageTargetFactory
IID_ProgressItem=CLSID_ProgressItem
IID_ProgressItems=CLSID_ProgressItems
IID_PropertySystem=CLSID_PropertySystem
IID_SpAudioFormat=CLSID_SpAudioFormat
IID_SpCompressedLexicon=CLSID_SpCompressedLexicon
Expand Down Expand Up @@ -2047,6 +2078,21 @@ _IMAGE_THUNK_DATA64=IMAGE_THUNK_DATA64
_IMAGE_TLS_DIRECTORY32=IMAGE_TLS_DIRECTORY32
_IMAGE_TLS_DIRECTORY64=IMAGE_TLS_DIRECTORY64
_IMAGE_VXD_HEADER=IMAGE_VXD_HEADER
_IMAPI_BURN_VERIFICATION_LEVEL=IMAPI_BURN_VERIFICATION_LEVEL
_IMAPI_CD_SECTOR_TYPE=IMAPI_CD_SECTOR_TYPE
_IMAPI_CD_TRACK_DIGITAL_COPY_SETTING=IMAPI_CD_TRACK_DIGITAL_COPY_SETTING
_IMAPI_FEATURE_PAGE_TYPE=IMAPI_FEATURE_PAGE_TYPE
_IMAPI_FORMAT2_DATA_MEDIA_STATE=IMAPI_FORMAT2_DATA_MEDIA_STATE
_IMAPI_FORMAT2_DATA_WRITE_ACTION=IMAPI_FORMAT2_DATA_WRITE_ACTION
_IMAPI_FORMAT2_RAW_CD_DATA_SECTOR_TYPE=IMAPI_FORMAT2_RAW_CD_DATA_SECTOR_TYPE
_IMAPI_FORMAT2_RAW_CD_WRITE_ACTION=IMAPI_FORMAT2_RAW_CD_WRITE_ACTION
_IMAPI_FORMAT2_TAO_WRITE_ACTION=IMAPI_FORMAT2_TAO_WRITE_ACTION
_IMAPI_MEDIA_PHYSICAL_TYPE=IMAPI_MEDIA_PHYSICAL_TYPE
_IMAPI_MEDIA_WRITE_PROTECT_STATE=IMAPI_MEDIA_WRITE_PROTECT_STATE
_IMAPI_MODE_PAGE_REQUEST_TYPE=IMAPI_MODE_PAGE_REQUEST_TYPE
_IMAPI_MODE_PAGE_TYPE=IMAPI_MODE_PAGE_TYPE
_IMAPI_PROFILE_TYPE=IMAPI_PROFILE_TYPE
_IMAPI_READ_TRACK_ADDRESS_TYPE=IMAPI_READ_TRACK_ADDRESS_TYPE
_INFCONTEXT=INFCONTEXT
_INPUT_RECORD=INPUT_RECORD
_INTENT_TO_SEAL_ATTRIBUTE=INTENT_TO_SEAL_ATTRIBUTE
Expand Down
12 changes: 12 additions & 0 deletions generation/um/imapi/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@../../settings.rsp
@../../remap.rsp
--file
um-imapi.h
--output
../../../sources/Interop/Windows/um/imapi
--test-output
../../../tests/Interop/Windows/um/imapi
--traverse
C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/imapi.h
--with-attribue
MEDIA_FLAGS=Flags
4 changes: 4 additions & 0 deletions generation/um/imapi/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/imapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
2 changes: 2 additions & 0 deletions generation/um/imapi/um-imapi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <Windows.h>
#include <imapi.h>
14 changes: 14 additions & 0 deletions generation/um/imapi2/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@../../settings.rsp
@../../remap.rsp
--exclude
LIBID_IMAPILib2
--file
um-imapi2.h
--output
../../../sources/Interop/Windows/um/imapi2
--test-output
../../../tests/Interop/Windows/um/imapi2
--traverse
C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/imapi2.h
--with-attribute
IMAPI_FORMAT2_DATA_MEDIA_STATE=Flags
4 changes: 4 additions & 0 deletions generation/um/imapi2/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/imapi2.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
2 changes: 2 additions & 0 deletions generation/um/imapi2/um-imapi2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <Windows.h>
#include <imapi2.h>
10 changes: 10 additions & 0 deletions generation/um/imapi2fs/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@../../settings.rsp
@../../remap.rsp
--file
um-imapi2fs.h
--output
../../../sources/Interop/Windows/um/imapi2fs
--test-output
../../../tests/Interop/Windows/um/imapi2fs
--traverse
C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/imapi2fs.h
4 changes: 4 additions & 0 deletions generation/um/imapi2fs/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/imapi2fs.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
2 changes: 2 additions & 0 deletions generation/um/imapi2fs/um-imapi2fs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <Windows.h>
#include <imapi2fs.h>
123 changes: 123 additions & 0 deletions sources/Interop/Windows/um/imapi/IDiscMaster.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/imapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[Guid("520CCA62-51A5-11D3-9144-00104BA11C5E")]
[NativeTypeName("struct IDiscMaster : IUnknown")]
public unsafe partial struct IDiscMaster
{
public void** lpVtbl;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject)
{
return ((delegate* unmanaged<IDiscMaster*, Guid*, void**, int>)(lpVtbl[0]))((IDiscMaster*)Unsafe.AsPointer(ref this), riid, ppvObject);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged<IDiscMaster*, uint>)(lpVtbl[1]))((IDiscMaster*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged<IDiscMaster*, uint>)(lpVtbl[2]))((IDiscMaster*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int Open()
{
return ((delegate* unmanaged<IDiscMaster*, int>)(lpVtbl[3]))((IDiscMaster*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int EnumDiscMasterFormats([NativeTypeName("IEnumDiscMasterFormats **")] IEnumDiscMasterFormats** ppEnum)
{
return ((delegate* unmanaged<IDiscMaster*, IEnumDiscMasterFormats**, int>)(lpVtbl[4]))((IDiscMaster*)Unsafe.AsPointer(ref this), ppEnum);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetActiveDiscMasterFormat([NativeTypeName("LPIID")] Guid* lpiid)
{
return ((delegate* unmanaged<IDiscMaster*, Guid*, int>)(lpVtbl[5]))((IDiscMaster*)Unsafe.AsPointer(ref this), lpiid);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int SetActiveDiscMasterFormat([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppUnk)
{
return ((delegate* unmanaged<IDiscMaster*, Guid*, void**, int>)(lpVtbl[6]))((IDiscMaster*)Unsafe.AsPointer(ref this), riid, ppUnk);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int EnumDiscRecorders([NativeTypeName("IEnumDiscRecorders **")] IEnumDiscRecorders** ppEnum)
{
return ((delegate* unmanaged<IDiscMaster*, IEnumDiscRecorders**, int>)(lpVtbl[7]))((IDiscMaster*)Unsafe.AsPointer(ref this), ppEnum);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetActiveDiscRecorder([NativeTypeName("IDiscRecorder **")] IDiscRecorder** ppRecorder)
{
return ((delegate* unmanaged<IDiscMaster*, IDiscRecorder**, int>)(lpVtbl[8]))((IDiscMaster*)Unsafe.AsPointer(ref this), ppRecorder);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int SetActiveDiscRecorder([NativeTypeName("IDiscRecorder *")] IDiscRecorder* pRecorder)
{
return ((delegate* unmanaged<IDiscMaster*, IDiscRecorder*, int>)(lpVtbl[9]))((IDiscMaster*)Unsafe.AsPointer(ref this), pRecorder);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int ClearFormatContent()
{
return ((delegate* unmanaged<IDiscMaster*, int>)(lpVtbl[10]))((IDiscMaster*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int ProgressAdvise([NativeTypeName("IDiscMasterProgressEvents *")] IDiscMasterProgressEvents* pEvents, [NativeTypeName("UINT_PTR *")] nuint* pvCookie)
{
return ((delegate* unmanaged<IDiscMaster*, IDiscMasterProgressEvents*, nuint*, int>)(lpVtbl[11]))((IDiscMaster*)Unsafe.AsPointer(ref this), pEvents, pvCookie);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int ProgressUnadvise([NativeTypeName("UINT_PTR")] nuint vCookie)
{
return ((delegate* unmanaged<IDiscMaster*, nuint, int>)(lpVtbl[12]))((IDiscMaster*)Unsafe.AsPointer(ref this), vCookie);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int RecordDisc([NativeTypeName("boolean")] byte bSimulate, [NativeTypeName("boolean")] byte bEjectAfterBurn)
{
return ((delegate* unmanaged<IDiscMaster*, byte, byte, int>)(lpVtbl[13]))((IDiscMaster*)Unsafe.AsPointer(ref this), bSimulate, bEjectAfterBurn);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int Close()
{
return ((delegate* unmanaged<IDiscMaster*, int>)(lpVtbl[14]))((IDiscMaster*)Unsafe.AsPointer(ref this));
}
}
}
Loading

0 comments on commit a6814fb

Please sign in to comment.