T.R | Title | User | Personal Name | Date | Lines |
---|
3182.1 | why are you defining _WIN32_WINNT? | VAXCPU::michaud | Jeff Michaud - ObjectBroker | Wed Feb 05 1997 07:47 | 7 |
| I've always been told you should include windows.h before you
include anything else. Hence your program as coded is
broken.
I also question why you are defining that preprocessor
symbol that begins with an _, which is reserved for internal
use by the implementation.
|
3182.2 | | NEWVAX::LAURENT | Hal Laurent @ COP | Wed Feb 05 1997 08:07 | 15 |
| re: .1
> I also question why you are defining that preprocessor
> symbol that begins with an _, which is reserved for internal
> use by the implementation.
Some of the newer functions (CreateWaitableTimer is one I've run into)
have the definitions in the header files surrounded by
#if _WIN32_WINNT > 0x400
(or something like that), but the symbol isn't defined by the Developer
Studio environment.
-Hal Laurent
|
3182.3 | It's the NT WIN32 API version | DECWET::MVB | Monty VanderBilt | Wed Feb 05 1997 10:57 | 6 |
| _WIN32_WINNT is the version key for the NT WIN32 API. 0400 refers to NT 4.0.
0500 will be 5.0. It's not in your environment because I believe it's
some kind of built in definition based on the machine you are on
(that's a guess). I would not try to force this definition because of
interacting dependencies between it and other components (for example,
the version of DCOM, which is a separate define).
|
3182.4 | | NEWVAX::LAURENT | Hal Laurent @ COP | Wed Feb 05 1997 11:19 | 14 |
| re: .3
>_WIN32_WINNT is the version key for the NT WIN32 API. 0400 refers to NT 4.0.
>0500 will be 5.0. It's not in your environment because I believe it's
>some kind of built in definition based on the machine you are on
>(that's a guess). I would not try to force this definition because of
>interacting dependencies between it and other components (for example,
>the version of DCOM, which is a separate define).
I have VC++ V4.2 installed on a box running NT Workstation V4.0 and
_WIN32_WINNT is definitely not defined. When I define it manually the
routines in question work just like they're supposed to.
-Hal Laurent
|
3182.5 | | PAMSRC::XHOST::SJZ | Rocking the Messaging Desktop ! | Wed Feb 05 1997 13:16 | 29 |
|
i just defined it for the example. it is actually defined
when you include win32.mak in your makefile and you set
your TARGETOS to WINNT. the definition of _WIN32_WINNT as
0x0400 is what causes windows.h to choose winsock2.h in-
stead of winsock.h.
The reason this came up is that I am trying to switch from
winsock to winsock2. Specifically I am trying to build an
application for NT V3.51, so I can't use VC++ V4.2. The
windows.h for VC++ V4.1 does not know from winsock2 (which
i am getting from the PATHWORKS 32 distribution). In or-
der to get that to work you have to include winsock2.h be-
fore windows.h. winsock2.h defeats inclusion of winsock.h.
if you include windows.h first and then winsock2, you get
duplicate definitions because windows.h has already includ-
ed winsock.h. Only problem is if you include winsock2.h
before windows.h it doesn't compile using VC++ V4.2. it
does compile if you include windows.h first. In otherwords,
on one version you have to have A before B and on the next
you need B before A.
I was getting absolutely nowhere with my questions in the
PATHWORKS32 so I thought I would try here (since winsock2
isn't necessarily pathworks specific). Maybe the answer
is if you want winsock2 you need to use the latest great-
est version of the WIN32 SDK - period.
_sjz.
|