2010年1月9日

A Closer Look at Platform Invoke

摘要: A Closer Look at Platform InvokePlatform invoke relies on metadata to locate exported functions and marshal their arguments at run time. The following illustration shows this process.A platform invoke... 阅读全文

posted @ 2010-01-09 17:59 Acor 阅读(225) 评论(0) 推荐(0) 编辑

WCF 引论

摘要: .NET RemotingThis topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications s... 阅读全文

posted @ 2010-01-09 17:50 Acor 阅读(223) 评论(0) 推荐(0) 编辑

Marshaling Data with Platform Invoke 之五 Miscellaneous Marshaling Samples(用时查阅)

摘要: Miscellaneous Marshaling SamplesFactors such as garbage collection and threading can impact the behavior of the interop marshaler. Further, subtle differences in programming and type models can make p... 阅读全文

posted @ 2010-01-09 17:19 Acor 阅读(173) 评论(0) 推荐(0) 编辑

Marshaling Data with Platform Invoke 之四 Marshaling Arrays of Types

摘要: Marshaling Arrays of TypesAn array is a reference type in managed code that contains one or more elements of the same type. Although arrays are reference types, they are passed as In parameters to unm... 阅读全文

posted @ 2010-01-09 16:14 Acor 阅读(162) 评论(0) 推荐(0) 编辑

Marshaling Data with Platform Invoke 之三 Marshaling Classes, Structures, and Unions(用时查阅)

摘要: Marshaling Classes, Structures, and UnionsClasses and structures are similar in the .NET Framework. Both can have fields, properties, and events. They can also have static and nonstatic methods. One n... 阅读全文

posted @ 2010-01-09 16:06 Acor 阅读(206) 评论(0) 推荐(0) 编辑

Marshaling Data with Platform Invoke 之二 Marshaling Strings (用时查阅)

摘要: Marshaling Strings(需懂原理、知其大略,不要陷于细节。用时查阅)Platform invoke copies string parameters, converting them from the .NET Framework format (Unicode) to the unmanaged format (ANSI), if needed. Because managed s... 阅读全文

posted @ 2010-01-09 15:13 Acor 阅读(225) 评论(0) 推荐(0) 编辑

Marshaling Data with Platform Invoke 之一 Platform Invoke Data Types

摘要: Platform Invoke Data TypesThe following table lists data types used in the Win32 API (listed in Wtypes.h) and C-style functions. Many unmanaged libraries contain functions that pass these data types a... 阅读全文

posted @ 2010-01-09 14:53 Acor 阅读(156) 评论(0) 推荐(0) 编辑

Marshaling Data with Platform Invoke 概览

摘要: Marshaling Data with Platform InvokeTo call functions exported from an unmanaged library, a .NET Framework application requires a function prototype in managed code that represents the unmanaged funct... 阅读全文

posted @ 2010-01-09 14:48 Acor 阅读(219) 评论(0) 推荐(0) 编辑

Calling a DLL Function 之三 How to: Implement Callback Functions

摘要: How to: Implement Callback FunctionsThe following procedure and example demonstrate how a managed application, using platform invoke, can print the handle value for each window on the local computer. ... 阅读全文

posted @ 2010-01-09 11:39 Acor 阅读(259) 评论(0) 推荐(0) 编辑

Calling a DLL Function 之二 Callback Functions

摘要: Callback FunctionsA callback function is code within a managed application that helps an unmanaged DLL function complete a task. Calls to a callback function pass indirectly from a managed application... 阅读全文

posted @ 2010-01-09 11:30 Acor 阅读(199) 评论(0) 推荐(0) 编辑

Calling a DLL Function 之一 Passing Structures

摘要: Passing StructuresMany unmanaged functions expect you to pass, as a parameter to the function, members of structures (user-defined types in Visual Basic) or members of classes that are defined in mana... 阅读全文

posted @ 2010-01-09 11:26 Acor 阅读(286) 评论(0) 推荐(0) 编辑

To consume exported DLL functions 之四 Call a DLL function

摘要: Calling a DLL FunctionAlthough calling unmanaged DLL functions is nearly identical to calling other managed code, there are differences that can make DLL functions seem confusing at first. This sectio... 阅读全文

posted @ 2010-01-09 11:13 Acor 阅读(182) 评论(0) 推荐(0) 编辑

导航