G
Guest
Cross-posting from the csharp newsgroup,
Are there any restrictions in using MarshalAs when p/invoke-ing from a class
library as opposed to a windows application in .NET CF 2.0?
The following code will not compile in a CF class library with the error
MarshalAs not found. The same code runs happily in both a Windows
Applicationa and a standard class library.
Is there a simple fix (other than pinvoking only from a .EXE file)?
using System.Runtime.InteropServices;
....
[DllImport("my.dll", CharSet = CharSet.Unicode)]
public static extern bool Test1([In, Out, MarshalAs UnmanagedType.U4)]
ref uint testValue)
Thanks,
Peter
Are there any restrictions in using MarshalAs when p/invoke-ing from a class
library as opposed to a windows application in .NET CF 2.0?
The following code will not compile in a CF class library with the error
MarshalAs not found. The same code runs happily in both a Windows
Applicationa and a standard class library.
Is there a simple fix (other than pinvoking only from a .EXE file)?
using System.Runtime.InteropServices;
....
[DllImport("my.dll", CharSet = CharSet.Unicode)]
public static extern bool Test1([In, Out, MarshalAs UnmanagedType.U4)]
ref uint testValue)
Thanks,
Peter