Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #644

Re: Borlands Tasm5 and data in a DLL

From Ross Ridge <rridge@csclub.uwaterloo.ca>
Newsgroups comp.os.msdos.programmer
Subject Re: Borlands Tasm5 and data in a DLL
Date 2012-06-14 11:55 -0400
Organization University of Waterloo
Message-ID <jrd1i5$1od$1@rumours.uwaterloo.ca> (permalink)
References <4fd6504d$0$6942$e4fe514c@news2.news.xs4all.nl> <4fd850e9$0$6844$e4fe514c@news2.news.xs4all.nl> <jrah5p$die$1@rumours.uwaterloo.ca> <4fd992c5$0$6850$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


R.Wieser <address@not.available> wrote:
>Getting my hands on a true pointer does appeal to me (maybe I can even drop
>the "MyData" label and only keep the "__imp_MyData" one ?), so how do you
>define the data (in the DLL) so that it generates both those labels ?

With Microsoft's tool (or the GNU tools) the __imp_MyData labels are
generated automatically in the import libraries that you use link into
your library.  (They don't exist in the DLLs themselves though.)

It looks like Borland's tools do it differently, and don't generate the
__imp_ labels.  It handles code import differently from data imports.
When importing data the variable in the import table gets called "MyData".

>And if it matters, I'm extracting the library from the DLL using, ofcourse,
>Borlands "ImpLib".

This might be the problem.  I don't think the implib utility can tell the
difference between data and code being exported from a DLL so generates
only code imports.  Try using the import library created by the linker
with the -Gi flag instead.  Then just use the MyData label with only
one level indirection:

	mov	eax,[MyData]
	mov	eax,[eax]

					Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge@csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //	  

Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Borlands Tasm5 and data in a DLL "R.Wieser" <address@not.available> - 2012-06-11 22:10 +0200
  Re: Borlands Tasm5 and data in a DLL JJ <jaejunks_at@_googlemail_dot._com> - 2012-06-12 16:54 +0000
    Re: Borlands Tasm5 and data in a DLL "R.Wieser" <address@not.available> - 2012-06-12 19:54 +0200
      Re: Borlands Tasm5 and data in a DLL JJ <jaejunks_at@_googlemail_dot._com> - 2012-06-13 00:14 +0000
        Re: Borlands Tasm5 and data in a DLL "R.Wieser" <address@not.available> - 2012-06-13 10:54 +0200
  Re: Borlands Tasm5 and data in a DLL JJ <jaejunks_at@_googlemail_dot._com> - 2012-06-12 16:57 +0000
  Re: Borlands Tasm5 and data in a DLL Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-06-12 18:54 -0400
    Re: Borlands Tasm5 and data in a DLL "R.Wieser" <address@not.available> - 2012-06-13 10:37 +0200
      Re: Borlands Tasm5 and data in a DLL Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-06-13 13:03 -0400
        Re: Borlands Tasm5 and data in a DLL "R.Wieser" <address@not.available> - 2012-06-14 09:30 +0200
          Re: Borlands Tasm5 and data in a DLL Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-06-14 11:55 -0400
            Re: Borlands Tasm5 and data in a DLL "R.Wieser" <address@not.available> - 2012-06-14 21:49 +0200
              Re: Borlands Tasm5 and data in a DLL Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-06-14 16:21 -0400
                Re: Borlands Tasm5 and data in a DLL "R.Wieser" <address@not.available> - 2012-06-15 12:18 +0200
                Re: Borlands Tasm5 and data in a DLL rugxulo@gmail.com - 2012-06-19 18:27 -0700

csiph-web