pinvoke
Handling user-defined exceptions from C++ DLL - .NET PInvoke/Marshalling
I am working on WPF appli开发者_开发问答cation which internally calls a C/C++ DLL using PInvoke. In the debug mode of the DLL, whenever error occurs the function throw an exception which is basically[详细]
2023-03-21 05:37 分类:问答How to call an unmanaged C++ function with a std::vector<>::iterator as parameter from C#?
In unmanaged C++ I have a function which I\'m trying to call from C#.This C++ function is as follows:[详细]
2023-03-21 01:10 分类:问答C# P/Invoke: Varargs delegate callback
I was just trying to do some managed/unmanaged interop. To get extended error information I decided to register a log callback offered by the dll:[详细]
2023-03-20 12:55 分类:问答Delphi dll function to C#
With a compiled Delphi dll, one of the functions declared is Mydll.dll type TInfo = array [0..255] of byte;[详细]
2023-03-20 11:45 分类:问答WinPcap C# Wrapping pcap_findalldevs() throws PInvokeStackImbalance
Im tr开发者_运维百科ying to write a C# wrapper for winpcap. It gives the warning PInvokeStackImbalance when im trying to debug, but pcap_findalldevs does its job. But I think this will cause a memory[详细]
2023-03-20 09:27 分类:问答DllImport PathCanonicalize on 64bit causes memory corruption
I am trying to use the function PathCanonicalize using DllImport (PInvoke) on a 64 bit .NET assembly, and it causes memory corruption leading to all kinds bad behaviors (crash, exceptions out of nowhe[详细]
2023-03-20 07:13 分类:问答Sending WM_KEYUP message to a window gives an OverflowException
I am trying to implement a program that sends the same messages to a window that would be sent if a certain key is continuously pressed.[详细]
2023-03-19 19:07 分类:问答Marshal ByRef Variable-Length Array from COM to C#
I am having trouble getting the managed sig correct for this COM interface any suggestions? MIDL_INTERFACE(\"6788FAF9-214E-4b85-BA59-266953616E09\")[详细]
2023-03-19 17:52 分类:问答Safely use SuppressUnmanagedCodeSecurity
I\'m currently creating a managed wrapper to an unmanaged dll. Point is the wrapper does a TON of calls to the unmanaged dll but exports very few methods itself.[详细]
2023-03-19 06:05 分类:问答How to replicate the file/directory permissions with P/Invoke?
I\'m searching for the solution for hours, but the documentation being sparse, I\'m unable to find what I need.[详细]
2023-03-19 06:04 分类:问答