[fdo-internals] Hammerhead with FDO 3.2.x and fdopostgis

Mateusz Loskot mateusz at loskot.net
Wed Feb 7 05:12:41 EST 2007


Hi All,

I'm having some strange problems with using FDO 3.2.x branch
and my fdopostgis provider, under Map 3D Hammerhead.
I'm using FDO 3.2.x from following branch:

http://svn.osgeo.org/svn/fdordbms/branches/3.2.x/

The fdopostgis provider builds against 3.2.x without problems.
Also, simple tests of load/connect/disconnect work well.
Now, I'm trying to check it with Map 3D Hammerhead and

I'm encountering two problems:

1) The provider (PostGisProvider.dll) can be loaded, but no entry point
seems to be found. Here is screenshot with some details (marked with red
lines) that I managed to get under debugger attached to acad.exe:

http://mateusz.loskot.net/tmp/fdopostgis-hh-noentry.png

I suppose the "Entry point not found" message is telling me that
address of the CreateConnection() call exported from PostGisProvider.dll
can not be found. Second, I have some logging action inside my
CreateConnection() but it's not executed.

I've made some diagnostics of my PostGisProvider.dll and I'm pretty
sure it's well baked well, because:


a) dumpbin.exe /exports PostGisProvider.dll
lists exported CreateConnection() call:

1   17 0004717C CreateConnection = @ILT+375(_CreateConnection)


b) Simple test using command line program does work well.
I can step all calls and everything works:

- FdoConnectionManager::CreateConnection()
-- LoadLibrary - OK
-- GetProcAddress of CreateConnection() from PostGisProvider.dll - OK
--- call PostGisProvider.dll::CreateConnection() - OK
---- I get valid pointer to FdoIConnection interface
----- I can use the pointer to connect with PostGIS datastore

//////////////////////////////////////////////////////////////////////
std::wstring provider(L"OSGeo.PostGIS.3.2");
std::wstring
connStr(L"service=fdo_test;username=m;password=x;datastore=tmp");

FdoPtr<IConnectionManager> mgr;
mgr = FdoFeatureAccessManager::GetConnectionManager();

FdoPtr<FdoIConnection> conn;
conn = mgr->CreateConnection(provider.c_str());
conn->SetConnectionString(connStr.c_str());
FdoConnectionState state = conn->Open();
//////////////////////////////////////////////////////////////////////


Summarizing, from a) and b) I assume the fdopostgis interface is
obtainable and usable.


2) Second problem is related to FDO 3.2.x.
As I understand and got confirmation from Bob, the Hammerhead works with
FDO 3.2.x, so I tried to replace original Hammerhead libraries with my
homebaked from the 3.2.x branch:
FDO.dll, FDOCommon.dll, FDOGeometry.dll and FDOSpatial.dll

Unfortunately, just after Hammerhead starts, I got something like this:

http://mateusz.loskot.net/tmp/hh-with-fdocore-3.2.0.png

Also, I can not access File -> Data Connect options


Does anyone see I'm doing wrong or I'm missing something?

I'd be very thankful for some assistance in getting Hammerhead
working with provider built against FDO 3.2.x branch.

BTW, is there any way to get low-level detailed log from Hammerhead,
some backtrace, etc.?


Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net


More information about the fdo-internals mailing list