Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!uniwa!cc.curtin.edu.au!nmurrayr From: nmurrayr@cc.curtin.edu.au (Ron Murray) Newsgroups: comp.lang.c++ Subject: MakeProcInstance and BC++ Message-ID: <1991May20.135704.8274@cc.curtin.edu.au> Date: 20 May 91 05:57:03 GMT Organization: Curtin University of Technology Lines: 27 We seem to have found a problem with MakeProcInstance and BC++ when compiling Windows programs. According to Petzold, the call should be: lpfnRhubarbProc = MakeProcInstance(RhubarbProc, hInstance); This compiles fine as a C program (most of the time). (RhubarbProc is defined as BOOL FAR PASCAL, let us say). When we try and compile it as C++, however, we get type mismatch errors which only go away if we say: lpfnRhubarbProc = MakeProcInstance((FARPROC) RhubarbProc, hInstance); One would suspect that the compiler should know that it wants a far pointer (after all, isn't that the point [pun intended] of having function prototypes? .....Ron -- =============================================================================== Internet: Murray_RJ@cc.curtin.edu.au | "The Universe is so Bitnet: Murray_RJ%cc.curtin.edu.au@cunyvm.bitnet | utterly disorganised UUCP : uunet!munnari.oz!cc.curtin.edu.au!Murray_RJ | that it can only have Amateur Packet Radio: VK6ZJM@VK6BBS.#WA.AUS.OC | been written in Pascal" TCP/IP: 44.136.204.14, 44.136.204.19 | -- The Phantom Waffler ===============================================================================