Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 24th, 2004, 09:20 PM
Authorized User
 
Join Date: Nov 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default How Could I use C APIs with different DataType??

Hello Everyone,
I know we could use a c API-functions by DllImport attribute,
but there may be some problems.
for example if the c API has a parameter with unsigned char DataType,
However,there is no such datatype in c#,
another example,if the c API has a parameter with 8-bits char,
However,the char DataType in c# is 16-bits.
how could i do when i meet these situations??

I also know we could use MarshalAs attribute with UnmanagedType enum to solve these problems,but could you give me a clear answer to above questions?

I want to use AsAny in UnmanagedType enum,I think it would works ok, Could it??






Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Framework 2.0 for security enhanced APIs zion99 Visual Studio 2005 0 September 4th, 2006 12:21 AM
Accessing Windows Task Manager through APIs vishnu_attur Visual C++ 1 September 1st, 2005 05:31 PM
Using dSign 3.0 APIs in .NET prasanthknair General .NET 0 December 14th, 2004 08:29 AM
using ASP to call DB2 connect APIs beta611 Classic ASP Databases 0 August 20th, 2003 09:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.