🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TryEnterCriticalSection problem

#12574
From: Shon
Date: Fri, 28 Nov 2003 09:32
33 lines
1833 bytes
My winbase.h header contains:

#if(_WIN32_WINNT >= 0x0400)
WINBASEAPI
BOOL
WINAPI
TryEnterCriticalSection(
    IN OUT LPCRITICAL_SECTION lpCriticalSection
    );
#endif /* _WIN32_WINNT >= 0x0400 */

My platform is windows 2000 Prof, BCB 5.0.

Why can't I use TryEnterCriticalSection ('undefined identifier' so
_WIN32_WINNT is not declared or < 0x0400)?

MSDN says:

Requirements:
Client: Included in Windows  XP, Windows  2000 Professional, and
Windows  NT Workstation 4.0.
Server: Included in Windows Server  2003, Windows  2000 Server, and
Windows  NT Server 4.0.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.

What is wrong, how can I use this API call?

-- 

([-: May The Force Be With You! :-])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shon
Technical Details
Message-ID: <3fc71650@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7905d8d965e5c881,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-28 01:39:09 PST
From: "Shon" <Sebastian.Choromanski@%N%O%inteligo%S%P%A%M%.pl>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: TryEnterCriticalSection problem
Date: Fri, 28 Nov 2003 10:32:58 +0100
Lines: 34
Organization: Inteligo Financial Services S.A.
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 193.109.225.252
Message-ID: <3fc71650@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070011984 193.109.225.252 (28 Nov 2003 01:33:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail