The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ToutEnMasm on July 06, 2006, 04:50:49 PM

Title: is it possible to use a dword in a library
Post by: ToutEnMasm on July 06, 2006, 04:50:49 PM
Hello,
I have put a dword on a library and i want to use it from the source code.
I declare it PUBLIC in the library,but it's don't work.
                                       ToutEnMasm
Title: Re: is it possible to use a dword in a library
Post by: Casper on July 06, 2006, 05:00:46 PM
You are going to have to explain this in more detail or post the source.  Your words are very confusing to me.

Casper
Title: Re: is it possible to use a dword in a library
Post by: Ossa on July 06, 2006, 05:27:03 PM
I always use EXTERNDEF in both, but if you already have it public, just use EXTERNDEF in the file you want to use it from.

Library code:

EXTERNDEF blah:DWORD

blah dd ?


Module code:

EXTERNDEF blah:DWORD

QuoteSyntax:   EXTERNDEF [langtype] name:qualifiedtype [, [langtype] name:qualifiedtype]...


  • If <name> is used in the current module but is not defined, <name> is made external.
  • If <name> is defined in the current module, it is made PUBLIC.
  • If <name> is neither used nor defined, the directive is ignored.

Ossa