nmurrayr@cc.curtin.edu.au (Ron Murray) (05/20/91)
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
===============================================================================