Click here to Skip to main content
16,006,065 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhelp on Date ? Pin
Ron.S6-Jun-06 20:50
Ron.S6-Jun-06 20:50 
AnswerRe: help on Date ? Pin
sathish s6-Jun-06 21:57
sathish s6-Jun-06 21:57 
QuestionHow to create a file in VB having header information Pin
himuskanhere6-Jun-06 20:45
himuskanhere6-Jun-06 20:45 
QuestionChange access form when change screen resolution Pin
Mekong River6-Jun-06 16:12
Mekong River6-Jun-06 16:12 
QuestionWeb custom controls in VB.net ASP 2.0 Pin
David Pretorius6-Jun-06 14:32
David Pretorius6-Jun-06 14:32 
Questionhelp files Pin
_tasleem6-Jun-06 13:06
_tasleem6-Jun-06 13:06 
AnswerRe: help files Pin
Joshua Quick6-Jun-06 14:50
Joshua Quick6-Jun-06 14:50 
QuestionHELP! Errors while attempting to import a DLL Pin
b_girl6-Jun-06 11:11
b_girl6-Jun-06 11:11 
Hey, I'm new to VB.NET (and have no experience programming in VB) - I tried to post earlier but for some reason it didn't work, and the second attempt is never as good as the first!

I'm using Visual Studio 2005 with .NET Framework 2.0.

Anyway, in my project I have a need to call rasapi32.dll, from what I understand I need to use an unmanaged code block in order to make use of this DLL. This is what I have so far:
<br />
Imports System.Runtime.InteropServices<br />
<br />
Public Class TestRASDial<br />
<br />
    <DllImport("rasapi32.dll", CharSet:=CharSet.Auto)> _<br />
    Public Function RasDial(ByVal LPRASDIALEXTENSIONS, _<br />
    ByVal LPCTSTR, _<br />
    ByVal LPRASDIALPARAMS, _<br />
    ByVal DWORD, _<br />
    ByVal LPVOID, ByVal LPHRASCONN) As Long<br />
<br />
    End Function<br />
<br />
End Class<br />

Now, I realize this doesn't actually do anything just yet, but I need to get the basics working first. So, the above bit of code gives me the following error:

"System.Runtime.InteropServices.DllImportAttribute' cannot be applied to instance method."

The word "RasDial" is underlined so I'm assuming that's the problem, however, I don't know how else to do this. I've tried searching online but can't seem to find much on the topic for some reason.

I would really appreciate it if any of you are able to help me out and point out what I've done wrong! You'd be a lifesaver...

Thanks a million...
AnswerRe: HELP! Errors while attempting to import a DLL Pin
progload6-Jun-06 12:21
progload6-Jun-06 12:21 
GeneralRe: HELP! Errors while attempting to import a DLL Pin
b_girl6-Jun-06 12:55
b_girl6-Jun-06 12:55 
GeneralRe: HELP! Errors while attempting to import a DLL Pin
progload6-Jun-06 14:13
progload6-Jun-06 14:13 
QuestionSet tab stop in vb.net [modified] Pin
New_Coder6-Jun-06 9:19
New_Coder6-Jun-06 9:19 
AnswerRe: Set tab stop in vb.net [modified] Pin
Kschuler6-Jun-06 10:43
Kschuler6-Jun-06 10:43 
GeneralRe: Set tab stop in vb.net [modified] Pin
New_Coder8-Jun-06 3:16
New_Coder8-Jun-06 3:16 
AnswerRe: Set tab stop in vb.net [modified] Pin
Member 22716556-Jun-06 23:36
Member 22716556-Jun-06 23:36 
QuestionHow to get ProductVersion in .Net 2005 Pin
Steven J. Reed6-Jun-06 8:59
Steven J. Reed6-Jun-06 8:59 
AnswerRe: How to get ProductVersion in .Net 2005 Pin
progload6-Jun-06 9:21
progload6-Jun-06 9:21 
GeneralRe: How to get ProductVersion in .Net 2005 Pin
Steven J. Reed6-Jun-06 9:30
Steven J. Reed6-Jun-06 9:30 
GeneralRe: How to get ProductVersion in .Net 2005 Pin
progload6-Jun-06 9:45
progload6-Jun-06 9:45 
Questionhow to change the textbox control source property Pin
iramg6-Jun-06 8:27
iramg6-Jun-06 8:27 
AnswerRe: how to change the textbox control source property Pin
Kschuler6-Jun-06 8:44
Kschuler6-Jun-06 8:44 
GeneralRe: how to change the textbox control source property Pin
iramg8-Jun-06 7:56
iramg8-Jun-06 7:56 
GeneralRe: how to change the textbox control source property Pin
Kschuler8-Jun-06 8:08
Kschuler8-Jun-06 8:08 
QuestionHow to rename a file name Pin
Jijo thomas6-Jun-06 7:54
Jijo thomas6-Jun-06 7:54 
AnswerRe: How to rename a file name Pin
Kschuler6-Jun-06 8:59
Kschuler6-Jun-06 8:59 

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.