Error on DllImport (PInvoke) syntax

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Water Cooler v2

    #1

    Error on DllImport (PInvoke) syntax

    <DllImport("use r32.dll", EntryPoint := "UnregisterHotK ey"> _
    Public Function Win32Unregister HotKey( _
    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?

  • Howard Kaikow

    #2
    Re: Error on DllImport (PInvoke) syntax

    "Water Cooler v2" <wtr_clr@yahoo. com> wrote in message
    news:1151406416 .350690.195910@ y41g2000cwy.goo glegroups.com.. .[color=blue]
    > <DllImport("use r32.dll", EntryPoint := "UnregisterHotK ey"> _
    > Public Function Win32Unregister HotKey( _
    > 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?[/color]


    Missing ")" before ">".

    --
    http://www.standards.com/; See Howard Kaikow's web site.


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Error on DllImport (PInvoke) syntax

      "Water Cooler v2" <wtr_clr@yahoo. com> schrieb:[color=blue]
      > <DllImport("use r32.dll", EntryPoint := "UnregisterHotK ey"> _[/color]


      '... :="UnregisterKo tKey")> _'.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Peter Macej

        #4
        Re: Error on DllImport (PInvoke) syntax

        There's missing closing ) in DllImport constructor.
        [color=blue]
        > <DllImport("use r32.dll", EntryPoint := "UnregisterHotK ey"> _[/color]

        --
        Peter Macej
        Helixoft - http://www.vbdocman.com
        VBdocman - Automatic generator of technical documentation for VB, VB
        ..NET and ASP .NET code

        Comment

        • Water Cooler v2

          #5
          Re: Error on DllImport (PInvoke) syntax

          Yup! thanks! Saw that immediately after making the original post but
          couldn't reply sooner than now to say "all systems go".

          Comment

          Working...