Click here to Skip to main content
15,920,688 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRetriving Field schema using ADO Pin
Quecumber2564-May-06 9:44
Quecumber2564-May-06 9:44 
QuestionFile replace and backup Pin
erniebert4-May-06 7:16
erniebert4-May-06 7:16 
QuestionReport Problem...Please help Pin
airprince4-May-06 6:54
airprince4-May-06 6:54 
AnswerRe: Report Problem...Please help Pin
Mekong River4-May-06 15:51
Mekong River4-May-06 15:51 
QuestionPlease Help Me.... Pin
airprince4-May-06 6:42
airprince4-May-06 6:42 
AnswerRe: Please Help Me.... Pin
Guffa4-May-06 8:09
Guffa4-May-06 8:09 
QuestionDatagrid: how to detect uncommitted changes? Pin
Roger Harvest4-May-06 6:39
Roger Harvest4-May-06 6:39 
QuestionPInvoke stack balance detected? Pin
Rashar4-May-06 6:25
Rashar4-May-06 6:25 
Hello,

I've been searching the net on how to execute a dialup connection and came up with the following code:
<br />
Imports System.Runtime.InteropServices<br />
<br />
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long<br />
    Private Declare Function InternetAttemptConnect Lib "wininet" (ByVal dwReserved As Long) As Long<br />
    Const scUserAgent = "ISP_Dialup"<br />
    Const INTERNET_OPEN_TYPE_PRECONFIG = 0<br />
    Public Function ConnectToSISP() As Boolean<br />
        Dim hInternet As Long<br />
        If InternetAttemptConnect(0) <> 0 Then Exit Function<br />
        hInternet = InternetOpen(scUserAgent, INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)<br />
        ConnectToSISP = (hInternet <> 0) 'return False if hInternet=0<br />
    End Function<br />

When my code reaches this point If InternetAttemptConnect(0) <> 0 Then Exit Function I receive a message that states PInvoke stack balance detected... A call to PInvoke function 'Project1!Project1.Dialup::InternetAttemptConnect' has unbalanced the stack.

I'm thinking maybe some how I am not referencing wininet.dll properly...any suggestions is greatly appreciated.

Rashar
AnswerRe: PInvoke stack balance detected? Pin
kasik4-May-06 7:23
kasik4-May-06 7:23 
QuestionVB.Net Arrays Pin
passionirie4-May-06 5:22
passionirie4-May-06 5:22 
AnswerRe: VB.Net Arrays Pin
J4amieC4-May-06 5:40
J4amieC4-May-06 5:40 
QuestionCOMBOBOX Pin
moveman4-May-06 5:20
moveman4-May-06 5:20 
AnswerRe: COMBOBOX Pin
Quecumber2564-May-06 6:01
Quecumber2564-May-06 6:01 
AnswerRe: COMBOBOX Pin
Quecumber2564-May-06 6:28
Quecumber2564-May-06 6:28 
QuestionFREE .NET Related Material Pin
dotnetguide4-May-06 5:03
dotnetguide4-May-06 5:03 
AnswerRe: FREE .NET Related Material Pin
J4amieC4-May-06 5:39
J4amieC4-May-06 5:39 
Questiontextbox Pin
bawades4-May-06 4:17
bawades4-May-06 4:17 
AnswerRe: textbox Pin
Damoche104-May-06 5:13
Damoche104-May-06 5:13 
AnswerRe: textbox Pin
Member 28660305-May-06 2:49
Member 28660305-May-06 2:49 
Questionhide Pin
bawades4-May-06 3:49
bawades4-May-06 3:49 
QuestionASP Question Pin
alexfromto4-May-06 3:15
alexfromto4-May-06 3:15 
QuestionChange Scroll Bar Width? Pin
Kaditcher4-May-06 2:57
Kaditcher4-May-06 2:57 
Questioncrystal report help Pin
vipinpaliwal19804-May-06 1:28
vipinpaliwal19804-May-06 1:28 
Questionabout charts in powerpoint slides usig vb.net. Pin
jkrao4-May-06 1:25
jkrao4-May-06 1:25 
AnswerRe: about charts in powerpoint slides usig vb.net. Pin
Rabi@Dundas5-May-06 12:58
Rabi@Dundas5-May-06 12:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.