If i use #include <winsock2.h> in my project driver and I
Build it under the build environment ! I get conflict with the< winbase.h>
and a legion of redifinition or unknow errors !

Help needed !
Thanks !

Re: conflict with Winsock2.h by Walter

Walter
Fri Dec 12 07:27:42 CST 2003

Arthur wrote:
> If i use #include <winsock2.h> in my project driver and I
> Build it under the build environment ! I get conflict with the< winbase.h>
> and a legion of redifinition or unknow errors !

Well, stop doing that.

Seriously, what's in this user-mode header that you want to use in a
kernel-mode driver?

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

Re: conflict with Winsock2.h by anonymous

anonymous
Fri Dec 12 10:46:10 CST 2003


Nothing really important in fact I just want use the ntohl() func for network byte order !

Thanks !

Re: conflict with Winsock2.h by Don

Don
Fri Dec 12 10:47:30 CST 2003

Use the RtlUlongByteSwap, RtlUlonglongByteSwap and RtlUshortByteSwap to
roll your own.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"Arthur" <anonymous@discussions.microsoft.com> wrote in message
news:B00EBD28-00C6-4285-9D29-A2EEEB49029A@microsoft.com...
>
> Nothing really important in fact I just want use the ntohl() func for
network byte order !
>
> Thanks !



Re: conflict with Winsock2.h by anonymous

anonymous
Sat Dec 13 03:21:05 CST 2003

Thanks for your help



Re: conflict with Winsock2.h by Maxim

Maxim
Sat Dec 13 04:05:21 CST 2003

> If i use #include <winsock2.h> in my project driver and I
> Build it under the build environment ! I get conflict with the< winbase.h>
> and a legion of redifinition or unknow errors !

It is some strange thing. I also observed the same, but I have the user-mode
code (buildable by w2k DDK BUILD) which is free from this problem.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: conflict with Winsock2.h by Arkady

Arkady
Sat Dec 13 11:16:51 CST 2003

That function of defines : WIN32_LEAN_AND_MEAN and _WIN32_WINNT.
Arkady

"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:OEo2rAWwDHA.2408@tk2msftngp13.phx.gbl...
> > If i use #include <winsock2.h> in my project driver and I
> > Build it under the build environment ! I get conflict with the<
winbase.h>
> > and a legion of redifinition or unknow errors !
>
> It is some strange thing. I also observed the same, but I have the
user-mode
> code (buildable by w2k DDK BUILD) which is free from this problem.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>



Re: conflict with Winsock2.h by Maxim

Maxim
Sat Dec 13 18:14:51 CST 2003

Yes.
The second is set by BUILD, and not set if running CL from the command
line.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


"Arkady Frenkel" <arkadyf@hotmailxdotxcom> wrote in message
news:OY0kExZwDHA.2148@TK2MSFTNGP12.phx.gbl...
> That function of defines : WIN32_LEAN_AND_MEAN and _WIN32_WINNT.
> Arkady
>
> "Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
> news:OEo2rAWwDHA.2408@tk2msftngp13.phx.gbl...
> > > If i use #include <winsock2.h> in my project driver and I
> > > Build it under the build environment ! I get conflict with the<
> winbase.h>
> > > and a legion of redifinition or unknow errors !
> >
> > It is some strange thing. I also observed the same, but I have the
> user-mode
> > code (buildable by w2k DDK BUILD) which is free from this problem.
> >
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > maxim@storagecraft.com
> > http://www.storagecraft.com
> >
> >
>
>