[Oledb-dev] Provider question

Shachar Shemesh psql at shemesh.biz
Sun Apr 9 13:39:26 GMT 2006


Arvo wrote:

>Hello Shachar,
>
>  
>
>>Thanks. Let me know. If possible, I want the code to compile, out of the
>>box, on as many platforms as possible.
>>    
>>
>
>Doesn't compile yet with VC7 (VS.NET 2002) :)
>
>Problem(s):
>
>e:\PGOLEDB\oledb\PgDBSchemaRowsetImpl.h(146): error C2039: 'InlineIsEqualGUID' : is not a member of 'ATL'
>e:\PGOLEDB\oledb\PgCommand.cpp(377): error C2039: 'InlineIsEqualGUID' : is not a member of 'ATL'
>  
>
Damn!!

MS's own workarounds don't work. I hate it when that happens.

When you install a new platform SDK, there is a conflict about the
definition of "InlineIsEqualGUID" between two namespaces. These are the
global namespace and the ATL namespace. The problem is that someone,
somewhere, imports the ATL namespace into the global namespace. MS
recommends () you add the above qualifier. Of course, they could not
help themselves but remove the ATL definition.

I've changed that into ::InlineIsEqualGUID. I have a suspicion that this
means you will now be obliged to install the platform SDK if you intend
to compile PgOleDb with VS6, but that is something we can demand.

>Looking at source, you changed InlineIsEqualGUID scope since version 1.0.0.18. Unfortunately VC7 doesn't like
>::ATL::InlineIsEqualGUID() - what should I wrote instead? 
>InlineIsEqualGUID() (like it was in old version) or ::InlineIsEqualGUID()?
>
>Project itself converted well, my old problem was with PgOleDb.dll registration - needs to put libpq.dll somewhere into path (or into Debug subdirectory :)).
>
>And what I don't like either - big amount of compiler warnings. See attached text
>
They should almost all be solved now in latest CVS. All except:

>e:\PGOLEDB\oledb\PgCommand.cpp(117) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
>  
>
This seems like a warning about a compiler limitation. Nothing I can do
about it.

>Build log was saved at "file://e:\PGOLEDB\oledb\Debug\BuildLog.htm"
>OleDb - 5 error(s), 33 warning(s)
>
>
>---------------------- Done ----------------------
>
>    Build: 0 succeeded, 1 failed, 0 skipped
>  
>
Latest CVS should have just the one compiler warning left, and I don't
think there is anything I can do about it.


Please let me know how it works out for you.


As a side note, VS6 has a "signed/unsigned comparison", bearing the same
error number and error level. For some reason, however, it only
complains about "==" and "!=". This is doubly odd considering == and !=
work sort of ok for signed/unsigned comparisons. It's > and < that
typically cause security problems.


Maybe it's time to bite the bullet and upgrade after all :-(


          Shachar



More information about the Oledb-devel mailing list