473,508 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: Method's type signature is not PInvoke compatible


I've got this error calling one DLL func from my VB.net app:

An unhandled exception of type
'System.Runtime.InteropServices.MarshalDirectiveEx ception' occurred in
Test.exe
Additional information: Method's type signature is not PInvoke compatible.

Called func takes an structure as input (not as a reference/pointer) and
returns structure (not as a reference/pointer).

What should I do?
Nov 21 '05 #1
0 1696

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

Similar topics

3
1828
by: juli jul | last post by:
Hello I am getting this error: error CS0029: Cannot implicitly convert type 'System.EventHandler' to 'Janus.Windows.GridEX.ColumnActionEventHandler Here are the declarations I made(all of them...
3
4089
by: Steve | last post by:
I'm trying to call some unmanaged methods from a DLL. I did this awhile ago, a couple years ago... I'm a little rusty. I will show you what I'm dealing with: <unmanaged function signature>...
8
9547
by: Brian Tkatch | last post by:
Server: DB2/SUN 8.1.6 Client: DB2 Connect Personal Edition (No 11) <URL:ftp://ftp.software.ibm.com/ps/products/db2/fixes2/english-us/db2winIA32v8/fixpak/FP11_WR21365/FP11_WR21365_CONPE.exe> ...
8
6643
by: Rajesh Soni | last post by:
Hi! I'm getting a PInvoke error while trying to execute the following code... declaration: Structure POINTAPI Dim x As IntPtr
4
5937
by: Zytan | last post by:
I have VB code that shows how to import a DLL function. I compiled it. I used .NET Reflector to see the C# code, and it shows this: private static extern bool MethodName( ref string...
1
522
by: John | last post by:
What does this mean? Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'C:\My Documents\Microsoft Visual Basic\CommuniDent\CommuniDent\bin\CommuniDent.vshost.exe'....
0
1053
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...
1
1532
by: keerthikarani | last post by:
hi, I m using the following code in vb.net, but it shows me some error, can u explain why this error occurs and how to rectify it, but the following code works fine in vb Private Declare...
1
5718
by: AGorodnov | last post by:
Hello, I'm trying to retrieve a structure in C# from a C dll. Really to say I'm not an expert programmer on both C/C#, and will appreciate any comments and suggestions. Here's a C dll coded...
0
7224
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
7118
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
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5625
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,...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.