Opens the workspace specified by the given file name.
[Visual Basic 6.0] Function OpenFromFile(
ByVal fileName As String, _
ByVal hWnd As OLE_HANDLE _
) As IWorkspace
[Visual Basic .NET] Public Function OpenFromFile ( _ ByVal fileName As String, _ ByVal hWnd As Integer _ ) As IWorkspace
[C#] public IWorkspace OpenFromFile ( string fileName, int hWnd );
[Java] public IWorkspace openFromFile ( String fileName, int hWnd ) throws IOException, AutomationException
[C++] HRESULT OpenFromFile( BSTR fileName, OLE_HANDLE hWnd, IWorkspace** Workspace );
Parameters
fileName [in]
fileName is a parameter of type BSTR
hWnd [in]
hWnd is a parameter of type OLE_HANDLE
Workspace [out, retval]
Workspace is a parameter of type IWorkspace
OpenFromFile takes the pathname of a file or directory that represents either a FileSystemWorkspace or LocalDatabaseWorkspace, or a connection file to a RemoteDatabase workspace and returns an interface on the specified workspace. Clients of these methods can then proceed to open and access datasets in the workspace. If these methods are called with insufficient properties, then the user will be presented with a connection dialog that will prompt for the required properties.
The hWnd argument is the parent window or application's window. The hWnd will guarantee that the connection dialog, if presented to you because of insufficient properties, has the correct parent.