HighTechTalks DotNet Forums  

missing identifier ?

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss missing identifier ? in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jon Paal
 
Posts: n/a

Default missing identifier ? - 03-23-2006 , 04:00 PM






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:



Reply With Quote
  #2  
Old   
sirfunusa
 
Posts: n/a

Default Re: missing identifier ? - 03-23-2006 , 04:13 PM






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


Reply With Quote
  #3  
Old   
Mark Fitzpatrick
 
Posts: n/a

Default Re: missing identifier ? - 03-23-2006 , 07:07 PM



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



"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote

Quote:
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:





Reply With Quote
  #4  
Old   
Jon Paal
 
Posts: n/a

Default Re: missing identifier ? - 03-23-2006 , 10:47 PM



that seems to do it .
thanks


"Mark Fitzpatrick" <markfitz (AT) fitzme (DOT) com> wrote

Quote:
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



"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote

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:







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.