Thema: Delphi Unit Aufspalten

Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#1

Unit Aufspalten

  Alt 30. Apr 2018, 12:55
Ich möchte meine Unit Aufspalten und zwar geordnet.

Beispiel.
Eine Unit nur für das IAudioEndpointVolume

Delphi-Quellcode:
  IAudioEndpointVolume = interface(IUnknown)
    ['{5CDF2C82-841E-4546-9722-0CF74078229A}']
    function RegisterControlChangeNotify(pNotify: IAudioEndpointVolumeCallback): HRESULT; stdcall;
    function UnregisterControlChangeNotify(pNotify: IAudioEndpointVolumeCallback): HRESULT; stdcall;
    function GetChannelCount(var pnChannelCount: UINT): HRESULT; stdcall;
    function SetMasterVolumeLevel(fLevelDB: Single; pguidEventContext: PGuid): HRESULT; stdcall;
    function SetMasterVolumeLevelScalar(fLevel: Single; pguidEventContext: PGuid): HRESULT; stdcall;
    function GetMasterVolumeLevel(var pfLevelDB: Single): HRESULT; stdcall;
    function GetMasterVolumeLevelScalar(var pfLevel: Single): HRESULT; stdcall;
    function SetChannelVolumeLevel(nChannel: UINT; fLevelDB: Single; pguidEventContext: PGuid): HRESULT; stdcall;
    function SetChannelVolumeLevelScalar(nChannel: UINT; fLevel:Single; pguidEventContext: PGuid): HRESULT; stdcall;
    function GetChannelVolumeLevel(nChannel: UINT; fLevelDB: Single): HRESULT; stdcall;
    function GetChannelVolumeLevelScalar(nChannel: UINT; var fLevel: Single): HRESULT; stdcall;
    function SetMute(bMute: BOOL; pguidEventContext: PGuid): HRESULT; stdcall;
    function GetMute(var pbMute: BOOL): HRESULT; stdcall;
    function GetVolumeStepInfo(var pnStep: UINT; var pnStepCount: UINT): HRESULT; stdcall;
    function VolumeStepUp(pguidEventContext: PGuid): HRESULT; stdcall;
    function VolumeStepDown(pguidEventContext: PGuid): HRESULT; stdcall;
    function QueryHardwareSupport(var pdwHardwareSupportMask: UINT): HRESULT; stdcall;
    function GetVolumeRange(var pflVolumeMindB: Single; var pflVolumeMaxdB: Single;
                            var pflVolumeIncrementdB: Single): HRESULT; stdcall;
  end;
Das Problem dabei ist das aus diesem Interface auf ein anderes verzweigt wird.
IAudioEndpointVolumeCallback

Das bedeutet ich muss dieses Interface ebenfalls in die gleiche Unit Packen was ich aber eigentlich nicht will.
Aber leider gibt es in Delphi 2010 so etwas wie Namespace nicht.

Wie könnte man das trotzdem verwirklichen.

Also so etwas
namespace AudioVolume.Interfaces ?

Es muss nicht exakt das gleiche sein aber eine Abwandlung dafür vielleicht?

gruss
  Mit Zitat antworten Zitat