Article View: borland.public.cppbuilder.database.ado
Article #4615Passing TADO connection to a VC++6 DLL
From: D. Daeschler
Date: Wed, 07 Nov 2001 21:54
Date: Wed, 07 Nov 2001 21:54
28 lines
1789 bytes
1789 bytes
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:
<3be9ad7a$1_2@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!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,59fb5ec07d30ef6f,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-11-07 13:59:54 PST From: "D. Daeschler" <illusioned@netzero.net> Sender: "D. Daeschler" <illusioned@netzero.net> Reply-To: "D. Daeschler" <illusioned@netzero.net> Subject: Passing TADO connection to a VC++6 DLL Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 63.162.194.109 63.162.194.109 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3be9ad7a$1_2@dnews> Date: 7 Nov 2001 13:54:02 -0800 X-Trace: dnews 1005170042 207.105.83.65 (7 Nov 2001 13:54:02 -0800) Lines: 28 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!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews