This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Reusing socket programming for Win32/PocketPC


Reusing socket programming for Win32/PocketPC

Postby Staryon » May 20, 2007 @ 11:17pm

Hi,

I am writing a 2D Space shooting game using Visual C++ and the Gapidraw library. My IDE is VS2005.

My idea for this game is to be compatible with Windows and Pocket PC devices.

So far everything is going perfect. Now I would like to add some code that uploads high scores to a database. I need to write a basic TCP/IP client connection but I'm not sure how to make it compatible with both systems.

Is that possible or I need to have a different code for each one?

Thanks
Staryon
pm Member
 
Posts: 33
Joined: Nov 4, 2006 @ 12:05am


Postby Dan East » May 21, 2007 @ 12:16am

Just use the standard Berkeley socket API. Besides a unicode conversion here or there, the same code will build right up for both platforms.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Presto » May 21, 2007 @ 2:30pm

Here are a bunch of examples:
http://www.sockaddr.com/ExampleSourceCode.html

One thing I noticed is that for the desktop you link using wsock32.lib, but for WM using winsock.lib. Your code doesn't change at all though.

-John
User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby mm40 » May 21, 2007 @ 3:06pm

User avatar
mm40
pm Member
 
Posts: 135
Joined: Feb 21, 2003 @ 9:11pm


Postby Staryon » May 21, 2007 @ 3:32pm

Staryon
pm Member
 
Posts: 33
Joined: Nov 4, 2006 @ 12:05am


Postby Staryon » May 21, 2007 @ 3:58pm

Staryon
pm Member
 
Posts: 33
Joined: Nov 4, 2006 @ 12:05am


Postby mm40 » May 21, 2007 @ 5:54pm

User avatar
mm40
pm Member
 
Posts: 135
Joined: Feb 21, 2003 @ 9:11pm


Postby Staryon » May 21, 2007 @ 7:33pm

Staryon
pm Member
 
Posts: 33
Joined: Nov 4, 2006 @ 12:05am


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron