Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > About Dlls in Borland C++builder 6 Ent

Reply
Thread Tools

About Dlls in Borland C++builder 6 Ent

 
 
=?ISO-8859-1?Q?Ren=E9_Kjellerup?=
Guest
Posts: n/a
 
      02-15-2004
Hi' all

I've come across a strange thing
using 'Borland C++Builder 6 Ent'
and are now looking for how this
all fit together.

Here is the files that where created
without the .bpf, .bpr, and .res file:

(this is a DLL project)

// --- Unit1.cpp:

#include <vcl.h>
#include <windows.h>
#pragma hdrstop

// lots of comments generated by DLL Wizard

#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*
lpReserved)
{
return 1;
}

// --- Unit1.cpp EOF

// --- Unit2.cpp:

#pragma hdrstop

#include "Unit2.h"

// if I don't include this non existent file:
#include "Unit1.h"
// this doesn't work, Why?

#pragma package(smart_init)

void Say(char *What)
{
ShowMessage("From within the DLL\n" + (String)What );
}

// --- Unit2.cpp EOF

// --- Unit2.h:

#ifndef Unit2H
#define Unit2H

#endif

extern "C" void __declspec(dllexport) Say(char *What);

// --- Unit2.h EOF





I have noticed that I need to include the file Unit1.h
in the unit I add to hold my DLL functions even though
it's never created in the project folder.

This piece of code is taken from a tutorial on DLL files
and I came to wonder why my project wouldn't compile,
and I thought to my self: off cause you'll need the header
for your main unit of the DLL file project, and used to the
filenaming in Borland I just wrote '#include "Unit1.h"'
right next to the other include statement and compiled.
Everything worked, yes.

However as I got a little further I noticed that there were
no Unit1.h any where in the project to be found.

I came across this as wanted to do the same thing a second DLL
that are in the project group, lets just call the files:
Unit3.cpp, Unit4.cpp, and Unit4.h, and I wished to include
Unit3.h and then I received the error:

E2209 Unable to open include file 'Unit3.h'

but if I changed it to the (now to me known) non-existent
file: Unit1.h. Everything compiled just fine.

Now I'm asking how can this be?

Yours R.Kj.
--As life grows older, I gain experience.

 
Reply With Quote
 
 
 
 
Jonathan Turkanis
Guest
Posts: n/a
 
      02-15-2004
"René Kjellerup" <> wrote in message
news:...
> Hi' all
>
> I've come across a strange thing
> using 'Borland C++Builder 6 Ent'
> and are now looking for how this
> all fit together.
>
> Here is the files that where created
> without the .bpf, .bpr, and .res file:
>
> (this is a DLL project)
>


As you have phrased it, your question is specific to a particular OS,
and to a particular development environment, and therefore not
appropriate for this group.

If you can replicate your problem with a simple project not involving
DLLs, you may get a good answer here. Try to find the simplest example
that reproduces the error.

Jonathan


 
Reply With Quote
 
 
 
 
Duane Hebert
Guest
Posts: n/a
 
      02-15-2004

"René Kjellerup" <> wrote in message news:...
> Hi' all
>
> I've come across a strange thing
> using 'Borland C++Builder 6 Ent'
> and are now looking for how this
> all fit together.


newsgroups.borland.com


 
Reply With Quote
 
=?ISO-8859-1?Q?Ren=E9_Kjellerup?=
Guest
Posts: n/a
 
      02-15-2004
Thanks anyway

Duane Hebert wrote:
> "René Kjellerup" <> wrote in message news:...
>
>>Hi' all
>>
>>I've come across a strange thing
>>using 'Borland C++Builder 6 Ent'
>>and are now looking for how this
>>all fit together.

>
>
> newsgroups.borland.com
>
>


 
Reply With Quote
 
dasan_in dasan_in is offline
Junior Member
Join Date: Mar 2011
Posts: 1
 
      03-22-2011
you can view the examples given in site www.ibsoftindia.org

www.ibsoftindia.org
Quote:
Originally Posted by =?ISO-8859-1?Q?Ren=E9_Kjellerup?= View Post
Hi' all

I've come across a strange thing
using 'Borland C++Builder 6 Ent'
and are now looking for how this
all fit together.

Here is the files that where created
without the .bpf, .bpr, and .res file:

(this is a DLL project)

// --- Unit1.cpp:

#include <vcl.h>
#include <windows.h>
#pragma hdrstop

// lots of comments generated by DLL Wizard

#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*
lpReserved)
{
return 1;
}

// --- Unit1.cpp EOF

// --- Unit2.cpp:

#pragma hdrstop

#include "Unit2.h"

// if I don't include this non existent file:
#include "Unit1.h"
// this doesn't work, Why?

#pragma package(smart_init)

void Say(char *What)
{
ShowMessage("From within the DLL\n" + (String)What );
}

// --- Unit2.cpp EOF

// --- Unit2.h:

#ifndef Unit2H
#define Unit2H

#endif

extern "C" void __declspec(dllexport) Say(char *What);

// --- Unit2.h EOF





I have noticed that I need to include the file Unit1.h
in the unit I add to hold my DLL functions even though
it's never created in the project folder.

This piece of code is taken from a tutorial on DLL files
and I came to wonder why my project wouldn't compile,
and I thought to my self: off cause you'll need the header
for your main unit of the DLL file project, and used to the
filenaming in Borland I just wrote '#include "Unit1.h"'
right next to the other include statement and compiled.
Everything worked, yes.

However as I got a little further I noticed that there were
no Unit1.h any where in the project to be found.

I came across this as wanted to do the same thing a second DLL
that are in the project group, lets just call the files:
Unit3.cpp, Unit4.cpp, and Unit4.h, and I wished to include
Unit3.h and then I received the error:

E2209 Unable to open include file 'Unit3.h'

but if I changed it to the (now to me known) non-existent
file: Unit1.h. Everything compiled just fine.

Now I'm asking how can this be?

Yours R.Kj.
--As life grows older, I gain experience.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
QUERY: Borland C++ 4.5 vs Borland Turbo C++ 1.01 dhruba.bandopadhyay@hotmail.com C++ 1 10-02-2006 10:57 AM
When will be Ent 2.0 ? Jarod ASP .Net 0 01-13-2006 02:55 PM
dynamic user control event handling (VS.NET 2003 Ent) =?Utf-8?B?RGV2ZWxvcGVyX1NvZnR3YXJl?= ASP .Net 2 11-28-2005 07:52 PM
LEAP (or WPA-Ent) and WPA-PSK to work on a single 1200AP??? hax3 Cisco 10 10-05-2005 07:19 PM
A good site to learn asp.ent, ado.net and access databases? Aaron ASP .Net 6 09-06-2004 12:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57