pinvoke
C# P/Invoke [DllImport] - array memory management
I\'m passing a byte[] to a function accepting an unsigned char* One way I can do this is to pass an IntPtr, and allocate/deallocate memory in managed code as follows:[详细]
2023-03-19 04:35 分类:问答Some P/Invoke C# to C marshalling questions working with booleans in structs
I have some problems working with boolean types and marshalling this in a struct back and forth between C# and C. I am very rusty in C but hopefully there\'s nothing crucially wrong in that part.[详细]
2023-03-18 12:09 分类:问答How to check if DLL entry point exists in C# without calling the function
I\'m using OpenTK OpenGL wrapper. Since it loads OpenGL dll (or .so on Linux) it contains a开发者_Go百科 lot of DLL imported functions.[详细]
2023-03-17 10:03 分类:问答Marshalling an MFC CArray to C# through P/Invoke
I am attempting to write a C# class (2010) that allows the usage of functions contained in a legacy C++开发者_开发百科 dll.The functions are exported using __stdcall, and have varying sets of paramete[详细]
2023-03-17 05:27 分类:问答C# P/Invoke for keyboard layout and compiler warnings
I\'m not used to P/Invoke but I should declare a couple of WinAPI functions for getting or setting the keyboard layout. I declared the functions like:[详细]
2023-03-17 04:42 分类:问答How to convert out/ref extern parameters to F#
I\'ve got a C# extern declaration that goes like this: [DllImport(\"something.dll\")] public static extern ReturnCode GetParent(IntPtr inRef, out IntPtr outParentRef);[详细]
2023-03-17 02:23 分类:问答Calling unmanaged C++ library (dll) from C# creates an access violation error (0xc0000005)
Sorry for the long question. I just wanted to include everything that I know about the problem at the moment.[详细]
2023-03-15 09:27 分类:问答Passing managed callback to DllImport (ed) function
I had a piece of code that throwed exception with respect garbage collected delegate being called by unmanaged function. This is the code:[详细]
2023-03-15 09:01 分类:问答Change cursor in window caption
I have a WinForm and now I need to change the cursor when it\'s in the windows caption part. I have some code working, it has 2 problems:[详细]
2023-03-15 06:02 分类:问答Japanese to Romaji with Kakasi
I want to transliterate Japanese to Romaji with Kakasi tool, using C#. For this, I created a wrapper:[详细]
2023-03-15 03:45 分类:问答