Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!mnemosyne.cs.du.edu!isis.cs.du.edu!cjones From: cjones@isis.cs.du.edu (Charles J. Jones) Newsgroups: comp.windows.ms.programmer Subject: Re: Solution to BC++ Petzold problem, and mild bug report Message-ID: <1991May9.151819.3190@mnemosyne.cs.du.edu> Date: 9 May 91 15:18:19 GMT References: <2828D392.40DD@wilbur.coyote.trw.com> Sender: usenet@mnemosyne.cs.du.edu (netnews admin account) Reply-To: cjones@isis.UUCP (Charles J. Jones) Organization: Nyx, Public Access Unix (sponsored by U. of Denver Math/CS dept.) Lines: 23 Disclaimer1: Nyx is a public access Unix system run by the University of Disclaimer2: Denver for the Denver community. The University has neither Disclaimer3: control over nor responsibility for the opinions of users. In article <2828D392.40DD@wilbur.coyote.trw.com> rich@wiley.uucp (Rich Messenger) writes: >(1) When you are compiling as C++, you *cannot* use the EXPORTS section >in the .DEF file, since the name is mangled by C++ before the linker >ever sees it. This tidbit is not mentioned in the documentation. Sure you can. But you have to change the function definition re: long FAR PASCAL WndProc(HWND hwnd ... becomes extern "C" long FAR PASCAL WndProc(HWND hwnd ... the same as always in C++ when you want ot prohibit the compiler from mangling the name. Charles -- --------------------------------------------------------------------------- Charles J. Jones | If builders built buildings the way programmers cjones@nyx.cs.du.edu | write programs, then the first woodpecker that cjones@copper.denver.colorado.edu | came along would destroy civilization.