System.Windows.Forms.Application.OleRequired Method

Initializes OLE on the current thread.

Syntax

public static System.Threading.ApartmentState OleRequired ()

Returns

One of the System.Threading.ApartmentState values.

Remarks

Call this method before calling any Microsoft.Win32 method that requires OLE. Application.OleRequired first checks to see if OLE has been initialized on the current thread. If not, it initializes the thread for OLE.

Note:

Unless a thread calls OLE methods directly, you do not need to call this method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0