Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / winsock2.h and DarkGDK.h

Author
Message
Karsten
17
Years of Service
User Offline
Joined: 24th Jan 2007
Location: N/A
Posted: 31st Aug 2008 05:26 Edited at: 31st Aug 2008 05:31
Hello,

Whilst working on a project for the Microsoft Imagine Cup, my friends and I came across a problem.
I coded up a lovely winsock wrapper which uses winsock2.h. This works fine on my test usage app but when added to the DarkGDK project it errored like hell.
Long story short.. DarkGDK references windows.h somewhere and as you know... those people at microsoft use windows.h as a stupid meta header that happens to have winsock.h (old) in it. This causes a lot of redefinition errors because Microsoft also forgot to add namespaces or even prefixes!!
I fixed the errors by changing windows.h but that is one messy workaround. I know there is a magic guard that can be put around the windows.h include to prevent this but that obviously has been missed off in the DarkSDK source code.
Could anyone point me in a direction of a fix for this?

Sorry about the large block of text!

Karsten

Karsten
17
Years of Service
User Offline
Joined: 24th Jan 2007
Location: N/A
Posted: 31st Aug 2008 05:40
lol, I got half way round cracking the University computers admin password when I realized I can simply add the modified windows.h into the DarkGDK include directory on my pen drive!

Man, I can be really dense when I want to be

I was going to go round to every computer in the uni and add that modified header file into the windows sdk include folder haha

sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 31st Aug 2008 14:08
Quote: "I coded up a lovely winsock wrapper which uses winsock2.h."


I hope you will make your work available to the members of this forum.
There are many of us who are interested in this area.
Karsten
17
Years of Service
User Offline
Joined: 24th Jan 2007
Location: N/A
Posted: 31st Aug 2008 19:00
Hello,

Thank you for your interest, I certainly can release it if you would like. When I have tested it more with our project I will release it as XSocket on these forums.

It will most likely be in the form of XSocket.h and XSocket.cpp

regards,
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 1st Sep 2008 03:30
Thanks for that, and that format would also make it easy for others to use and experiment with.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 2nd Sep 2008 23:17


These headers work for me with DarkGDK. Looks like we're getting a surge in networking libraries .

Login to post a reply

Server time is: 2024-09-30 05:23:47
Your offset time is: 2024-09-30 05:23:47