DirectPlay Networking (with sources)

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Derlidio
User
User
Posts: 77
Joined: Fri Feb 27, 2004 9:19 pm
Location: SP - Brazil

DirectPlay Networking (with sources)

Post by Derlidio »

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/downloa ... Source.zip

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

Derlidio "PJoe" Siqueira
derlidio@1338inc.com
1338 Enterprises Inc.[/url]
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

Thanks very much - this ought to be interesting!
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8425
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

This is really great, thanks a million!
BERESHEIT
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Nice! :D
I like logic, hence I dislike humans but love computers.
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

Incredible work! :shock: Respect! Thank you!!!
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

techjunkie wrote:Incredible work! :shock: Respect! Thank you!!!
Yes. I agree. Thanks.
Dare2 cut down to size
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Quick question, was this tested with the threadsafe compiler switch turned off?
User avatar
Derlidio
User
User
Posts: 77
Joined: Fri Feb 27, 2004 9:19 pm
Location: SP - Brazil

Post by Derlidio »

@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
User avatar
Psychophanta
Addict
Addict
Posts: 4968
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Post by Psychophanta »

:shock: Useful
Thanks a lot!
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

dude.. that's some tight stuff..

- np
thefool
Always Here
Always Here
Posts: 5881
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Very interesting!
I already have a few ideas of what i could use this to :)

thanks!
Post Reply