Hello all,
I have a desktop console application and I'm trying to open a workspaceFactory (Access or fileGDB doesn't matter) and I'm getting a "COMException crossed a native/managed boundary error".
Am I doing somethign wrong here?
Sub Main()
'ESRI License Initializer generated code.
m_AOLicenseInitializer.InitializeApplication(New esriLicenseProductCode() {esriLicenseProductCode.esriLicenseProductCodeArcView}, _
New esriLicenseExtensionCode() {})
'ESRI License Initializer generated code.
'Do not make any call to ArcObjects after ShutDownApplication()
Dim pWorkspaceFactory As IWorkspaceFactory
Dim pWorkspace As IWorkspace
pWorkspaceFactory = New AccessWorkspaceFactory
Try
'the following line throws the "COMException crossed a native/managed boundary"
pWorkspace = pWorkspaceFactory.OpenFromFile("C:\temp_colin\junk\test.mdb", 0)
Catch ex As Exception
End Try
m_AOLicenseInitializer.ShutdownApplication()
End Sub
Thanks for any help or suggestions.
Colin