コード例 #1
0
        /// <unmanaged>HRESULT IDirectInput8W::RunControlPanel([In] HWND arg0,[In] unsigned int arg1)</unmanaged>
        public unsafe void RunControlPanel(IntPtr hwnd, int arg1)
        {
            //calli(System.Int32(System.Void*,System.Void*,System.Int32), this._nativePointer, (void*)hwnd, arg1, *(*(IntPtr*)this._nativePointer + (IntPtr)6 * (IntPtr)sizeof(void*))).CheckError();
            var hr = (HRESULT)NativeHelper.CalliInt32(6, _nativePointer, (void *)hwnd, arg1);

            hr.CheckError();
        }
コード例 #2
0
ファイル: DirectSoundBase.cs プロジェクト: zxmak/ZXMAK2
        // <unmanaged>HRESULT IDirectSound::Compact()</unmanaged>
        public unsafe void Compact()
        {
            //calli(System.Int32(System.Void*), this._nativePointer, *(*(IntPtr*)this._nativePointer + (IntPtr)7 * (IntPtr)sizeof(void*))).CheckError();
            var hr = (HRESULT)NativeHelper.CalliInt32(7, _nativePointer);

            hr.CheckError();
        }
コード例 #3
0
ファイル: Direct3DDevice9.cs プロジェクト: zxmak/ZXMAK2
        /// <unmanaged>HRESULT IDirect3DDevice9::SetStreamSource([In] unsigned int StreamNumber,[In] IDirect3DVertexBuffer9* pStreamData,[In] unsigned int OffsetInBytes,[In] unsigned int Stride)</unmanaged>
        public unsafe HRESULT SetStreamSource(int streamNumber, Direct3DVertexBuffer9 streamData, int offsetInBytes, int stride)
        {
            var pStreamData = (void *)(streamData == null ? IntPtr.Zero : streamData.NativePointer);

            //calli(System.Int32(System.Void*,System.Int32,System.Void*,System.Int32,System.Int32), this._nativePointer, streamNumber, (void*)((streamDataRef == null) ? IntPtr.Zero : streamDataRef.NativePointer), offsetInBytes, stride, *(*(IntPtr*)this._nativePointer + (IntPtr)100 * (IntPtr)sizeof(void*))).CheckError();
            return((HRESULT)NativeHelper.CalliInt32(100, _nativePointer, (int)streamNumber, (void *)pStreamData, (int)offsetInBytes, (int)stride));
        }
コード例 #4
0
ファイル: DirectSoundBase.cs プロジェクト: zxmak/ZXMAK2
        // <unmanaged>HRESULT IDirectSound::SetCooperativeLevel([In] HWND hwnd,[In] DSSCL_ENUM dwLevel)</unmanaged>
        public unsafe void SetCooperativeLevel(IntPtr hwnd, DSSCL level)
        {
            //calli(System.Int32(System.Void*,System.Void*,System.Int32), this._nativePointer, (void*)hwnd, level, *(*(IntPtr*)this._nativePointer + (IntPtr)6 * (IntPtr)sizeof(void*))).CheckError();
            var hr = (HRESULT)NativeHelper.CalliInt32(6, this._nativePointer, (void *)hwnd, (int)level);

            hr.CheckError();
        }
コード例 #5
0
ファイル: Direct3DDevice9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DDevice9::CreateTexture([In] unsigned int Width,[In] unsigned int Height,[In] unsigned int Levels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[Out, Fast] IDirect3DTexture9** ppTexture,[In] void** pSharedHandle)</unmanaged>
 private unsafe HRESULT CreateTexture_(int width, int height, int levels, D3DUSAGE usage, D3DFORMAT format, D3DPOOL pool, out IntPtr pTexture)
 {
     fixed(void *ppTexture = &pTexture)
     {
         //result = calli(System.Int32(System.Void*,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Void*,System.Void*), this._nativePointer, width, height, levels, usage, format, pool, &zero, (void*)sharedHandleRef, *(*(IntPtr*)this._nativePointer + (IntPtr)23 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(23, _nativePointer, (int)width, (int)height, (int)levels, (int)usage, (int)format, (int)pool, (void *)ppTexture, (void *)IntPtr.Zero));
     }
 }
コード例 #6
0
ファイル: Direct3DDevice9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DDevice9::Clear([In] unsigned int Count,[In, Buffer, Optional] const D3DRECT* pRects,[In] D3DCLEAR Flags,[In] D3DCOLOR Color,[In] float Z,[In] unsigned int Stencil)</unmanaged>
 private unsafe HRESULT Clear_(int count, D3DRECT[] rectsRef, D3DCLEAR flags, D3DCOLOR color, float z, int stencil)
 {
     fixed(void *pRects = rectsRef)
     {
         //result = calli(System.Int32(System.Void*,System.Int32,System.Void*,System.Int32,SharpDX.Mathematics.Interop.RawColorBGRA,System.Single,System.Int32), this._nativePointer, count, ptr, flags, color, z, stencil, *(*(IntPtr*)this._nativePointer + (IntPtr)43 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(43, _nativePointer, count, pRects, (int)flags, (int)color, z, stencil));
     }
 }
コード例 #7
0
ファイル: Direct3DDevice9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DDevice9::GetDisplayMode([In] unsigned int iSwapChain,[Out] D3DDISPLAYMODE* pMode)</unmanaged>
 public unsafe HRESULT GetDisplayMode(int iSwapChain, out D3DDISPLAYMODE mode)
 {
     fixed(void *pMode = &mode)
     {
         //calli(System.Int32(System.Void*,System.Int32,System.Void*), this._nativePointer, iSwapChain, &result, *(*(IntPtr*)this._nativePointer + (IntPtr)8 * (IntPtr)sizeof(void*))).CheckError();
         return((HRESULT)NativeHelper.CalliInt32(8, _nativePointer, (int)iSwapChain, (void *)pMode));
     }
 }
コード例 #8
0
ファイル: D3DXFont.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT ID3DXFont::GetDevice([Out] IDirect3DDevice9** ppDevice)</unmanaged>
 private unsafe HRESULT GetDevice(out IntPtr devicePointer)
 {
     fixed(void *pDevicePointer = &devicePointer)
     {
         //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, &zero, *(*(IntPtr*)this._nativePointer + (IntPtr)3 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(3, _nativePointer, pDevicePointer));
     }
 }
コード例 #9
0
ファイル: Direct3DDevice9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DDevice9::GetFVF([Out] D3DFVF* pFVF)</unmanaged>
 public unsafe HRESULT GetFVF(out D3DFVF vertexFormat)
 {
     fixed(void *ptr = &vertexFormat)
     {
         //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)90 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(90, _nativePointer, (void *)ptr));
     }
 }
コード例 #10
0
ファイル: Direct3DDevice9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DDevice9::Reset([In, Out, Params] D3DPRESENT_PARAMETERS* pPresentationParameters)</unmanaged>
 public unsafe HRESULT Reset(params D3DPRESENT_PARAMETERS[] presentationParametersRef)
 {
     fixed(void *pPresentationParameters = presentationParametersRef)
     {
         //hr = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, pPresentationParameters, *(*(IntPtr*)this._nativePointer + (IntPtr)16 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(16, _nativePointer, pPresentationParameters));
     }
 }
コード例 #11
0
 /// <unmanaged>HRESULT IDirect3D9::GetDeviceCaps([In] unsigned int Adapter,[In] D3DDEVTYPE DeviceType,[Out] D3DCAPS9* pCaps)</unmanaged>
 public unsafe HRESULT GetDeviceCaps(int adapter, D3DDEVTYPE deviceType, out D3DCAPS9 caps)
 {
     fixed(void *pCaps = &caps)
     {
         //calli(System.Int32(System.Void*,System.Int32,System.Int32,System.Void*), this._nativePointer, adapter, deviceType, &result, *(*(IntPtr*)this._nativePointer + (IntPtr)14 * (IntPtr)sizeof(void*))).CheckError();
         return((HRESULT)NativeHelper.CalliInt32(14, _nativePointer, (int)adapter, (int)deviceType, (void *)pCaps));
     }
 }
コード例 #12
0
 /// <unmanaged>HRESULT IDirect3D9::EnumAdapterModes([In] unsigned int Adapter,[In] D3DFORMAT Format,[In] unsigned int Mode,[Out] D3DDISPLAYMODE* pMode)</unmanaged>
 public unsafe HRESULT EnumAdapterModes(int adapter, D3DFORMAT format, int mode, out D3DDISPLAYMODE d3dMode)
 {
     fixed(void *pMode = &d3dMode)
     {
         //calli(System.Int32(System.Void*,System.Int32,System.Int32,System.Int32,System.Void*), this._nativePointer, adapter, format, mode, &result, *(*(IntPtr*)this._nativePointer + (IntPtr)7 * (IntPtr)sizeof(void*))).CheckError();
         return((HRESULT)NativeHelper.CalliInt32(7, _nativePointer, (int)adapter, (int)format, (int)mode, (void *)pMode));
     }
 }
