It is currently Sat Aug 24, 2019 1:28 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: DirectPlay Networking (with sources)
PostPosted: Tue Aug 15, 2006 10:47 pm 
Offline
User
User
User avatar

Joined: Fri Feb 27, 2004 9:19 pm
Posts: 77
Location: SP - Brazil
Howdy...

Some time ago we have made a DirectPlay wrapper DLL using PureBasic. This DLL covers almost all features of DirectPlay, has full documentation in CHM format for its usage and command set, besides sample applications in some of the most common programming languages around.

We are now making it a free product and opening the sources for the community in the hope that they will be useful. So, you're free to use the library, portions of the source, or even the entire source in your commercial (or non commercial) applications, free of charge and royalty-free.

There are two versions of the source in the package (which you can download through the link at the end of this message): One is the stable version made with PB 3.94, and the other is a beta version for PB 4.

The version compiled with PB 3.94 has proved to be fully stable on all tested systems. The version compiled with PB 4.0, though, is not working so well. It has a knwon problem which arises when the library is stressed under multi-processor machines (including P4 HT).

We have faced a problem like this one when building the library with PB 3.94, which was caused by non-safe string allocations in multi-threading while working under stress on multi-processor machines. At that time, this problem was easily solved by enclosing thread string allocations inside Critical Section blocks.

When porting the code for PB 4.0 we kept all thread-safe measures, but it seems that something has changed from PB 3.94 to PB 4.0 which is now impairing the library to work properly. We have added an error handler to the 4.0 code so we could try to follow the error, but it is not pointing to a single line of code. Sometimes it happens on a 'procedure return' statement, while others it happens when the code tries to access some of the DirectPlay Objects methods.

We will keep trying to find the problem with our code for PB 4.0 in our spare time, but we would appreciate if some of you could also give it a try. The sources are well documented, and if for nothing else, they could be used as a source of research material for how to use COM in PB, how to code using interfaces, and how to handle thread safe applications.

Note: Most of the commenting scheme used on the sources will be best viewed using jaPBe instead of the official PB IDE.

best wishes...

Sources for the library:
http://www.krylarskreations.com/downloads/KNL_OpenSource.zip

Official web page:
http://www.krylarskreations.com/knl.shtml

Derlidio "PJoe" Siqueira
derlidio@1338inc.com
1338 Enterprises Inc.[/url]


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 15, 2006 11:05 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 03, 2005 1:31 am
Posts: 573
Location: Australia
Thanks very much - this ought to be interesting!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 15, 2006 11:06 pm 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 8004
Location: Fort Nelson, BC, Canada
This is really great, thanks a million!

_________________
Veni, vidi, vici.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 15, 2006 11:41 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 22, 2004 4:12 pm
Posts: 2446
Location: Norway
Nice! :D

_________________
I like logic, hence I dislike humans but love computers.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 16, 2006 12:27 am 
Offline
Addict
Addict
User avatar

Joined: Wed Oct 15, 2003 12:40 am
Posts: 1126
Location: Sweden
Incredible work! :shock: Respect! Thank you!!!

_________________
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 16, 2006 12:36 am 
Offline
Addict
Addict

Joined: Mon May 29, 2006 1:01 am
Posts: 1965
Location: Outback
techjunkie wrote:
Incredible work! :shock: Respect! Thank you!!!


Yes. I agree. Thanks.

_________________
Dare2 cut down to size


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 16, 2006 3:09 am 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 30, 2003 11:19 pm
Posts: 1808
Location: Emerald Cove, Unformed
Quick question, was this tested with the threadsafe compiler switch turned off?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 16, 2006 3:17 am 
Offline
User
User
User avatar

Joined: Fri Feb 27, 2004 9:19 pm
Posts: 77
Location: SP - Brazil
@Shannara

Yeap... This has been tested with both, on and off (on PB4 code only, cos the 3.94 version doesn't need any other safety measures besides those already in the code). Actually, with the thread safe compiling turned on the code breaks even faster.

_________________
Derlidio Siqueira


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 19, 2006 4:50 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Jun 11, 2003 9:33 pm
Posts: 4573
Location: Spa, relaxing and thinking, and learning...
:shock: Useful
Thanks a lot!

_________________
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 19, 2006 8:15 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 16, 2003 8:30 pm
Posts: 1998
Location: North Florida
dude.. that's some tight stuff..

- np


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 19, 2006 9:03 pm 
Offline
Always Here
Always Here
User avatar

Joined: Sat Aug 30, 2003 5:58 pm
Posts: 5883
Location: Denmark
Very interesting!
I already have a few ideas of what i could use this to :)

thanks!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye