473,395 Members | 1,978 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,395 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 1412
"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...
5
by: =?Utf-8?B?SmVzc2ljYQ==?= | last post by:
Hello, I have a pInvoke question. This is the C function that is exported from one of the C dll, extern __declspec(dllexport) IM_RET_CODE ST_import (IM_MODE mode, char *filename,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.