RE: [xml] Creating Win32 wrapper function for exported variables

On Tue, Jul 17, 2001 at 10:46:21AM -0600, Vakoc, Mark wrote:
I'll have those in a few days.  The scope is a little larger than I
originally thought (such as xmlChar* xmlParserVersion) so I don't want
miss any.

  those are read-only (and marked const in CVS), so no need to worry
about them.

Actually, I will.  This applies to reading or writing to variables.  For
example, if you
link against the C runtime as a .dll, errno gets mapped to a function since
the actual variable 
(int errno) is stored within the c runtime .dll.  If you staticly link to
the c runtime (the c runtime code is 
dumped into your program), then it can simply use 'extern int errno;'

-- From the c runtime --
#if (defined (_MT) || defined (_DLL)) && !defined (_MAC)
_CRTIMP extern int * __cdecl _errno(void);
#define errno   (*_errno())
#else  /* (defined (_MT) || defined (_DLL)) && !defined (_MAC) */
_CRTIMP extern int errno;
#endif  /* (defined (_MT) || defined (_DLL)) && !defined (_MAC) */

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]