Board index » cppbuilder » Errors Importing ArcObjects Type Library in C++ Builder 6

Errors Importing ArcObjects Type Library in C++ Builder 6


2004-01-05 10:44:59 PM
cppbuilder109
I am attempting to import ESRI's ArcObjects type library into C++ Builder 6
using the Import Type Library option from the Project menu. I get errors
concerning six classes already installed. Utilizing information gleaned from
this archive and the ESRI forums, I rename each ESRI class that is in
conflict by inserting "Arc" after the T.
TButton TArcButton
TTable TArcTable
TPrintDialog TArcPrintDialog
TProgressBar TArcProgressBar
TFindDialog TArcFindDialog
Then, I chose to add this to package dcluser.bpk and I attempted to compile
it. I get 24 compile errors. The first error is the following:
E2347 Parameter mismatch in write access specifier of property RasterBand
For this line of code in the esriCore_TLB.cpp file:
__property HRESULT RasterBand = {write = set_RasterBand};
Has anyone ever been successful in using ArcObjects with C++ Builder?
Am I just doing something really stupid here? I am very new to COM, but have
worked in C++ Builder for over 3 years.
I would appreciate any help. At this point, since I may be required to use
ESRI's ArcObjects, I might be forced to abandon Borland and use a MS
"solution".
Thanks,
Steve Bukoski
Complete set of errors:
[C++ Error] esriCore_TLB.h(65639): E2347 Parameter mismatch in write access
specifier of property RasterBand
[C++ Error] esriCore_OCX.h(772): E2034 Cannot convert 'long' to
'ISpatialReferenceInfoPtr'
[C++ Error] esriCore_OCX.h(779): E2034 Cannot convert 'long' to
'ISpatialReferenceInfoPtr'
[C++ Error] esriCore_OCX.h(791): E2034 Cannot convert 'long' to
'ILinearUnitPtr'
[C++ Error] esriCore_OCX.h(797): E2034 Cannot convert 'long' to
'ISpheroidPtr'
[C++ Error] esriCore_OCX.h(803): E2034 Cannot convert 'long' to 'IDatumPtr'
[C++ Error] esriCore_OCX.h(810): E2034 Cannot convert 'long' to
'IPrimeMeridianPtr'
[C++ Error] esriCore_OCX.h(816): E2034 Cannot convert 'long' to
'IProjectionPtr'
[C++ Error] esriCore_OCX.h(822): E2034 Cannot convert 'long' to
'IParameterPtr'
[C++ Error] esriCore_OCX.h(828): E2034 Cannot convert 'long' to
'IProjectedCoordinateSystemPtr'
[C++ Error] esriCore_OCX.h(834): E2034 Cannot convert 'long' to
'IGeographicCoordinateSystemPtr'
[C++ Error] esriCore_OCX.h(841): E2034 Cannot convert 'long' to
'ITransformationPtr'
[C++ Error] esriCore_OCX.h(846): E2034 Cannot convert 'long' to 'ISetPtr'
[C++ Error] esriCore_OCX.h(851): E2034 Cannot convert 'long' to 'ISetPtr'
[C++ Error] esriCore_OCX.h(856): E2034 Cannot convert 'long' to 'ISetPtr'
[C++ Error] esriCore_OCX.h(861): E2034 Cannot convert 'long' to 'ISetPtr'
[C++ Error] esriCore_OCX.h(866): E2034 Cannot convert 'long' to 'ISetPtr'
[C++ Error] esriCore_OCX.h(871): E2034 Cannot convert 'long' to 'ISetPtr'
[C++ Error] esriCore_OCX.h(3806): E2347 Parameter mismatch in read access
specifier of property Count
[C++ Error] esriCore_OCX.h(3807): E2347 Parameter mismatch in read access
specifier of property Item
[C++ Error] esriCore_OCX.h(3793): E2034 Cannot convert 'long' to
'IApplicationPtr'
[C++ Error] esriCore_OCX.h(3882): E2347 Parameter mismatch in read access
specifier of property Count
[C++ Error] esriCore_OCX.h(7222): E2034 Cannot convert 'long' to 'IUnknown
*'
[C++ Error] esriCore_OCX.h(7230): E2034 Cannot convert 'long' to 'IUnknown
*'
[Linker Fatal Error] Fatal: Unable to open file 'ESRICORE_OCX.OBJ'
 
 

Re:Errors Importing ArcObjects Type Library in C++ Builder 6

I'd like to look into this issue, but I can't find a link to download a
trial (i.e. free) version of ArcObjects.
It looks like the type library importer has got the property declaration
wrong.
Could you post the code for the set_RasterBand(...) method, so we can see
what arguments it expects?
(Renaming the classes as suggested is necessary because TButton, TTable are
names of existing VCL components)
Stew
"Steve Bukoski" < XXXX@XXXXX.COM >wrote in message
Quote
I am attempting to import ESRI's ArcObjects type library into C++ Builder
6
using the Import Type Library option from the Project menu.
Then, I chose to add this to package dcluser.bpk and I attempted to
compile
it. I get 24 compile errors. The first error is the following:

E2347 Parameter mismatch in write access specifier of property RasterBand

For this line of code in the esriCore_TLB.cpp file:

__property HRESULT RasterBand = {write = set_RasterBand};

 

Re:Errors Importing ArcObjects Type Library in C++ Builder 6

Stew,
Here are the functions from the esriCore_TLB.h file for set_RasterBand:
template <class T>HRESULT __fastcall
TCOMIRasterStatisticsT<T>::set_RasterBand(Esricore_tlb::IRasterBand*
Param1/*[in]*/) {
return (*this)->set_RasterBand(Param1); }
template <class T>HRESULT __fastcall
TCOMIRasterStatisticsT<T>::set_RasterBand(Esricore_tlb::IRasterBandPtr
Param1/*[in]*/) {
return (*this)->set_RasterBand(IRasterBand*)Param1);
}
And here is the GUID for IRasterBand:
interface DECLSPEC_UUID("{31E6C041-EC46-11D1-8D21-0000F8780535}")
IRasterBand; typedef TComInterface<IRasterBand, &IID_IRasterBand>
IRasterBandPtr;
Thanks for confirming that the class rename is necessary. When you're
spinning your wheels like I am on this, its nice to know that you are on the
right path.
(Stew, I apologize for the earlier private email. I hit Reply to Sender
instead of Reply to Group.)
Thanks,
Steve
P.S. The ArcObjects library is part of the ArcView 8.x or ArcEditor 8.x
products from ESRI. You cannot download these products. The installation set
is 3 CDs. If you are interested, they provide instructions for obtaining a
60-day eval CD set here: gis.esri.com/emails/av8evalcd_order.cfm.
"Big Stew" < XXXX@XXXXX.COM >wrote in message
Quote
I'd like to look into this issue, but I can't find a link to download
a trial (i.e. free) version of ArcObjects.
It looks like the type library importer has got the property
declaration wrong.
Could you post the code for the set_RasterBand(...) method, so we can
see what arguments it expects?
(Renaming the classes as suggested is necessary because TButton,
TTable are names of existing VCL components)

Stew


"Steve Bukoski" < XXXX@XXXXX.COM >wrote in message
news:3ff9786b$ XXXX@XXXXX.COM ...
>I am attempting to import ESRI's ArcObjects type library into C++
>Builder
6
>using the Import Type Library option from the Project menu.
>Then, I chose to add this to package dcluser.bpk and I attempted to
compile
>it. I get 24 compile errors. The first error is the following:
>
>E2347 Parameter mismatch in write access specifier of property
>RasterBand
>
>For this line of code in the esriCore_TLB.cpp file:
>
>__property HRESULT RasterBand = {write = set_RasterBand};
>


 

{smallsort}