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.

DLL Talk / Dark Net - Error

Author
Message
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 2nd Sep 2010 04:46
I get this error every example I have run. I tried DBP and VB.Net and they didn't work.

I get this error:


- Is the command that has been giving me problems.

I tried it with the firewall off and it still doesn't work. I have windows 7 32 bit. Everything I need should be installed. VC++ run-times and everything should be there.

Attached is a picture of the error.

Has anyone had any similiar problems when using this plugin?

Thanks

Attachments

Login to view attachments
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 2nd Sep 2010 20:34
Take a look at the documentation for the mn Start command. I think it will clear things up for you.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 3rd Sep 2010 00:26
@KISTech: I did say that that I ran the examples included with Dark Net. I ran all of them and they didn't work. I should be able to get them running on first try.

I have tried this:


It doesn't return anything, but an error message says:


- Returns a 0.

Code Used:


I don't think I have to worry about how the code was used. I would assume it has nothing to do with the code and something to do with my computer.

This means it is an error in the C++ lib "clSocket.cpp". For a runtime error to come up means the creator still has some error catching work to do in the plugin.

Looked up this error code:


This is what the error code means:


I did a little research and found out what the error code means from here:
http://msdn.microsoft.com/en-us/library/ms740668(VS.85).aspx

Someone please get back to me and let me know if they are having similar problems or if this is a bug in the plugin.

Thanks
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 3rd Sep 2010 11:16 Edited at: 3rd Sep 2010 11:24
I am the developer of DarkNet. It is almost definitely not a bug because no-one else has this problem. Enable message box error mode to make this easier. Can you show me some code that you've used and exactly what errors you get (including the line number and all other details). You're right about what the error code means, it happens when binding to a local address, which is odd. I suspect if you fix the parameters or mnStartServer (see below) this problem will go away.

By the way, mnStartServer returns 0 when successful so you don't need to worry about that. If no error message box pops up then everything is working as expected.

Quote: "Result = mn Start Server(0,50,0,0)"

0 isn't a valid UDP mode which is why you get the UDP mode error (see the documentation).

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 3rd Sep 2010 19:20
Quote: "@KISTech: I did say that that I ran the examples included with Dark Net. I ran all of them and they didn't work. I should be able to get them running on first try. "


True. You did. I should really have more coffee before trying to answer questions in here in the morning.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 3rd Sep 2010 19:25 Edited at: 5th Sep 2010 04:02
@Michael P - Well it doesn't work for some reason and I need to figure out why.

This is the code taken from the example:


The Result actually = -1

Code Taken From File Transfer Server:


Check the first post. I have a screenshot of the error.

FYI: Every example give me errors. I even tried the VB .Net Examples. It has to be something related to my computer.

Thanks so much for you help. I was greatly looking forward to this plugin. I want to get this working cuz a major project in .net needs it. ^^
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 3rd Sep 2010 19:32
I think I am being thorough with my question. ^^

Thanks everyone for your help.

@Michael P:

This came from your example and you said:
Quote: "0 isn't a valid UDP mode "


Would suggest fixing this in your future release.

@KISTech - ^^ U earned it.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 5th Sep 2010 12:18
Ah there is nothing wrong with that code, UDP has been disabled so you don't need to set a UDP mode.

I think the problem is that DarkNet is trying to use a local IP that it can't bind to, so you should try telling it to bind to a different interface.

Run this code in DBP and tell me the results. If you see more than one local IP then use mnSetLocal to bind to one of the alternative IPs. Use mnSetLocal before mnConnect or mnStartServer.



DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 5th Sep 2010 22:47
I only get one IP address. Is there a way to bind to the IP address that it can't bind to?

Thanks
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 5th Sep 2010 23:45
What is the IP? Try specifying it directly by typing it in as a string using mnSetLocal. If that doesn't help then try using your local host address which can be retrieved using mnDNS("localhost"); if that works then I think it is a problem with the local interface on your computer, or a problem with winsock on your computer, rather than any fault in DarkNet. What firewall are you using? The firewall may be interfering with DarkNet so try temporarily disabling it; same goes for anti virus (although this is much less likely) if you have a particularly over protective one.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 6th Sep 2010 00:09
Returns 0.0.0.0


Set to local IP address: 127.0.0.1


Tried with firewall turned off already. The example with turning off the firewall didn't work.

My IP address is:


