Discussion:
Borland C++ 5.02 Help
(too old to reply)
Linzy
2007-08-10 10:37:05 UTC
Permalink
Hi Guys,

Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.

Thanks in adv.

--
Linzy
Zara
2007-08-10 13:23:54 UTC
Permalink
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
Thanks in adv.
And the question is ....?
Linzy
2007-08-11 07:31:11 UTC
Permalink
Post by Zara
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
Thanks in adv.
And the question is ....?
Is it possible to use a 16-bit DLL in a Win32 based application in
Borland C++ 5.02.

I am in need of porting a 16-bit application which was written in 1992
to 32-bit application in borland c++ 5.02. Some of the sources for the
DLL file is missing which I cant port it to 32-bit DLL.
So I am in need of using the same 16-bit DLL in the 32-bit
Application.

When I tried by using the same 16-bit DLL in the 32-bit application it
shows
FATAL ERROR: 16-bit segments not supported.

Do you have any solution for this.

Thanks,
Linzy
Zara
2007-08-13 05:20:37 UTC
Permalink
Post by Linzy
Post by Zara
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
Thanks in adv.
And the question is ....?
Is it possible to use a 16-bit DLL in a Win32 based application in
Borland C++ 5.02.
I am in need of porting a 16-bit application which was written in 1992
to 32-bit application in borland c++ 5.02. Some of the sources for the
DLL file is missing which I cant port it to 32-bit DLL.
So I am in need of using the same 16-bit DLL in the 32-bit
Application.
When I tried by using the same 16-bit DLL in the 32-bit application it
shows
FATAL ERROR: 16-bit segments not supported.
Do you have any solution for this.
Thanks,
Linzy
Not really sure about it, but I think you should not load it a a
normal DLL (which internally uses the windows gfuntion LoadLibrary)
but load it using LoadLibraryEx, and create a wrapper around the dll
loaded to call its functions.

This will be really hard work!

www.msdn.com conatins all information you need, freely available. You
may also want to repeat your question in a MSWindows usent group, as
it is irectly related to the OS, not to the compiler
Linzy
2007-08-13 07:22:54 UTC
Permalink
Post by Zara
Post by Linzy
Post by Zara
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
Thanks in adv.
And the question is ....?
Is it possible to use a 16-bit DLL in a Win32 based application in
Borland C++ 5.02.
I am in need of porting a 16-bit application which was written in 1992
to 32-bit application in borland c++ 5.02. Some of the sources for the
DLL file is missing which I cant port it to 32-bit DLL.
So I am in need of using the same 16-bit DLL in the 32-bit
Application.
When I tried by using the same 16-bit DLL in the 32-bit application it
shows
FATAL ERROR: 16-bit segments not supported.
Do you have any solution for this.
Thanks,
Linzy
Not really sure about it, but I think you should not load it a a
normal DLL (which internally uses the windows gfuntion LoadLibrary)
but load it using LoadLibraryEx, and create a wrapper around the dll
loaded to call its functions.
This will be really hard work!
www.msdn.comconatins all information you need, freely available. You
may also want to repeat your question in a MSWindows usent group, as
it is irectly related to the OS, not to the compiler- Hide quoted text -
- Show quoted text -
Thanks Zara !!
I will look into the link and reply you soon...
--
Linzy
Zara
2007-08-13 08:18:57 UTC
Permalink
Post by Linzy
Post by Zara
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
<...>
Post by Linzy
Post by Zara
www.msdn.comconatins all information you need, freely available. You
may also want to repeat your question in a MSWindows usent group, as
it is irectly related to the OS, not to the compiler- Hide quoted text -
- Show quoted text -
Thanks Zara !!
I will look into the link and reply you soon...
www.msdn.com
I hate my low typing skills ;-)
Darko Miletic
2007-08-14 22:54:06 UTC
Permalink
Post by Linzy
Is it possible to use a 16-bit DLL in a Win32 based application in
Borland C++ 5.02.
Yes it is. The technique is called thunking. For windows 9x/me you
need to write flat thunk dll.

There was a flat thunk sample shipped with TASM 5 which you can use as
a starting point for BC++ 5.

Take a look here also
http://support.microsoft.com/kb/125710


On the other hand Windows nt/2000/XP/2003 supports only generic
thunking which exists to enable 16-bit code to call 32-bit codel. So
that does not help you much.

As an alternative you can write 16-bit OCX that wraps that dll. You
can call 16-bit COM interfaces from 32-bit code with no problems.

Darko
Linzy
2007-08-16 05:17:36 UTC
Permalink
Post by Darko Miletic
Post by Linzy
Is it possible to use a 16-bit DLL in a Win32 based application in
Borland C++ 5.02.
Yes it is. The technique is called thunking. For windows 9x/me you
need to write flat thunk dll.
There was a flat thunk sample shipped with TASM 5 which you can use as
a starting point for BC++ 5.
Take a look here alsohttp://support.microsoft.com/kb/125710
On the other hand Windows nt/2000/XP/2003 supports only generic
thunking which exists to enable 16-bit code to call 32-bit codel. So
that does not help you much.
As an alternative you can write 16-bit OCX that wraps that dll. You
can call 16-bit COM interfaces from 32-bit code with no problems.
Darko
Hi,
Thanks for your reply !!

I read that article in the link you provided. They are saying that
only Generic Thunk is possible in Windows XP. But in my case the Flat
Thunk is needed to call a 16-bit DLL function in Win32 Application.
What can I do now? Is there any other way to solve this (Other than
THUNK)? Please do reply if you have any idea to solve.
Am struck with this for more than 20 days.

--
Linzy
Linzy
2007-08-16 05:21:50 UTC
Permalink
Post by Linzy
Post by Darko Miletic
Post by Linzy
Is it possible to use a 16-bit DLL in a Win32 based application in
Borland C++ 5.02.
Yes it is. The technique is called thunking. For windows 9x/me you
need to write flat thunk dll.
There was a flat thunk sample shipped with TASM 5 which you can use as
a starting point for BC++ 5.
Take a look here alsohttp://support.microsoft.com/kb/125710
On the other hand Windows nt/2000/XP/2003 supports only generic
thunking which exists to enable 16-bit code to call 32-bit codel. So
that does not help you much.
As an alternative you can write 16-bit OCX that wraps that dll. You
can call 16-bit COM interfaces from 32-bit code with no problems.
Darko
Hi,
Thanks for your reply !!
I read that article in the link you provided. They are saying that
only Generic Thunk is possible in Windows XP. But in my case the Flat
Thunk is needed to call a 16-bit DLL function in Win32 Application.
What can I do now? Is there any other way to solve this (Other than
THUNK)? Please do reply if you have any idea to solve.
Am struck with this for more than 20 days.
--
Linzy- Hide quoted text -
- Show quoted text -
And also the main thing is that we are not aware of what that DLL is
doing in the code. No documents are with us. We are simply doing a
migration with what ever experience in handling the application my
seniors are having.
With this knowledge how can I be able to warite the wrapper class over
that DLL?

--
Linzy
Zara
2007-08-16 07:51:37 UTC
Permalink
<...>
Post by Linzy
And also the main thing is that we are not aware of what that DLL is
doing in the code. No documents are with us. We are simply doing a
migration with what ever experience in handling the application my
seniors are having.
With this knowledge how can I be able to warite the wrapper class over
that DLL?
If I were faced with your situation, I would consider specifying the
behaviour of the DLL, and form thta specifications rewiting it
completely. Two advantages: it will be 32 bit code, and the dependency
from external source will be lost.

Probably, debugging new code will be more or less as hard as debugging
thunking code.

Or you may search sourceforge or other open source sites to see if
there is any opne librarythat fits your needs.

Best regrads

Zara
Linzy
2007-08-17 07:38:49 UTC
Permalink
Post by Zara
<...>
Post by Linzy
And also the main thing is that we are not aware of what that DLL is
doing in the code. No documents are with us. We are simply doing a
migration with what ever experience in handling the application my
seniors are having.
With this knowledge how can I be able to warite the wrapper class over
that DLL?
If I were faced with your situation, I would consider specifying the
behaviour of the DLL, and form thta specifications rewiting it
completely. Two advantages: it will be 32 bit code, and the dependency
from external source will be lost.
Probably, debugging new code will be more or less as hard as debugging
thunking code.
Or you may search sourceforge or other open source sites to see if
there is any opne librarythat fits your needs.
Best regrads
Zara
Thanks Zara for your reply.
Darko Miletic
2007-08-18 17:37:55 UTC
Permalink
Post by Linzy
Post by Darko Miletic
As an alternative you can write 16-bit OCX that wraps that dll. You
can call 16-bit COM interfaces from 32-bit code with no problems.
Darko
Hi,
Thanks for your reply !!
I read that article in the link you provided. They are saying that
only Generic Thunk is possible in Windows XP. But in my case the Flat
Thunk is needed to call a 16-bit DLL function in Win32 Application.
What can I do now? Is there any other way to solve this (Other than
THUNK)? Please do reply if you have any idea to solve.
Am struck with this for more than 20 days.
You did not read my message completely. I did say this:

"As an alternative you can write 16-bit OCX that wraps that dll. You
can call 16-bit COM interfaces from 32-bit code with no problems."

So using Borland c++ you write 16-bit OCX that exports methods
identical to the one's in dll as an interface.

you can than use that interface in your 32-bit app.

Linzy
2007-08-11 07:33:26 UTC
Permalink
Post by Zara
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
Thanks in adv.
And the question is ....?
About Exception Handling in BC++ 5.02, Thread Error is poping up when
I tried using the XMSG class in my Win32 application.

How to resolve the thread error. I checked my code, it has no problem.
Am struck with this thread error..
Help me out in the case...

Thanks
Linzy
Zara
2007-08-13 05:23:02 UTC
Permalink
Post by Linzy
Post by Zara
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
Thanks in adv.
And the question is ....?
About Exception Handling in BC++ 5.02, Thread Error is poping up when
I tried using the XMSG class in my Win32 application.
How to resolve the thread error. I checked my code, it has no problem.
Am struck with this thread error..
Help me out in the case...
Thanks
Linzy
Have you specified your application is multithreaded?

Anycase, I don´t know anything about XMSG class, I may be not of any
help in thata matter... sorry

Regards
Linzy
2007-08-13 07:25:25 UTC
Permalink
Post by Zara
Post by Linzy
Post by Zara
Post by Linzy
Hi Guys,
Is there anyone using Borland C++ 5.02. I am having a doubt on
Exception Handling in C++.
If anyone has good knowledge in that means, please do reply.
Thanks in adv.
And the question is ....?
About Exception Handling in BC++ 5.02, Thread Error is poping up when
I tried using the XMSG class in my Win32 application.
How to resolve the thread error. I checked my code, it has no problem.
Am struck with this thread error..
Help me out in the case...
Thanks
Linzy
Have you specified your application is multithreaded?
Anycase, I don�t know anything about XMSG class, I may be not of any
help in thata matter... sorry
Regards- Hide quoted text -
- Show quoted text -
About XMSG, its a built in class which is used to handle exceptions in
Borland C++.
You can search BC++ help for more details.

And also I found the solution for that error. That was a Bug in BC++
5.02.

--
Linzy
Loading...