Hi, I have trouble to get workspace using open from file. here my codes:
'shape file workspace is kind of file system workspace
Dim pWSFactPipeline As IWorkspaceFactory
pWSFactPipeline = New ShapefileWorkspaceFactory
If pWSFactPipeline Is Nothing Then
MsgBox("pointer to workspace factory is null")
End If
'work space is directory of file system
MsgBox("shapefile workspace type is " & pWSFactPipeline.WorkspaceType.ToString)
MsgBox("workspace description: " & pWSFactPipeline.WorkspaceDescription(True))
If pWSFactPipeline.IsWorkspace("D:\Data") Then
MsgBox(strWS & " is shapefile workspace")
End If
Dim pFeatureWSPipeline As IFeatureWorkspace = CType(pWSFactPipeline.OpenFromFile("D:\Data", hWnd), IFeatureWorkspace)
'open featureclass (shape file)
Dim pFeatureClassPipeline As IFeatureClass
pFeatureClassPipeline = pFeatureWSPipeline.OpenFeatureClass(strNamePipeline)
My program is stuck in the bold part. I am not sure that how I can get hWnd.
Thanks for your help.