I am connected to my wireless router.

How do I know if it is my local interface?

Enhancements.dll has a command:


It returns: 172.16.0.5

How can I tell if it is winsock? Is there something I can update or install to get winsock working?

Thanks
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 6th Sep 2010 02:34
What happened when you tried 127.0.0.1? What firewall do you have? Some dont actually turn off even when you tell them to. Do any other applications on your computer have issues? Also try using different ports with mnSetLocal.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 6th Sep 2010 02:51
I posted and it didn't post for some reason...

I tried without the firewall or any other applications that might do something. I have avg and I can't shut it off for some reason. I don't think it has anything to do with it.

I tried 127.0.0.1. I used enhanced animation to get my ip address and it seemed to work..I don't know if that would help.

Winsock or the local interface might be the issue. How could I know if it is either one of those and how do I fix it?

Just have windows firewall. I have tried it with different ports already and still nothing.



Returned the IP address above and no other IP addresses.


I think it is winsock so how do I go about fixing/updating it?

Thanks
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 6th Sep 2010 19:22 Edited at: 6th Sep 2010 19:32
Okay just to clarify on some things can you run this code for me please? Change IP$ at the start to whatever your local interface is currently. My results were as followed (IP$ is wrong for me).


I don't know enough about winsock to help but you can google search how to fix or reset it. I think most likely it is a problem with the drivers used by your wireless card or adapter. Update these or reinstall them to see if that helps.

Anyway please post a screenshot of the results, I have to wait for a moderator to approve your post though before I can see the attached image so it would help if you uploaded it to another website e.g. imageshack.us and posted the link.



Attachments

Login to view attachments
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 7th Sep 2010 00:00
Thanks for you help!! Attached Results.

Attachments

Login to view attachments
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 7th Sep 2010 11:32 Edited at: 7th Sep 2010 11:34
Damn all tests failed! Surely you must have problems with lots of other networking applications? This further strengthens my belief that its not a bug in DarkNet.

I'm out of ideas for now. For future reference can you tell me the following (if you know them):
- what OS you are using. [edit] You are using windows 7 32 bit.
- what network adapter you are using.

Anyway as stated above the next course of action should be:
- reinstall and update network adapter drivers. The ones that windows 7 downloads are often very buggy.
- google how to repair winsock.

If you still can't fix your problem then you can get a refund for DarkNet from TGC.

Let me know how you get on!

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Sep 2010 19:01
I'll just say, I've never ever seen a router use the 172.16 address block for an internal network. I know it's a private address block, but I've never seen it used for that.

What would happen if you changed your network addresses behind your router to a 192.168 address block? It's a stretch I know, but if you are only dealing with a computer or two behind the router, then it should be easy enough to change the address and DHCP settings on the router and test it.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 7th Sep 2010 22:12
@Michael P - I don't have any problems with other network applications. Which makes me believe that my router might have a firewall or something like that. Don't worry I will figure this problem out and post the results so that future buyers will know how to fix this problem if it arises.

I'll do everything you suggested and get back to you asap.

@KISTech - I thought it might be my router. I will check my settings.

Thanks again. ^^
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 7th Sep 2010 23:12 Edited at: 7th Sep 2010 23:13
I think the reason for this problem is that DarkNet currently binds directly to an interface, rather than allowing winsock to automatically do the binding.

There is a good reason for this though which is that mnGetLocalIP doesn't work unless bound directly if no data has been transferred in client state.

I'm probably going to change this in the next version since it isn't standard behavior for applications. I might post a test application from the new version in a few days if I get to a stage where that is possible to confirm that all this is indeed true.

Anyway, good luck

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 7th Sep 2010 23:50
I downloaded Multi-Sync because I found it uses winsock. I tried it and it worked perfectly. This might mean that the problem might be winsock isn't automatically do the binding to the interface. Because "99% of other network applications is based on winsock" I think it is a fair assumption that winsock does the interface binding.

According to the creator of Multi-Sync:
Quote: "it's based on Winsock, which 99% of other network applications in Windows are"


Found Here:
http://forum.thegamecreators.com/?m=forum_view&t=99234&b=1

Hopefully that helps.

Thanks for your help.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 9th Sep 2010 02:30 Edited at: 9th Sep 2010 20:08
I will hopefully have a test application using code from the new version of DarkNet tomorrow so we can see if that fixes it. The whole thing has been rewritten and is drastically different from its predecessor so I expect it to work.

FYI it should be released by the 24th of September.

Attachments

Login to view attachments
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 9th Sep 2010 20:07 Edited at: 9th Sep 2010 20:09
Sorry for double post.

Here is a test application from the new version which sets up a TCP server, and connects a TCP client to it on the localhost which is assumed to be 127.0.0.1.

Please post a screenshot of the results, and if anyone else wants to test it they are welcome to!

Heres a screenshot:


Attachments

Login to view attachments
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 11th Sep 2010 01:03
I got the same output. Works perfectly. Look forward to the release! Hopefully u can keep the voice feature in the new version.

Thanks
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 2nd Oct 2010 02:49
@Michael P - Thanks for the Dark Net 2.0 release. The only thing I noticed was there was no .net examples.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 2nd Oct 2010 16:47
Just to confirm, this problem is definately fixed in v2.0? There is much less sample code, thats because I need to convert it all which takes time. There is a C# example though.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 2nd Oct 2010 22:09
@Michael P

Well the examples included for DBP gives me syntax errors:

This command doesn't exist.


I need to download C# or C++ still. I have VB.Net right now. Any working demos?

I tried the installer for .Net and it didn't work because I don't have 2008. I have visual basic 2010 express edition.

Let me know when u get the samples converted over. I can't wait to try them.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 4th Oct 2010 03:37 Edited at: 4th Oct 2010 04:15
Ah yes, accidently included the wrong DBP demo code. I have emailed TGC about this, and attached to this post is the corrected demo code.

And BTW the code will work with VS 2008, you just need to create a new project and include it.

Attachments

Login to view attachments
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 4th Oct 2010 21:42
@Michael P: Tested the DBP example and it works! Thanks
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 13th Oct 2010 09:57
@Michael P:

Tested the .Net DLL and I seem to have come across an error at this line:


Server:


Client:


Attached an image of the error. Posted the source. Is it something I am doing wrong or is it the DLL? I translated from the C# examples.

Thanks,

DigitalFury

Attachments

Login to view attachments
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 13th Oct 2010 17:39
Very strange, this only happens if you create an instance of client or broadcast type and then use client joined on it.

Is this VB.NET you are using? And is the code you've posted exactly what you compile when you get this error?

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 13th Oct 2010 23:46
@Michael P - Using VB.Net 2010 Express Edition. The code is in VB.Net.

I get an error at this line:


The type it returns is not an integer and not a UInteger or the type isn't supported in VB.Net. IDK.

Thanks,

Digital Fury
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 14th Oct 2010 15:50
I think its a problem with the project settings. The DLL works with C# so there shouldn't be anything wrong with it.

Things to note:
- Architecture must be x86 (32bit).
- .NET Framework version must be 4.

I am very short on time at the moment but will look into this ASAP. Please let me know if you manage to find a solution.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Oct 2010 23:36
I have .Net Framework Version 4. I don't know how to tell if I have x86 (32bit) Architecture or 64 Bit Architecture.

Let me know when u get to testing my code. Hopefully it has something to do with my source code.

Thanks
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 18th Oct 2010 01:58
Can you email or post the project for me so that I can debug it please?

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 18th Oct 2010 05:00
@Michael P - Sure. Here u go! (Attached)

Attachments

Login to view attachments
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 18th Oct 2010 20:01
The problem is with your code.

Form1 manages the server.
Form2 manages the client.

There is only one instantiation of DarkNet between both forms.

You start by showing Form1. Then you click the button, and Form2 is displayed. When this is displayed it unloads DarkNet and reloads it because you call Start. Then you use connect and instance 0 is now a client instance, not a server instance. Then Form1 attempts to use mn.ClientJoined in instance 0 which is a client instance, and so an error occurs.

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 18th Oct 2010 23:23
@Michael P - Figured it was a problem with my code. I just wanted to test the client/server in one app. I can make sure I have two instances or just seperate them into two apps.

Thanks, Hopefully I can figure out how this plugin works. ^^

Digital Fury
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 22nd Oct 2010 00:11
@ Michael P: I finally goto fixing the instance error. Now iReturn won't return 1 when a client connects. I copied from your code exactly so it should work.

Check the attached project and Thanks!

DigitalFury

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-21 14:56:22
Your offset time is: 2024-11-21 14:56:22