🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #702

Re: Port forwarding - NAT

#702
From: Remy Lebeau (TeamB)
Date: Wed, 14 Nov 2007 17:34
39 lines
1913 bytes
"rogo" <gui@tesco.net> wrote in message 
news:473a9bd8@newsgroups.borland.com...

> I want to do this automatically

To do that, the router needs to support uPNP and have it enabled.  XP has an 
API available for uPNP:

    http://msdn2.microsoft.com/en-us/library/aa382303.aspx

> i am under the unserstanding that its called port forwarding.

Yes.

> Can someone tell me if iphlpapi can be used for port forarding.

No, it cannot.

> Is it only using the Upnp Api that i can accomplish this

Yes.

> is there other ways.

You could write code that mimics a web browser so it can log into the router 
admin and process the pages the same way a user would.  That would be the 
long way to accomplish what you want, though.

> What would be BCB version of MS's CString

AnsiString

> i have MS code using Upnp but the stdafx just wont let me compile

You will need to convert the code to BCB's equivilents.


Gambit 
Technical Details
Message-ID: <473b31d4@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <473a9bd8@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6a4327219a1511f9
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <473a9bd8@newsgroups.borland.com>
Subject: Re: Port forwarding - NAT
Date: Wed, 14 Nov 2007 09:34:12 -0800
Lines: 41
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 207.178.157.90
Message-ID: <473b31d4@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1195061716 207.178.157.90 (14 Nov 2007 09:35:16 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail