What is "Friend entries"?
Converting a VC++ DLL to BCW
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > C/C++ Programming > Converting a VC++ DLL to BCW 28 December 2004 22:14:58

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Converting a VC++ DLL to BCW

Wilbur 28 December 2004 22:14:58
 
I have an 8KB VC++ DLL to convert to a Borland C++ library.
I've tried the recommended IMPDEF/IMPLIB conversion. With
IMPDEF I get only one symblo (which I edited as required).
With IMPLIB I get a 1KB library that does not work (externals
can't be found by the linker). Help!
Add comment
Ed Mulroy 28 December 2004 18:01:29 permanent link ]
 If the DLL exports any C++ items that are classes or
functions that accept arguments that are classes,
pointers to classes or references to classes then
you cannot use those items in the DLL. Microsoft
uses a different memory layout in their classes, a
layout that is different from what Borland uses.

If you have the DLL then you should have a header file
that provides function prototypes for the items exported
by the DLL. Therefore you already know the source
code names for the functions with their calling argument
list and calling conventions.

While the format used by Microsoft's tools in creating
a DLL has evolved with time the tools you are using are
from BC++ whose last edition was in early 1997. They
may not find everything in that DLL.

Try this:

Give a command like the one below and then manually edit
the file containing the redirected output, inserting aliases for
the functions shown into a module definition file. Afterwards
add the module definition file to the project.

tdump -m c:\windows\system\m­svcr71.dll >x.txt

. Ed
Wilbur wrote in message> news:41d154b4$1@new­sgroups.borland.com.­..>
I have an 8KB VC++ DLL to convert to a Borland C++> library. I've tried the recommended IMPDEF/IMPLIB> conversion. With IMPDEF I get only one symblo> (which I edited as required). With IMPLIB I get a 1KB> library that does not work (externals can't be found by> the linker). Help!
Add comment
Wilbur 28 December 2004 22:03:37 permanent link ]
 
Hi Ed,

I ran the Turbo Dump command as suggested and now I
have the text file, the header file, the DLL, and
a single symbol DEF file that I made in the past
(using IMPDEF). But, I can not see any relationship
between the text (dump) file nad the header file, so
I have no idea what to add to the DEF file.

Is there an FTP site where I could send it so you could
take a look at it?

PS: I also have BCB V5.x if that would help. (I
usually prefer to use BCW when I working on a console
program.)

Thanks for your help,
Wilbur

===================­====================­==================

"Ed Mulroy [TeamB]" <dont_email_me@bitb­uc.ket> wrote:>If the DLL exports any C++ items that are classes or>functions that accept arguments that are classes,>pointers to classes or references to classes then>you cannot use those items in the DLL. Microsoft>uses a different memory layout in their classes, a>layout that is different from what Borland uses.>
If you have the DLL then you should have a header file>that provides function prototypes for the items exported>by the DLL. Therefore you already know the source>code names for the functions with their calling argument>list and calling conventions.>
While the format used by Microsoft's tools in creating>a DLL has evolved with time the tools you are using are>from BC++ whose last edition was in early 1997. They>may not find everything in that DLL.>
Try this:>
Give a command like the one below and then manually edit>the file containing the redirected output, inserting aliases for>the functions shown into a module definition file. Afterwards>add the module definition file to the project.>
tdump -m c:\windows\system\m­svcr71.dll >x.txt>
. Ed>
Wilbur wrote in message>> news:41d154b4$1@new­sgroups.borland.com.­..>>
I have an 8KB VC++ DLL to convert to a Borland C++>> library. I've tried the recommended IMPDEF/IMPLIB>> conversion. With IMPDEF I get only one symblo>> (which I edited as required). With IMPLIB I get a 1KB>> library that does not work (externals can't be found by>> the linker). Help!>
Add comment
Bruce Salzman 28 December 2004 22:11:47 permanent link ]
 
Is there an FTP site where I could send it so you could> take a look at it?>

There is a borland.public.atta­chments group for such things.

Regards,
Bruce
Add comment
Ed Mulroy 28 December 2004 22:14:58 permanent link ]
 
...But, I can not see any relationship> between the text (dump) file nad the header file, ...

You can do a case-insensitive search in the dumped file for symbols which
appear in the header file. That will determine the actual public names used
for the symbols, the names used as the right-hand argument in the alias
statements in your DEF file.
... Is there an FTP site where I could send it so you> could take a look at it? ...

My FTP site requires a user name and password. It does not support
anonymous uploading. However I can take a zip file in email
ed at mulroy dot org
... I also have BCB V5.x if that would help. (I> usually prefer to use BCW when I working on> a console program.)

I usually use the command line tools from BCB to work on programs, be they
GUI or console. Those tools have the same names and, except for features
that have been added since, they work in the same way that the tools from
BC++ do. In your case the most likely source of the problem is that of
using impdef and implib from BC++ instead of those from BCB 5 or 6 (as well
as not trying coff2omf.exe from BCB).

. Ed
Wilbur wrote in message> news:41d1ae09$1@new­sgroups.borland.com.­..>
I ran the Turbo Dump command as suggested and now I> have the text file, the header file, the DLL, and> a single symbol DEF file that I made in the past> (using IMPDEF). But, I can not see any relationship> between the text (dump) file nad the header file, so> I have no idea what to add to the DEF file.>
Is there an FTP site where I could send it so you could> take a look at it?>
PS: I also have BCB V5.x if that would help. (I> usually prefer to use BCW when I working on a console> program.)
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > C/C++ Programming > Converting a VC++ DLL to BCW 28 December 2004 22:14:58

see also:
Opinions on Micro$oft .NET
Using $PHP_SELF
using mail()
пройди тесты:
see also:

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .