🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4630

Re: Passing TADO connection to a VC++6 DLL

#4630
From: Rick Golden
Date: Fri, 09 Nov 2001 19:36
44 lines
2188 bytes
Just a guess...

are you sure your reference count of the object does not come to 0 (for any
reasons) and
when you try to Execute the object is already freed...???




D. Daeschler <illusioned@netzero.net> wrote in message
news:3be9ad7a$1_2@dnews...
>
> Greetings.  What I need to do is pass the underlying ADO _Connection *
from a TADOConnection to a Microsoft DLL so that I can use the connection
from the borland app in an MS DLL.
>
> Here are some things that I have tried:
>
> In the borland app.
> --------------------------
> assume that dllcall is some function in the dll that takes one param (an
ADO _Connection *)
>
> TADOConnection *someConnection = new TADOConnection(NULL);
>
> (dllcall)((_Connection *)someConnection->ConnectionObject);
> --------------------------
>
>
> in the MS dll
> --------------------------
> __declspec(dllexport)
> void dllcall(_Connection * conn)
> {
>     _ConnectionPtr c = conn;
>     c->Execute(... /*assume valid params*/)
> }
> ---------------------------
>
> everything works fine until the call to ->Execute.  I then get an access
violation at address 5.  Any ideas on what I'm doing wrong or other ways to
do this?  thanks!
>
> - Dave
Technical Details
Message-ID: <3bec2fce_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3be9ad7a$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,59fb5ec07d30ef6f
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-11-09 11:40:50 PST
Reply-To: "Rick Golden" <GoldenRick@hotmail.com>
From: "Rick Golden" <GoldenRick@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3be9ad7a$1_2@dnews>
Subject: Re: Passing TADO connection to a VC++6 DLL
Date: Fri, 9 Nov 2001 14:36:12 -0500
Lines: 46
Organization: Gold
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 198.168.250.105
Message-ID: <3bec2fce_1@dnews>
X-Trace: dnews 1005334478 198.168.250.105 (9 Nov 2001 11:34:38 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews