delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/29/08:34:09

From: gunther DOT ebert AT ixos-leipzig DOT de (Gunther Ebert)
Subject: Re: WINAPI definition
29 Oct 1997 08:34:09 -0800 :
Message-ID: <3456E3BD.120A.cygnus.gnu-win32@ixos-leipzig.de>
References: <3 DOT 0 DOT 2 DOT 32 DOT 19971029001741 DOT 006a1a9c AT messagebox DOT com>
Mime-Version: 1.0
To: Thomas Nichols <thomas DOT nichols AT mail DOT com>
Cc: gnu-win32 AT cygnus DOT com

Thomas Nichols wrote:
> 
> Thanks to everyone who's offered suggestions so far - much appreciated.
> I've resolved the "cannot execute binary file" problem, it doesn't happen
> under win95b command.com, only under 4DOS (v6). Very odd.
> 
> Now a new question: I'm trying to get existing (third-party) Win32 source
> to compile, and the following line breaks:
> 
>         static BOOL (WINAPI *Ctl3dRegister)(HINSTANCE);

Change it to

static BOOL WINAPI (*Ctl3dRegister)(HINSTANCE);

I've just checked it, this makes cc1plus happy and cc1plus will
generate the proper code to call a _stdcall function (it doesn't
clean up the parameter stack).

By the way, cc1plus doesn't like any character between the return
type and the stdcall modifier. In other words, if you have a 
function which returns a pointer your function pointer declaration
must be

void WINAPI *(*foo)(params);

(not 'void * WINAPI (*foo)(params);')

Gunther


-- 

Gunther Ebert
iXOS Anwendungs-Software GmbH
Angerstrasse 40-42
D-04177 Leipzig

Phone : +49 341 48503-0
Fax   : +49 341 48503-99
E-mail: mailto:gunther DOT ebert AT ixos-leipzig DOT de
www   : http://www.ixos-leipzig.de
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019