|
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
JibbSmart
OP
Expert
|
OP
Expert
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 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: William]
#360725
02/26/11 14:57
02/26/11 14:57
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
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:
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: William]
#360943
02/28/11 00:55
02/28/11 00:55
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
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> Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
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
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Cheers 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!
|
|
|
|