-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I have an unmanaged struct I'd like to marshal to c# that looks basically like this:
struct DateTimeStruct{
double datetimestamp;
};
struct MyStruct{
char firstname[40];
char lastname[40];
DateTimeStruct bday;
unsigned integer bool1;
int val1;
};
What is the the correct…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am having an interesting problem with using pinvoke in C# to call _snwprintf. It works for integer types, but not for floating point numbers.
This is on 64-bit Windows, it works fine on 32-bit.
My code is below, please keep in mind that this is a contrived example to show the behavior I am seeing…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
From version to version of .NET the more function that's equal to P/Invoke is added to .NET
Now there are 2 questions in my mine.
1) Which one is prefer other the other in term of speed, normally I use .Net function but in tight loop I don't really know which one is going to be faster.
2) Is there…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Good afternoon,
I have been working on a dll that can use CORBA to communicate to an application that is network aware. The code works fine if I run it as a C++ console application. However, I have gotten stuck on exporting the methods as a dll. The methods seems to export fine, and if I call…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Here is my code for a ClickMouse() function:
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
private const long MOUSEEVENTF_LEFTDOWN…
>>> More