コード例 #13
0
ファイル: Direct3DSwapChain9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DSwapChain9::GetBackBuffer([In] unsigned int iBackBuffer,[In] D3DBACKBUFFER_TYPE Type,[Out] IDirect3DSurface9** ppBackBuffer)</unmanaged>
 private unsafe HRESULT GetBackBuffer(int iBackBuffer, D3DBACKBUFFER_TYPE type, out IntPtr pBackBuffer)
 {
     fixed(void *ppBackBuffer = &pBackBuffer)
     {
         //result = calli(System.Int32(System.Void*,System.Int32,System.Int32,System.Void*), this._nativePointer, iBackBuffer, type, &zero, *(*(IntPtr*)this._nativePointer + (IntPtr)5 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(5, _nativePointer, (int)iBackBuffer, (int)type, ppBackBuffer));
     }
 }
コード例 #14
0
ファイル: Direct3DSwapChain9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DSwapChain9::GetRasterStatus([Out] D3DRASTER_STATUS* pRasterStatus)</unmanaged>
 public unsafe HRESULT GetRasterStatus(out D3DRASTER_STATUS rasterStatus)
 {
     fixed(void *pRasterStatus = &rasterStatus)
     {
         //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)6 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(6, _nativePointer, (void *)pRasterStatus));
     }
 }
コード例 #15
0
 /// <unmanaged>HRESULT ID3DXSprite::SetTransform([In] const D3DXMATRIX* pTransform)</unmanaged>
 public unsafe HRESULT SetTransform(ref D3DMATRIX transform)
 {
     fixed(void *pTransform = &transform)
     {
         //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)5 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(5, _nativePointer, (void *)pTransform));
     }
 }
コード例 #16
0
        /// <unmanaged>HRESULT IDirect3D9::GetAdapterIdentifier([In] unsigned int Adapter,[In] unsigned int Flags,[Out] D3DADAPTER_IDENTIFIER9* pIdentifier)</unmanaged>
        public unsafe D3DADAPTER_IDENTIFIER9 GetAdapterIdentifier(int adapter, int flags)
        {
            var native = new D3DADAPTER_IDENTIFIER9.NATIVE();
            //result = calli(System.Int32(System.Void*,System.Int32,System.Int32,System.Void*), this._nativePointer, adapter, flags, &_Native, *(*(IntPtr*)this._nativePointer + (IntPtr)5 * (IntPtr)sizeof(void*)));
            var hr = (HRESULT)NativeHelper.CalliInt32(5, _nativePointer, (int)adapter, (int)flags, (void *)&native);

            hr.CheckError();
            return(new D3DADAPTER_IDENTIFIER9(&native));
        }
コード例 #17
0
ファイル: DirectSoundBase.cs プロジェクト: zxmak/ZXMAK2
        // <unmanaged>HRESULT IDirectSound::DuplicateSoundBuffer([In] IDirectSoundBuffer* pDSBufferOriginal,[Out] void** ppDSBufferDuplicate)</unmanaged>
        internal unsafe HRESULT DuplicateSoundBuffer(SoundBuffer dSBufferOriginalRef, out IntPtr dSBufferDuplicateOut)
        {
            IntPtr pDSBufferDuplicate;
            //result = calli(System.Int32(System.Void*,System.Void*,System.Void*), this._nativePointer, (void*)((dSBufferOriginalRef == null) ? IntPtr.Zero : dSBufferOriginalRef.NativePointer), ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)5 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(5, _nativePointer, (void *)((dSBufferOriginalRef == null) ? IntPtr.Zero : dSBufferOriginalRef.NativePointer), &pDSBufferDuplicate);

            dSBufferDuplicateOut = pDSBufferDuplicate;
            return(result);
        }
コード例 #18
0
ファイル: DirectSoundBase.cs プロジェクト: zxmak/ZXMAK2
        // <unmanaged>HRESULT IDirectSound::GetSpeakerConfig([Out] unsigned int* pdwSpeakerConfig)</unmanaged>
        internal unsafe void GetSpeakerConfiguration(out int speakerConfigRef)
        {
            int dwSpeakerConfig;
            //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)8 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(8, _nativePointer, &dwSpeakerConfig);

            speakerConfigRef = dwSpeakerConfig;
            result.CheckError();
        }
コード例 #19
0
ファイル: Direct3DTexture9.cs プロジェクト: zxmak/ZXMAK2
 /// <unmanaged>HRESULT IDirect3DTexture9::LockRect([In] unsigned int Level,[Out] D3DLOCKED_RECT* pLockedRect,[In] const void* pRect,[In] D3DLOCK Flags)</unmanaged>
 public unsafe HRESULT LockRectangle(int level, out D3DLOCKED_RECT lockedRect, IntPtr pRect, D3DLOCK flags)
 {
     lockedRect = default(D3DLOCKED_RECT);
     fixed(void *pLockedRect = &lockedRect)
     {
         //result = calli(System.Int32(System.Void*,System.Int32,System.Void*,System.Void*,System.Int32), this._nativePointer, level, ptr, (void*)rectRef, flags, *(*(IntPtr*)this._nativePointer + (IntPtr)19 * (IntPtr)sizeof(void*)));
         return((HRESULT)NativeHelper.CalliInt32(19, _nativePointer, (int)level, (void *)pLockedRect, (void *)pRect, (int)flags));
     }
 }
コード例 #20
0
ファイル: SecondarySoundBuffer.cs プロジェクト: zxmak/ZXMAK2
        // <unmanaged>HRESULT IDirectSoundBuffer8::GetObjectInPath([In] const GUID&amp; rguidObject,[In] unsigned int dwIndex,[In] const GUID&amp; rguidInterface,[Out] void** ppObject)</unmanaged>
        internal unsafe void GetEffect(Guid rguidObject, int index, Guid rguidInterface, out IntPtr objectOut)
        {
            IntPtr pObject;
            //result = calli(System.Int32(System.Void*,System.Void*,System.Int32,System.Void*,System.Void*), this._nativePointer, &rguidObject, index, &rguidInterface, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)23 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(23, _nativePointer, (void *)&rguidObject, index, (void *)&rguidInterface, (void *)&pObject);

            objectOut = pObject;
            result.CheckError();
        }
コード例 #21
0
ファイル: ComObject.cs プロジェクト: zxmak/ZXMAK2
 unsafe int IUnknown.AddRef()
 {
     if (NativePointer == IntPtr.Zero)
     {
         throw new InvalidOperationException(PointerErrorMessage);
     }
     //return Marshal.AddRef(NativePointer);
     return(NativeHelper.CalliInt32(1, _nativePointer));
 }
コード例 #22
0
        // <unmanaged>HRESULT IDirectSoundBuffer::GetStatus([Out] unsigned int* pdwStatus)</unmanaged>
        internal unsafe void GetStatus(out int statusRef)
        {
            int dwStatus;
            //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)9 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(9, _nativePointer, &dwStatus);

            statusRef = dwStatus;
            result.CheckError();
        }
コード例 #23
0
        // <unmanaged>HRESULT IDirectSoundBuffer::GetPan([Out] int* plPan)</unmanaged>
        internal unsafe void GetPan(out int lPanRef)
        {
            int lPan;
            //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)7 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(7, _nativePointer, &lPan);

            lPanRef = lPan;
            result.CheckError();
        }
コード例 #24
0
        // <unmanaged>HRESULT IDirectSoundBuffer::GetFrequency([Out] unsigned int* pdwFrequency)</unmanaged>
        internal unsafe void GetFrequency(out int frequencyRef)
        {
            int dwFrequency;
            //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)8 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(8, _nativePointer, &dwFrequency);

            frequencyRef = dwFrequency;
            result.CheckError();
        }
コード例 #25
0
        // <unmanaged>HRESULT IDirectSoundBuffer::GetVolume([Out] int* plVolume)</unmanaged>
        internal unsafe void GetVolume(out int lVolumeRef)
        {
            int lVolume;
            //result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)6 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(6, _nativePointer, &lVolume);

            lVolumeRef = lVolume;
            result.CheckError();
        }
コード例 #26
0
        /// <unmanaged>HRESULT IDirectInput8W::CreateDevice([In] const GUID arg0,[Out] void** arg1,[In] IUnknown* arg2)</unmanaged>
        public unsafe DirectInputDevice8W CreateDevice(Guid deviceGuid, ComObject arg2)
        {
            IntPtr nativePointer;
            //result = calli(System.Int32(System.Void*,System.Void*,System.Void*,System.Void*), this._nativePointer, &arg0, ptr, (void*)((arg2 == null) ? IntPtr.Zero : arg2.NativePointer), *(*(IntPtr*)this._nativePointer + (IntPtr)3 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(3, _nativePointer, (void *)&deviceGuid, (void *)&nativePointer, (void *)((arg2 == null) ? IntPtr.Zero : arg2.NativePointer));

            result.CheckError();
            return(new DirectInputDevice8W(nativePointer));
        }
コード例 #27
0
        // <unmanaged>HRESULT IDirectSoundBuffer::Initialize([In] IDirectSound* pDirectSound,[In] const DSBUFFERDESC* pcDSBufferDesc)</unmanaged>
        public unsafe void Initialize(DirectSoundBase directSoundRef, DSBUFFERDESC cDSBufferDescRef)
        {
            DSBUFFERDESC.__Native _Native = DSBUFFERDESC.__NewNative();
            cDSBufferDescRef.__MarshalTo(ref _Native);
            //Result result = calli(System.Int32(System.Void*,System.Void*,System.Void*), this._nativePointer, (void*)((directSoundRef == null) ? IntPtr.Zero : directSoundRef.NativePointer), &_Native, *(*(IntPtr*)this._nativePointer + (IntPtr)10 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(10, _nativePointer, (void *)((directSoundRef == null) ? IntPtr.Zero : directSoundRef.NativePointer), (void *)&_Native);

            cDSBufferDescRef.__MarshalFree(ref _Native);
            result.CheckError();
        }
コード例 #28
0
 /// <unmanaged>HRESULT ID3DXSprite::Draw([In] IDirect3DTexture9* pTexture,[In] const void* pSrcRect,[In] const void* pCenter,[In] const void* pPosition,[In] D3DCOLOR Color)</unmanaged>
 private unsafe HRESULT Draw(Direct3DTexture9 texture, IntPtr srcRect, IntPtr center, IntPtr position, D3DCOLOR color)
 {
     //calli(System.Int32(System.Void*,System.Void*,System.Void*,System.Void*,System.Void*,SharpDX.Mathematics.Interop.RawColorBGRA), this._nativePointer, (void*)((textureRef == null) ? IntPtr.Zero : textureRef.NativePointer), (void*)srcRectRef, (void*)centerRef, (void*)positionRef, color, *(*(IntPtr*)this._nativePointer + (IntPtr)9 * (IntPtr)sizeof(void*))).CheckError();
     return((HRESULT)NativeHelper.CalliInt32(9, _nativePointer,
                                             (void *)(texture == null ? IntPtr.Zero : texture.NativePointer),
                                             (void *)srcRect,
                                             (void *)center,
                                             (void *)position,
                                             (int)color));
 }
コード例 #29
0
ファイル: DirectSoundBase.cs プロジェクト: zxmak/ZXMAK2
        // <unmanaged>HRESULT IDirectSound::GetCaps([Out] DSCAPS* pDSCaps)</unmanaged>
        internal unsafe void GetCapabilities(out DSCAPS dSCapsRef)
        {
            DSCAPS.__Native _Native = DSCAPS.__NewNative();
            //Result result = calli(System.Int32(System.Void*,System.Void*), this._nativePointer, &_Native, *(*(IntPtr*)this._nativePointer + (IntPtr)4 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(4, _nativePointer, &_Native);

            dSCapsRef = new DSCAPS();
            dSCapsRef.__MarshalFrom(ref _Native);
            result.CheckError();
        }
コード例 #30
0
        // <unmanaged>HRESULT IDirectSoundBuffer::GetCurrentPosition([Out, Optional] unsigned int* pdwCurrentPlayCursor,[Out, Optional] unsigned int* pdwCurrentWriteCursor)</unmanaged>
        public unsafe void GetCurrentPosition(out int currentPlayCursorRef, out int currentWriteCursorRef)
        {
            int dwCurrentPlayCursor;
            int dwCurrentWriteCursor;
            //result = calli(System.Int32(System.Void*,System.Void*,System.Void*), this._nativePointer, ptr, ptr2, *(*(IntPtr*)this._nativePointer + (IntPtr)4 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(4, _nativePointer, &dwCurrentPlayCursor, &dwCurrentWriteCursor);

            currentPlayCursorRef  = dwCurrentPlayCursor;
            currentWriteCursorRef = dwCurrentWriteCursor;
            result.CheckError();
        }