🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1298

Re: Portability and re-defining datatypes

#1298
From: Remy Lebeau (TeamB)
Date: Thu, 13 Sep 2007 00:08
28 lines
1762 bytes
"Mike Collins" <its@TheBottomOfThePost> wrote in message
news:46e87087@newsgroups.borland.com...

> Actually, on careful examination, it appears to only be the
> BOOLEAN value that effect the system, leaving the orginal
> prototype as it is, and changing this to a DWORD, makes
> the whole system work.

BOOLEAN is defined in wtypes.h as follows:

    typedef boolean BOOLEAN;

However, 'boolean' is not a native data type.  It is a typedef in rpcndr.h:

    typedef unsigned char boolean;

Microsoft usually uses BOOL (in wtypes.h) instead of BOOLEAN for API
functions, though:

    typedef long BOOL;

So I'm assuming that since sizeof(BOOLEAN) is not the same as sizeof(BOOL),
the use of BOOLEAN instead of BOOL is probably throwing off the alignment of
the stack parameters, causing the error.


Gambit
Technical Details
Message-ID: <46e87f99$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46e86d1d@newsgroups.borland.com> <46e87087@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e50dbaba0bc077bb
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46e86d1d@newsgroups.borland.com> <46e87087@newsgroups.borland.com>
Subject: Re: Portability and re-defining datatypes
Date: Wed, 12 Sep 2007 17:08:04 -0700
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.29.61
Message-ID: <46e87f99$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1189642137 75.83.29.61 (12 Sep 2007 17:08:57 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail