Click here to Skip to main content
15,887,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Removing Visual Studio 2003 Pin
MatthysDT2-Apr-06 20:27
MatthysDT2-Apr-06 20:27 
Questionregarding datagrid scrolling downwards Pin
Pravin H31-Mar-06 1:39
Pravin H31-Mar-06 1:39 
Questionerror msg while closing vb.net project Pin
Pravin H31-Mar-06 1:37
Pravin H31-Mar-06 1:37 
QuestionConnecting to SQL Server Pin
dikshit0531-Mar-06 0:07
dikshit0531-Mar-06 0:07 
AnswerRe: Connecting to SQL Server Pin
CWIZO31-Mar-06 1:26
CWIZO31-Mar-06 1:26 
AnswerRe: Connecting to SQL Server Pin
Vikrant Badhai31-Mar-06 20:21
Vikrant Badhai31-Mar-06 20:21 
QuestionToggle Outlining in VB 2003 Pin
Kevin McFarlane30-Mar-06 21:47
Kevin McFarlane30-Mar-06 21:47 
Questionerror with decalre function Pin
allenmpcx30-Mar-06 21:42
allenmpcx30-Mar-06 21:42 
Hello. I was successfully able to convert VB6 to VB.Net, however I get an error when calling a declare function. Part of the code looks like this:

<br />
Declare Function iRasEnumDevices Lib "rasapi32.dll" Alias "RasEnumDevicesA" (ByRef lpRasDevInfo As Integer, ByRef lpcb As Integer, ByRef lpcDevices As Integer) As Integer<br />
    Declare Sub iCopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef hpvDest As Integer, ByRef hpvSource As RASDEVINFO, ByVal cbCopy As Integer)<br />
    Declare Sub iCopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef hpvSource As RASDEVINFO, ByRef hpvDest As Integer, ByVal cbCopy As Integer)<br />
<br />
Public Structure RASIPADDR<br />
        Dim a As Byte<br />
        Dim b As Byte<br />
        Dim c As Byte<br />
        Dim d As Byte<br />
    End Structure<br />
<br />
Dim lpRasDevInfo As New RASDEVINFO<br />
        Dim lpcb As Integer = 0<br />
        Dim cDevices As Integer<br />
        Dim t_Buff As Integer<br />
        Dim nRet As Integer<br />
        Dim t_ptr As Integer<br />
        Dim i As Integer<br />
<br />
        lpcb = 0<br />
        lpRasDevInfo.Initialize()<br />
        lpRasDevInfo.dwSize = Len(lpRasDevInfo) + (Len(lpRasDevInfo) Mod 4)<br />
<br />
        nRet = iRasEnumDevices(0, lpcb, cDevices)<br />
<br />
        t_Buff = GlobalAlloc(GPTR, lpcb)<br />
<br />
        iCopyMemory(t_Buff, lpRasDevInfo, Len(lpRasDevInfo))<br />
<br />
        nRet = iRasEnumDevices(t_Buff, lpcb, lpcb) 


I get an error on the line nRet = iRasEnumDevices(t_Buff, lpcb, lpcb) that says:
"Object reference not set to an instance of an object". I ran the debugger and the only thing that gets set to Nothing is the parameter I pass in ByRef. I'm not really sure what is going on, but does anyone have an idea?

Mike - I love to program!
AnswerRe: error with decalre function Pin
progload31-Mar-06 7:44
progload31-Mar-06 7:44 
QuestionControl Tabs Pin
Leavashni30-Mar-06 19:56
Leavashni30-Mar-06 19:56 
Questionport knocking Pin
joby224330-Mar-06 19:53
joby224330-Mar-06 19:53 
AnswerRe: port knocking Pin
Dave Kreskowiak31-Mar-06 5:09
mveDave Kreskowiak31-Mar-06 5:09 
QuestionMoving any Control (For instance BUTTON) on the Form's surface Pin
Mr. Arfan Qadir30-Mar-06 18:52
Mr. Arfan Qadir30-Mar-06 18:52 
AnswerRe: Moving any Control (For instance BUTTON) on the Form's surface Pin
sathish s30-Mar-06 21:02
sathish s30-Mar-06 21:02 
GeneralRe: Moving any Control (For instance BUTTON) on the Form's surface Pin
Dave Kreskowiak31-Mar-06 5:05
mveDave Kreskowiak31-Mar-06 5:05 
AnswerRe: Moving any Control (For instance BUTTON) on the Form's surface Pin
Dave Kreskowiak31-Mar-06 5:03
mveDave Kreskowiak31-Mar-06 5:03 
QuestionSimplify your life with Object Binding Pin
Iqbal M Khan30-Mar-06 18:50
Iqbal M Khan30-Mar-06 18:50 
QuestionClear XML Element Pin
nitin_ion30-Mar-06 18:40
nitin_ion30-Mar-06 18:40 
QuestionFile transfer help Pin
Mega130-Mar-06 17:27
Mega130-Mar-06 17:27 
AnswerRe: File transfer help Pin
hbk72331-Mar-06 1:35
hbk72331-Mar-06 1:35 
GeneralRe: File transfer help Pin
Mega131-Mar-06 4:08
Mega131-Mar-06 4:08 
GeneralRe: File transfer help Pin
Chatura Dilan31-Mar-06 17:43
Chatura Dilan31-Mar-06 17:43 
QuestionLoad html page in VB.NET Pin
lucdt30-Mar-06 17:03
lucdt30-Mar-06 17:03 
AnswerRe: Load html page in VB.NET Pin
sathish s30-Mar-06 20:02
sathish s30-Mar-06 20:02 
Questionnull value - datetimepicker checked property Pin
VaLynna30-Mar-06 16:36
VaLynna30-Mar-06 16:36 

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.