🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10462

Re: Using a dll (built with Builder) with a Builder project

#10462
From: Simon D
Date: Fri, 09 Apr 2004 14:13
31 lines
1964 bytes
"Kevin Hass" <akevin1@qwest.net> wrote in message
news:4075e12f@newsgroups.borland.com...
> I am using a dll built with Borland Builder in my Builder project. (Both
> built with C++ Builder 5)
> When I call a function from the dll - Windows creates another task on my
> task bar.
> How can stop this from happening?
>
> In dll header file:
> extern "C" __declspec(dllexport) void __stdcall ShowAbout(TComponent
> *Owner);

If the application is seeing this header, then you should change it. Have a
conditional compile so the dll includes __declspec(dllexport) but the main
app does not.

> In dll cpp file (TfrmAboutBox is a member of the dll project):
> void __stdcall ShowAbout(TComponent *Owner)
> {
>   TfrmAboutBox *frmAboutBox = new TfrmAboutBox(Owner);
>   frmAboutBox->ShowModal();
>   delete frmAboutBox;
> }

There is no need for the form to have an owner. Construct with
TfrmAboutBox(0);
and no longer pass the TComponent*. This may be the source of the extra
taskbar item.

HTH
Simon
Technical Details
Message-ID: <4076afd8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news.ntli.net!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4075e12f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,1947deb86373980c
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-09 07:26:54 PST
From: "Simon D" <LightsOnNo1@home.org>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4075e12f@newsgroups.borland.com>
Subject: Re: Using a dll (built with Builder) with a Builder project
Date: Fri, 9 Apr 2004 15:13:38 +0100
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
NNTP-Posting-Host: 213.122.209.18
Message-ID: <4076afd8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1081520088 213.122.209.18 (9 Apr 2004 07:14:48 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news.ntli.net!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail