|
-
Feb 21st, 2004, 07:34 PM
#1
Thread Starter
Frenzied Member
Marshaling Data Types in the Compact Framework
I've read that, with the compact framework, MarshalAs is not available and the only automaticly marshaled types when using P/Invoke is:
C# C++
=== ===
int int
short short
bool BYTE
char WCHAR
I have a UINT32 in C++ and UInt32 in C#. Testing a function call in both C++ and C# gives different results when UINT is used.
Might be bad code on my part, or might have something to do with the above.
This particular book (Microsoft .NET Compact Framework, Microsoft Press, by Wigley and Wheelwright) says that to marshal other value types it must be "performed explicitly in managed code."
Now my questions:
- I'm wondering if I understand this correctly - would it be technically correct to ask the .dll vendor if they plan to ship a "C#.NET Compact Framework compatible version"?
- If they don't and I still want to wrap the .dll, I'm thinking of creating another .dll that only deals with automatically marshaled types, and acts as an intermediary between their .dll and C# - does this idea have merit?
TIA,
Mike
Last edited by Mike Hildner; Feb 21st, 2004 at 07:44 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|