This document is archived and information here might be outdated. Recommended version. |
Opens the workspace specified by the given file name.
[Visual Basic .NET] Public Function OpenFromFile ( _ ByVal fileName As String, _ ByVal hWnd As Integer _ ) As IWorkspace
[C#] public IWorkspace OpenFromFile ( string fileName, int hWnd );
[C++]
HRESULT OpenFromFile(
BSTR fileName,
OLE_HANDLE hWnd
);
[C++] Parameters fileName [in]
fileName is a parameter of type BSTR hWnd [in]
hWnd is a parameter of type OLE_HANDLE
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.