Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!convex!texsun!letni!rwsys!spudge!johnm From: johnm@spudge.UUCP (John Munsch) Newsgroups: comp.windows.ms.programmer Subject: Re: Borland C++ problem. Message-ID: <28723@spudge.UUCP> Date: 3 Apr 91 22:38:51 GMT References: <149000018@eriador> Reply-To: johnm@spudge.UUCP (John Munsch) Organization: Friends of Guru Bob Lines: 39 In article <149000018@eriador> mguyott@eriador.prime.com writes: >We were using Zortech C++ and were very happy with it >until we attempted to use their int86x() function. This function does not >work and as we absolutly need it for our communications software we >were left with nothing we could do. Why not just fix the int86x() yourself or build a clone of its functionality using Masm? Zortech makes its source available for a reasonable fee and fixing the one function (especially if you know what is going wrong) would not seem so odious to me. I've had to do a lot worse to make projects work in the past. [Stuff Deleted] >The problem is in attempting to call MakeProcInstance(). The compiler >does not seem to recognize the dialog box function name. The compiler >appears not to recognize it despite a function prototype only a >few lines prior. At this point I have no idea how to get the compiler to >do the right thing. > >The error generated is: > Borland C++ Version 2.0 Copyright (c) 1991 Borland International > conndlg.cxx: > > Error conndlg.cxx 28: Type mismatch in parameter 1 in call to > 'MakeProcInstance(int(far pascal*)(),unsigned int)' in function > ConnectDlg::ConnectDlg(unsigned int,unsigned int) Clear cut enough. The compiler has MakeProcInstance() defined as having a FARPROC as it's first parameter, you passed it a reference to a function with a bunch of parameters (while FARPROC is defined as having no parameters). Just typecast the function to a FARPROC and your problems will probably go away. John Munsch "I hope there is a special place in hell reserved for the person or persons who decided that inews should count how many lines of original text I have in this message."