missing identifier ?

J

Jon Paal

what's missing here ?

Compiler Error Message: BC30203: Identifier expected.

Source Error: Line 11


Line 9: Public Class GetVol
Line 10:
Line 11: Private Shared<DllImport("kernel32.dll")> _
Line 12: Function GetVolumeInformation(PathName As String, VolumeNameBuffer As StringBuilder, VolumeNameSize As UInt32, ByRef
VolumeSerialNumber As UInt32, ByRef MaximumComponentLength As UInt32, ByRef FileSystemFlags As UInt32, FileSystemNameBuffer As
StringBuilder, FileSystemNameSize As UInt32) As Long
Line 13:
 
S

sirfunusa

Aren't you mixing C# syntax with VB.NET??

Declare Function LogonUserA Lib "advapi32.dll" (ByVal lpszUsername As
String, _
ByVal lpszDomain As String, _
ByVal lpszPassword As String, _
ByVal dwLogonType As Integer, _
ByVal dwLogonProvider As Integer, _
ByRef phToken As IntPtr) As Integer
 
M

Mark Fitzpatrick

I think the priveate shared comes after the DLLImport. What I believe the
compiler is telling you is it is expecting some identifying name to occur
right after private shared.
I think what you're looking for is the following:

Line 11: <DllImport("kernel32.dll")> _
Line 12: Private Shared Function GetVolumeInformation(......

Hope this helps,
Mark Fitzpatrick
Microsoft MVP -FrontPage
 
J

Jon Paal

that seems to do it .
thanks


Mark Fitzpatrick said:
I think the priveate shared comes after the DLLImport. What I believe the compiler is telling you is it is expecting some
identifying name to occur right after private shared.
I think what you're looking for is the following:

Line 11: <DllImport("kernel32.dll")> _
Line 12: Private Shared Function GetVolumeInformation(......

Hope this helps,
Mark Fitzpatrick
Microsoft MVP -FrontPage
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top