|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Apr 2001
Città: Dundee, Scotland
Messaggi: 467
|
Visual C++ & Gateway
Salve a tutti.
Sapete se c'e' un modo di cambiare l'indirizzo di gateway della macchina "al volo" (senza riavviare il pc o disconnettersi e riconnettersi) utilizzando Visual C++? Grazie, Maurizio |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Re: Visual C++ & Gateway
Quote:
Ad esempio ho trovato questa API : DWORD APIENTRY GetInterfaceConfigInfo( IN DWORD dwIndex, IN OUT PVOID pvConfig, IN OUT PDWORD pdwSize ) /*++ Routine Description Called by the IP Router Manager to retrieve an interface's configuration. Usually this is because an admin utility is displaying this information. The Router Manager calls us with a NULL config and ZERO size. We return the required size to it. It then allocates the needed memory and calls us a second time with a valid buffer. We validate parameters each time and copy out our config if we can Arguments dwIndex Index of the interface being queried pvConfig Pointer to buffer to store the config pdwSize Size of the buffer Return Value ERROR_INSUFFICIENT_BUFFER If the size of the buffer is too small ERROR_INVALID_PARAMETER ERROR_INVALID_DATA NO_ERROR Purtroppo la maggior parte delle API di questo genere non sono documentate... |
|
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Apr 2001
Città: Dundee, Scotland
Messaggi: 467
|
Intanto grazie per la risposta....
In pratica io ho l'esigenza di isolare un PC connesso in LAN da Internet. La connessione a Internet avviene fisicamente tramite un router per cui gli altri pc avranno settato come indirizzo di gateway quello del router. Per questo avevo pensato alla modifica dell'indirizzo di gateway. Secondo voi funziona così o ancora meglio... vi vengono in mente altri metodi per ottenere il medesimo risultato? Ovviamente il tutto dovrà essere fatto tramite un programmino. E' molto importante... Grazie |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Apr 2001
Città: Dundee, Scotland
Messaggi: 467
|
Nessuno ha idea a riguardo?
|
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Le API sono probabilmente quelle che ti ho scritto...
GetInterfaceConfigInfo e SetInterfaceConfigInfo (per settare i parametri)... Ma le strutture utilizzate in queste funzioni non sembrano essere documentate... |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 05:06.



















