[postgis-users] Help with WKB and VC++

Christoph Spoerri spoerri at duke.edu
Sat Nov 8 07:36:08 PST 2003


Hi,

I hope the list could help me out here. I'm working on a project (part of the 
pgarc project) that tries to implement an OLEDB provider for postgis (for use 
with ArcGIS and any other OLEDB clients). 

While things move along nicely, I came across the following stumbling block: 
after retrieving the geometries from the database in WKB format, I need to 
assign them to a IUnknown* object. Now, I have the following two questions:
1. How to I cast from char* to IUnknown* ?
2. If I need to copy the returned binary data (as suggested in the postgresql 
docs), what's an easy (and quick) way to do this?

I'm new to (V)C++ and COM, so please forgive me if this are simple questions. 
Also, the web wasn't much help for finding answers.

Thanks,
Christoph




More information about the postgis-users mailing list