public AsyncCommandFillMovie(int priority, long MovieCode, Movie movie, IAsyncCallback callback, Object parameters) { this.priority = priority; this.movie = movie; this.code = MovieCode; this.callback = callback; this.parameters = parameters; this.running = false; this.cmd = 1;//FillMovie }
public AsyncCommandFillMovie(int priority, long MovieCode, Movie movie, IAsyncCallback callback, Object parameters) { this.priority = priority; this.movie = movie; this.code = MovieCode; this.callback = callback; this.parameters = parameters; this.running = false; this.cmd = 1; //FillMovie }
/// <summary> /// Begins an asynchronous request for the next event in the queue. /// </summary> /// <param name="callback"> /// Pointer to the <strong><see cref="IAsyncCallback"/></strong> interface of a callback object. The client must /// implement this interface. /// </param> /// <param name="stateObject"> /// A reference to a state object, defined by the caller. This parameter can be <strong><c>null</c></strong>. /// You can use this object to hold state information. The object is returned to the caller when the callback is invoked. /// </param> /// <remarks> /// <p> /// When a new event is available, the event generator calls the <strong><see /// cref="IAsyncCallback.Invoke"/></strong> method. The <strong>Invoke</strong> method should call <strong><see /// cref="EndGetEvent"/></strong> to get a reference to the <strong><see cref="MediaEvent"/></strong> interface, /// and use that interface to examine the event. /// </p> /// <p> /// Do not call <strong>BeginGetEvent</strong> a second time before calling <strong>EndGetEvent</strong>. While /// the first call is still pending, additional calls to the same object will fail. Also, the <strong><see /// cref="GetEvent(bool)"/></strong> method fails if an asynchronous request is still pending. /// </p> /// </remarks> /// <unmanaged> /// HRESULT IMFMediaEventGenerator::BeginGetEvent([In] IMFAsyncCallback* pCallback,[In] void* punkState) /// </unmanaged> /// <unmanaged-short>IMFMediaEventGenerator::BeginGetEvent</unmanaged-short> public void BeginGetEvent(IAsyncCallback callback, object?stateObject) { BeginGetEvent(callback, stateObject == null ? IntPtr.Zero : Marshal.GetIUnknownForObject(stateObject)); }
/// <summary> /// Return a pointer to the unmanaged version of this callback. /// </summary> /// <param name="callback">The callback.</param> /// <returns>A pointer to a shadow c++ callback</returns> public static IntPtr ToIntPtr(IAsyncCallback callback) { return ToCallbackPtr<IAsyncCallback>(callback); }
/// <summary> /// Return a pointer to the unmanaged version of this callback. /// </summary> /// <param name="callback">The callback.</param> /// <returns>A pointer to a shadow c++ callback</returns> public static IntPtr ToIntPtr(IAsyncCallback callback) { return(ToCallbackPtr <IAsyncCallback>(callback)); }
/// <summary> /// <p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p> </p><p>Begins an asynchronous request for the next event in the queue.</p> /// </summary> /// <param name="callback"><dd> <p>Pointer to the <strong><see cref="SharpDX.MediaFoundation.IAsyncCallback"/></strong> interface of a callback object. The client must implement this interface.</p> </dd></param> /// <param name="stateObject">A reference to a state object, defined by the caller. This parameter can be <strong><c>null</c></strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</param> /// <remarks> /// <p>When a new event is available, the event generator calls the <strong><see cref="SharpDX.MediaFoundation.IAsyncCallback.Invoke"/></strong> method. The <strong>Invoke</strong> method should call <strong><see cref="SharpDX.MediaFoundation.MediaEventGenerator.EndGetEvent"/></strong> to get a reference to the <strong><see cref="SharpDX.MediaFoundation.MediaEvent"/></strong> interface, and use that interface to examine the event.</p><p>Do not call <strong>BeginGetEvent</strong> a second time before calling <strong>EndGetEvent</strong>. While the first call is still pending, additional calls to the same object will fail. Also, the <strong><see cref="SharpDX.MediaFoundation.MediaEventGenerator.GetEvent"/></strong> method fails if an asynchronous request is still pending.</p> /// </remarks> /// <msdn-id>ms701637</msdn-id> /// <unmanaged>HRESULT IMFMediaEventGenerator::BeginGetEvent([In] IMFAsyncCallback* pCallback,[In] void* punkState)</unmanaged> /// <unmanaged-short>IMFMediaEventGenerator::BeginGetEvent</unmanaged-short> public void BeginGetEvent(IAsyncCallback callback, object stateObject) { BeginGetEvent_(AsyncCallbackShadow.ToIntPtr(callback), stateObject == null ? IntPtr.Zero : Marshal.GetIUnknownForObject(stateObject)); }