BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Errors Importing ArcObjects Type Library in C++ Builder 6

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX)
View previous topic :: View next topic  
Author Message
Steve Bukoski
Guest





PostPosted: Mon Jan 05, 2004 2:44 pm    Post subject: Errors Importing ArcObjects Type Library in C++ Builder 6 Reply with 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. 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'


Back to top
Big Stew
Guest





PostPosted: Tue Jan 06, 2004 8:50 am    Post subject: Re: Errors Importing ArcObjects Type Library in C++ Builder Reply with 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" <sbukoski (AT) alionscience (DOT) com> wrote

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};




Back to top
Steve Bukoski
Guest





PostPosted: Tue Jan 06, 2004 2:15 pm    Post subject: Re: Errors Importing ArcObjects Type Library in C++ Builder Reply with quote



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: http://gis.esri.com/emails/av8evalcd_order.cfm.



"Big Stew" <Big_Stew (AT) talk21 (DOT) com> wrote

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" <sbukoski (AT) alionscience (DOT) com> wrote in message
news:3ff9786b$1 (AT) newsgroups (DOT) borland.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};






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.