🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3114

Re: new keyword in COM Object

#3114
From: Andrue Cope [TeamB]
Date: Mon, 21 Nov 2005 08:21
25 lines
1933 bytes
Darlington ADIBE wrote:

> But if i comment out the  tcpp = new TTCPPro(NULL);
> it compile
> 
> if it is invalid to the new keyword with a COM Impl. How can I create
> an instance of my class TTCPPro for use in th COM Impl?

There is nothing wrong with using 'new'. The problem is that the linker
can't find the code for the method
Idtcpclient::TIdTCPClient::SetPortA(). The reason that removing the
allocation makes the problem go away is likely to be that the
constructor of that class 'TTCPPro()' is calling that method. Take away
the object construction and nothing else is calling that function so
the linker doesn't need to find it.

As to why the linker can't find that method I'm not sure. Presumably
there is a LIB (perhaps an OBJ) that needs adding to your project but
what I know of sockets under BCB suggests that it ought to all be
automatic.

-- 
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <4381919b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <437ebf9f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ed06838e6cf220fc
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address>
Subject: Re: new keyword in COM Object
Newsgroups: borland.public.cppbuilder.internet.socket
References: <437ebf9f@newsgroups.borland.com>
User-Agent: XanaNews/1.17.6.5
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.207.223.34
Message-ID: <4381919b$1@newsgroups.borland.com>
Date: 21 Nov 2005 01:21:31 -0700
X-Trace: newsgroups.borland.com 1132564891 217.207.223.34 (21 Nov 2005 01:21:31 -0700)
Lines: 25
X-Authenticated-User: acope
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail