Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com X-Authentication-Warning: hp2.xraylith.wisc.edu: khan owned process doing -bs Date: Sat, 17 Jul 1999 17:08:31 -0500 (CDT) From: Mumit Khan To: PositivePi AT aol DOT com cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: @at and a/w notations In-Reply-To: <9cf0cd1e.24c153a7@aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 16 Jul 1999 PositivePi AT aol DOT com wrote: > This is probably something that I'm supposed to know, but... What is the > purpose of the @at and A/W notations in function names in .def's? > For example, wsock32.def: > EXPORTS [ ... ] > GetNameByTypeA AT 12 > GetNameByTypeW AT 12 > 1) What does the @12 do? If you remove it and create a new library without > it, it will not link. What adds this notation? I don't see anything in the > Windows32/Sockets.h header file that would change socket to socket AT 12. Also, > if I'm creating my own .def's, how do I figure out what the value to put > after the @ is? Please visit MS site and look at the documentation there that explains all of this and more. Basically, this is what MS calls "stdcall" (aka WINAPI) calling convention, where the number of bytes in the parameter list are appended with a @ after the function name. For example, given the following declaration: extern int foo (int, int); any use of `foo' will resolve to foo AT 8, not just foo as you would expect. > 2) Why do some functions (but not all) have a pair with the A and W suffixes, > even though theres only one function? What adds this? If I'm writing my own > .def's, how do I know which functions need this? It's MS's way of choosing Unicode vs ASCII version of functions at compile time. Please ask followup questions on a generic win32 newsgroup, where these are discussed. comp.os.ms-windows.programmer.win32 is such a place, and comp.os.ms-windows.programmer.misc is probably another one. There are FAQ's and such there. Let's use those resources. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com