🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: BCB6 ADO problem with Vista

#55
From: George P Boutwell
Date: Wed, 14 Nov 2007 16:03
24 lines
3612 bytes
"George P Boutwell" <gboutwel@valleyhope.com> wrote:

>All our BCB6 applications that we have built, lock-up 
>immediately when we make a connection with the ADOConnection 
>object.  It looks like it it is having problem deep in the ADO 
>components in Vista, the error/bug happens deep in the 
>Kernel/ADO stack.  Anyone else experinced this problem and 
>have advice on supporting BCB6 ADO apps under Vista when it 
>won't even allow them to connect.

  I wanted to update everyone on this thread - bottom line is we have our application(s) finally working (sorta) under Vista but wanted to give the details of what we discovered along the way for anyone having a similar problem...

  In all honest most my prior posts where from memory.  We had initially tried BCB6 under Vista and when we hit this problem originally we didn't have time to track it down, so we opted to go Virtual Machine of XP in Vista to still get things done.  This was OK, but is a major productivity draw if you ask me...  So we kinda shelved this problem until we had more time to look into it.
  I started the thread to get the ball rolling on solving this problem (hopefully) for good.  So we took a step back and tried several things:

  We started by building an "Default" BCB6 App With TADOConnection dropped on a form and TADOQuery dropped on the form, a Button to Set TADOQuery->Active = true, this app worked, which is a good sign, but our application(s) still didn't.
  So we looked at the differences in our app(s) verses the above.  There where 2 major differences - 1) Our Apps was creating TADOConnection & TADOQuery in code & 2) Our Apps where creating the TADOConnection in shared dll library.
  We modified the "Default" BCB6 App above to create the TADOConnection and TADOQuery in code like our shared dll library was, this of course worked under Vista, but left us scratching our head about why it would work in an EXE but not an DLL.
  We did some more digging in the DLL code and found that to avoid an error message about needing to call CoInitialize we call CoInitialize in the DLLMain (PROCESS_ATTACH), when we comment this line of code out, we get the error message about needing to call CoInitialize, but the lock-up in Vista is gone.  So apparently our problem is the we call CoInitialize in a DLL - this code works fine in XP, but is an problem apparently in Vista.  Haven't yet worked out how we are going to deal with this, but at least we are able to run our apps in Vista, under BCB6 and debug/build/test them...

Thanks for all your help.  Anyone have any thoughts on how we can get around the lock-up & message by calling the CoInitialize?

George
Technical Details
Message-ID: <473b2a77$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4734a20d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,d628bc7458729f40
X-Google-Attributes: gid10698b,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "George P Boutwell" <gboutwel@valleyhope.com>
Sender: "George P Boutwell" <gboutwel@valleyhope.com>
Reply-To: "George P Boutwell" <gboutwel@valleyhope.com>
Subject: Re: BCB6 ADO problem with Vista
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 24.225.9.218     
References:  <4734a20d$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <473b2a77$1@newsgroups.borland.com>
Date: 14 Nov 2007 09:03:51 -0700
X-Trace: newsgroups.borland.com 1195059831 207.105.83.66 (14 Nov 2007 09:03:51 -0700)
Lines: 24
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail