🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #100

Re: Standalone Midas application in C++ Builder 6

#100
From: St�phane
Date: Tue, 06 Sep 2005 17:33
34 lines
2311 bytes
If by stand-alone you meant shipping a single exe file, then you could put 
the Midas DLL in the executable's resource.
Here's how we check if Midas is installed:
    auto_ptr<TRegistry> registry ( new TRegistry ) ;
    registry->RootKey = HKEY_CLASSES_ROOT ;
    registry->OpenKeyReadOnly("\\CLSID\\{9E8D2FA1-591C-11D0-BF52-0020AF32BD64}\\InProcServer32" 
 ) ;
    String midasDLL = registry->ReadString("") ;
    registry->CloseKey() ;


    if( midasDLL.IsEmpty() || !FileExists( midasDLL ) )
    {
        if( ! midasDLL.IsEmpty() )
            ShellExecute( Application->Handle, "open", "regsvr32.exe", "/s 
midas.dll", NULL, SW_HIDE ) ;


        // Extract the dll from the resource
        ...
    }


HTH,
Stephane


"Edward Diener" <eddielee_no_spam_here@tropicsoft.com> wrote in message 
news:42f4288a$1@newsgroups.borland.com...
> Is it possible to create a standalone application using Midas and C++ 
> Builder 6 ? I am using TClientDataSet in a BCB6 application I need to be a 
> standalone application. The application accesses the BDE and ADO database 
> components and uses a TClientDataSet in order to create an in-memory 
> dataset from ascii files. 
Technical Details
Message-ID: <431dd2a3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42f4288a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcd2b,4497dc2e0a1d9630
X-Google-Attributes: gidfcd2b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "St�phane" <stephane@compass-cama.com>
From: "St�phane" <stephane@compass-cama.com>
Newsgroups: borland.public.cppbuilder.database.multi-tier
References: <42f4288a$1@newsgroups.borland.com>
Subject: Re: Standalone Midas application in C++ Builder 6
Date: Tue, 6 Sep 2005 11:33:23 -0600
Lines: 36
Organization: Compass
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus: avast! (VPS 0536-1, 09/06/2005), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 142.179.196.17
Message-ID: <431dd2a3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1126027939 142.179.196.17 (6 Sep 2005 10:32:19 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail