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.

DarkBASIC Professional Discussion / Winsock commands please?

Author
Message
cybernetic wraith
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location:
Posted: 8th Sep 2004 03:32
Okay, from what I've read there is no way to use winsock unless you write a C++ DLL. So I'm going to write one. I need to know though, (An example of the C++ dll's code and the DBPro code to call its methods), how would I go about making my Winsock class in the DLL accessable by DBPro.

I'm amazed and appalled by the fact that they left this simple functionality out of DBPro. I have not even purchased DBPro yet because of this. If someone has a DBPro winsock dll or plugin please let me know so I don't have to write this myself.

I have not purchased DBPro yet because of this. Until I can get basic Send(datastring), Receive(datastring), and Connect(ip,port) commands into DB I can't justify purchasing it.

The net command implementation using DirectPlay thats in DBPro will NOT work with what I intend to do so please don't recommend it.

Thanks for any info.
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 8th Sep 2004 03:40
I wish you luck, im itching to get my teeth into some proper networking functions that allow me to set ports, connect, and dont take 17 seconds to initalise like that darn direct play!

I was thinking of writing my own dll, but trying to put it off because I dont want too and would rather someone else did XD I belive exeat is writing a winsock dll but I understand it wont be ready for some time.

Let us know how it goes, i'll keep my eye on this thread

p4 2.4ghz, 768ddr ram, Geforce FX 5200
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 8th Sep 2004 03:47 Edited at: 8th Sep 2004 03:49
Hi cybernetic wraith,

You can still develop plugins with the trial version. I have attached the text of the Third Party Command SDK document from the help files (click the Source button).

To create the DLL, write the code for your class, then you need to create functions which act as a "procedural interface" for your class (as DBPro doesn't support objects).

eg:



You create a stringtable resource for the DLL, and add information about the command to it (see attached document). Place the compiled DLL in the CompilerPlugins-User folder (where you installed DarkBASIC Pro).

The stringtable entry format could be:



To use the command in DBPro:



In this example, DBPro would treat the return value as a normal integer variable which could then be passed to other functions in the DLL. If you want something without the potential for crashing, you could use index numbers ala. DB objects.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th Sep 2004 04:00
Exeat is probably a few days or so away from releasing his Winsock Plugin for DBP. I am not saying dont write your own, but you might wanna see what he has done before going thru it.


DBP_NETLIB_v1.4.3 DarkTOPIA - September 2004
cybernetic wraith
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location:
Posted: 8th Sep 2004 04:36
Okay I'm not in too big of a hurry, I'll just write the server app for my game first since I won't be using DB for that.
Dave J
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 8th Sep 2004 17:13
I should have it ready this weekend, it's Open Source too so feel free to modify/expand on it as much as you like.


"Computers are useless they can only give you answers."
cybernetic wraith
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location:
Posted: 8th Sep 2004 23:44
Awesome.

Login to post a reply

Server time is: 2025-06-09 04:38:56
Your offset time is: 2025-06-09 04:38:56