Home All Groups Group Topic Archive Search About

Error on DllImport (PInvoke) syntax

Author
27 Jun 2006 11:06 AM
Water Cooler v2
<DllImport("user32.dll", EntryPoint := "UnregisterHotKey"> _
    Public Function Win32UnregisterHotKey( _
        ByVal hWnd As IntPtr, _
        ByVal id As Integer) As Integer
    End Function


squiggles every keyword in the above and the tool-tip says: "Expression
Expected".

Uh?

Author
27 Jun 2006 11:21 AM
Howard Kaikow
Show quote Hide quote
"Water Cooler v2" <wtr_***@yahoo.com> wrote in message
news:1151406416.350690.195910@y41g2000cwy.googlegroups.com...
> <DllImport("user32.dll", EntryPoint := "UnregisterHotKey"> _
>     Public Function Win32UnregisterHotKey( _
>         ByVal hWnd As IntPtr, _
>         ByVal id As Integer) As Integer
>     End Function
>
>
> squiggles every keyword in the above and the tool-tip says: "Expression
> Expected".
>
> Uh?


Missing ")" before ">".

--
http://www.standards.com/; See Howard Kaikow's web site.
Author
27 Jun 2006 11:25 AM
Herfried K. Wagner [MVP]
"Water Cooler v2" <wtr_***@yahoo.com> schrieb:
> <DllImport("user32.dll", EntryPoint := "UnregisterHotKey"> _


'... :="UnregisterKotKey")> _'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
27 Jun 2006 11:33 AM
Peter Macej
There's missing closing ) in DllImport constructor.

Show quoteHide quote
> <DllImport("user32.dll", EntryPoint := "UnregisterHotKey"> _

--
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
..NET and ASP .NET code
Author
27 Jun 2006 12:12 PM
Water Cooler v2
Yup! thanks! Saw that immediately after making the original post but
couldn't reply sooner than now to say "all systems go".