Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Akow, 7th_zorro, VoroneTZ, PeroPero), 812 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: UPnP -- no more port forwarding [Re: JibbSmart] #360571
02/25/11 01:55
02/25/11 01:55
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
New version. Same link in original post. It should [doesn't] eliminate any need for external DLLs (such as "msvcr100.dll").

Please let me know if there are any other problems!

Jibb

EDIT: Btw, could someone please move this to "Lite-C Contributions"? Thanks laugh

EDIT2: Same link, same DLL. But now the zip contains msvcr100.dll, which should also be included in your project to make sure there are no issues on computers that haven't got the Microsoft Visual C++ 2010 Redistributable installed.

Last edited by JulzMighty; 02/26/11 01:20.

Formerly known as JulzMighty.
I made KarBOOM!
Re: UPnP -- no more port forwarding [Re: JibbSmart] #360704
02/26/11 11:26
02/26/11 11:26
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
How do I enable threading so it doesn't interrupt game flow? laugh


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: UPnP -- no more port forwarding [Re: William] #360725
02/26/11 14:57
02/26/11 14:57
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
It's not in the DLL. Check out how to do multi-threading here. Just have a function whose job it is to open the ports by calling the DLL function (let's call it threadOpenFunc). Then I just go:
Code:
CreateThread(NULL, 0, threadPortOpenFunc, 1, 0, NULL);

I put that in its own function, actually, and it checks and sets a couple of global variables to make sure that such a thread isn't already opening on closing ports, because it would get unpredictable if you were trying to close a port in one thread while opening the same port in another thread.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: UPnP -- no more port forwarding [Re: JibbSmart] #360940
02/28/11 00:48
02/28/11 00:48
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Thanks! I never seen the dll before, I'll look into it. I've installed your .dll with Silas, and it seems to be working good so far. Thanks again for this, and I put your name in the credits. laugh


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: UPnP -- no more port forwarding [Re: William] #360943
02/28/11 00:55
02/28/11 00:55
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
No need for my name in the credits -- there's very little of my own code. I'm looking forward to trying Silas -- I have a really busy week ahead of me and can't download it just yet, but I'm excited to see you've put a beta in the Projects forum!

The CreateThread function doesn't need a DLL -- all you need to do is #include <windows.h> laugh

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: UPnP -- no more port forwarding [Re: JibbSmart] #360944
02/28/11 01:13
02/28/11 01:13
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Ahhh yes, okay. I hope to use the threading for database maybe too. But then again, I'm sure if the database .dll supports it.. does the .dlls need to have some sort of built in support to use threading?

You solved a big problem for me, so that's why the thanks in the credits. laugh


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: UPnP -- no more port forwarding [Re: William] #360955
02/28/11 03:25
02/28/11 03:25
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Cheers laugh

I don't think the DLL itself needs to directly support it, but I could be wrong. To be safe, I'd avoid letting related DLL functions run in more than one thread at the same time, lest they interfere with each other.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Page 2 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1