Created
January 24, 2025 00:08
-
-
Save pedroinfo/4a01688f648942489bb6e5eeabc554b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub MostrarConfiguracoesProxy() | |
Dim WinHttpReq As Object | |
Dim ProxyConfig As String | |
' Cria um objeto WinHTTP | |
Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1") | |
' Recupera as configurações de proxy do sistema | |
On Error Resume Next | |
WinHttpReq.SetProxy 0 | |
ProxyConfig = WinHttpReq.GetProxyForUrl("http://www.google.com") | |
On Error GoTo 0 | |
' Verifica e exibe as configurações de proxy | |
If ProxyConfig <> "" Then | |
MsgBox "Configurações de Proxy: " & ProxyConfig, vbInformation, "Proxy" | |
Else | |
MsgBox "Nenhuma configuração de proxy encontrada ou proxy não está configurado.", vbExclamation, "Proxy" | |
End If | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment