🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TryEnterCriticalSection problem

#12576
From: Shon
Date: Fri, 28 Nov 2003 09:40
46 lines
2323 bytes
OK. Figured out.

in MSDN:

"To compile an application that uses this function, define the
_WIN32_WINNT macro as 0x0400 or later. For more information, see Using
the SDK Headers"

Thanks and sory for stupid question.

"Shon" <Sebastian.Choromanski@%N%O%inteligo%S%P%A%M%.pl> wrote in
message news:3fc71650@newsgroups.borland.com...
| 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: <3fc7181f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3fc71650@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7905d8d965e5c881
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-28 02:01:00 PST
From: "Shon" <Sebastian.Choromanski@%N%O%inteligo%S%P%A%M%.pl>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fc71650@newsgroups.borland.com>
Subject: Re: TryEnterCriticalSection problem
Date: Fri, 28 Nov 2003 10:40:42 +0100
Lines: 47
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: <3fc7181f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070012447 193.109.225.252 (28 Nov 2003 01:40:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail