Ejemplo n.º 1
0
        public unsafe void SetNotificationPositions(int positionNotifies, DSBPOSITIONNOTIFY[] cPositionNotifiesRef)
        {
            DSBPOSITIONNOTIFY.__Native[] array = new DSBPOSITIONNOTIFY.__Native[cPositionNotifiesRef.Length];
            for (int i = 0; i < cPositionNotifiesRef.Length; i++)
            {
                cPositionNotifiesRef[i].__MarshalTo(ref array[i]);
            }
            HRESULT result;

            fixed(DSBPOSITIONNOTIFY.__Native *ptr = array)
            {
                //result = calli(System.Int32(System.Void*,System.Int32,System.Void*), this._nativePointer, positionNotifies, ptr, *(*(IntPtr*)this._nativePointer + (IntPtr)3 * (IntPtr)sizeof(void*)));
                result = (HRESULT)NativeHelper.CalliInt32(3, _nativePointer, positionNotifies, (void *)ptr);
            }

            for (int j = 0; j < cPositionNotifiesRef.Length; j++)
            {
                cPositionNotifiesRef[j].__MarshalFree(ref array[j]);
            }
            result.CheckError();
        }
Ejemplo n.º 2
0
 internal void __MarshalTo(ref DSBPOSITIONNOTIFY.__Native @ref)
 {
     @ref.dwOffset     = this.dwOffset;
     @ref.hEventNotify = this.WaitHandle.SafeWaitHandle.DangerousGetHandle();
 }
Ejemplo n.º 3
0
 internal void __MarshalFree(ref DSBPOSITIONNOTIFY.__Native @ref)
 {
     @ref.__MarshalFree();
 }