R
rob.zumwalt
Hi All,
I have written a wrapper around a C++ class to make it available to C#,
built into a dll. This has gone just fine, but one of the methods in
the C++ class takes a FILETIME pointer as an argument (from windows.h).
For example:
timer.h (C++)
------------
#include "windows.h"
public __gc class foo
{
public:
static void getTime( FILETIME * );
}
However, the problem is when I try to call this from C# (in an unsafe
method). My call to it looks like:
needsTime.cs (C# .NET 2.0)
---------------------
using System.Runtime.InteropServices.ComTypes;
<snip />
FILETIME myTime = new FILETIME();
foo.getTime( &myTime );
Building this produces the following error, which I cannot seem to
resolve:
Argument '1': Cannot convert from
'System.Runtime.InteropServices.ComTypes.FILETIME*' to '_FILETIME*'
Any thoughts?
Thanks in advance!
-Rob
I have written a wrapper around a C++ class to make it available to C#,
built into a dll. This has gone just fine, but one of the methods in
the C++ class takes a FILETIME pointer as an argument (from windows.h).
For example:
timer.h (C++)
------------
#include "windows.h"
public __gc class foo
{
public:
static void getTime( FILETIME * );
}
However, the problem is when I try to call this from C# (in an unsafe
method). My call to it looks like:
needsTime.cs (C# .NET 2.0)
---------------------
using System.Runtime.InteropServices.ComTypes;
<snip />
FILETIME myTime = new FILETIME();
foo.getTime( &myTime );
Building this produces the following error, which I cannot seem to
resolve:
Argument '1': Cannot convert from
'System.Runtime.InteropServices.ComTypes.FILETIME*' to '_FILETIME*'
Any thoughts?
Thanks in advance!
-Rob