473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Error on DllImport (PInvoke) syntax

<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?

Jun 27 '06 #1
4 1178
"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.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.
Jun 27 '06 #2
"Water Cooler v2" <wt*****@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/>
Jun 27 '06 #3
There's missing closing ) in DllImport constructor.
<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
Jun 27 '06 #4
Yup! thanks! Saw that immediately after making the original post but
couldn't reply sooner than now to say "all systems go".

Jun 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
11
by: Fabien Penso | last post by:
Hi. I am trying to make this work but I got a weird behavior. I got a very basic system, I call a unmanaged "dllimported" function and give it a structure of callback functions. Sometimes,...
2
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
2
by: Schorschi | last post by:
Can't seemd to get ReadFile API to work! Returns invalid handle error? =========================================================================== Ok, the visual basic gurus, help! The...
4
by: Water Cooler v2 | last post by:
<DllImport("user32.dll", EntryPoint := "UnregisterHotKey"> _ Public Function Win32UnregisterHotKey( _ ByVal hWnd As IntPtr, _ ByVal id As Integer) As Integer End Function squiggles every...
5
by: Pucca | last post by:
I'm trying to pinvoke a function in a C++ dll but I'm getting an error that entry point can not be located from my pinvoke code. Do I need to add any code to the C++ DLL to make the pinvoke? The...
4
by: sreenubkaimal | last post by:
Please help me with this.. I have a DLL created in Visual C++ 6.0 ( VS 6.0 ). I am trying to use this DLL in a new wrapper application written using Visual Studio .net 2003 (C++ - MFC). My...
4
by: Can | last post by:
From the MSN documentation; "By default, /CLRUNMANAGEDCODECHECK is in effect, which means SuppressUnmanagedCodeSecurityAttribute is applied to linker-generated PInvoke calls. Specify...
0
by: hilma | last post by:
Hi all! I got this exception in My project. Please guide me: A call to PInvoke function 'MyExtRichTextBox!MyExtRichTextBox.MyExtRichTextBox+RichEditOle::CreateILockBytesOnHGlobal' has unbalanced...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.