Search - Articles - Dev Forums - Favorites - Member Login  
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Monday, March 15, 2010

Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Life runs on code. Find out how Visual Studio 2010 can help you realize your vision. Learn more...

Home > Search > Articles & Samples > .NET Framework > .NET General
Search:
What's New - What's Hot
Listings for Interview Interview (12)
 


Using a Substitute Marshaler    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 1 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

Once the marshaler is complete, it can be used as a custom wrapper for a particular type. The following example shows the managed interface definition IUserData:...

Defining the Marshaling Type    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 1 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

Before you can build a marshaler, you must define the managed and unmanaged interfaces being marshaled. These interfaces commonly perform the same function, but are exposed differently to managed and unmanaged objects....

Code Samples    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 1 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

The Windows Mobile Version 5.0 Software Developer's Kit (SDK) ships with over a hundred code samples. These are working applications that can help you learn to develop software for the Windows Mobile 5.0 platform. To use them, you need Visual Studio 2005, either the Windows Mobile Version 5.0 Pocket PC SDK or the Windows Mobile Version 5.0 Smartphone SDK, and ActiveSync Version 4.1. For more information on these and other Windows Mobile development tools, visit the Mobile Developer Center on MSD...

Inheritance, Aggregation, and Containment    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

When managed interfaces are exposed to COM, they always extend IUnknown or IDispatch, even when the interface is inherited from another interface on the managed side. The same rule applies to the class interfaces that are generated for managed classes. The .NET Framework extends the COM model for reusability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM coclass; more specifically, they can derive from the runtime callable wrapper generated by th...

How to: Obtain Type and Member Information from an Assembly    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

The System.Reflection namespace contains many methods for obtaining information from an assembly. This section demonstrates one of these methods. For additional information, see Reflection Overview....

COM Wrappers    Version: 0.00       Price: $0.00   
Total Hits: 2  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

COM differs from the .NET Framework object model in several important ways:
* Clients of COM objects must manage the lifetime of those objects; the common language runtime manages the lifetime of objects in its environment.
* Clients of COM objects discover whether a service is available by requesting an interface that provides that service and getting back an interface pointer, or not. Clients of .NET objects can obtain a description of an object's functionality using reflection....

How to: Create Wrappers Manually    Version: 0.00       Price: $0.00   
Total Hits: 2  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

If you decide to declare COM types manually in managed source code, the best place to start is with an existing Interface Definition Language (IDL) file or type library. When you do not have the IDL file or cannot generate a type library file, you can simulate the COM types by creating managed declarations and exporting the resulting assembly to a type library....

Interoperating Using Generic Types    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 0 Author: micro       Rating:  
Read Reviews | Write Review |   Your Rating: 

The following actions are not supported and will fail with an E_NOINTERFACE error:
* Accessing generic interfaces from COM.
* Accessing class interfaces for nongeneric classes that derive from generic classes.
* Generating class interfaces for generic classes. For example, the _MyGenericType interface cannot be generated for the MyGenericType T class....

How to: Map HRESULTs and Exceptions    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

COM methods report errors by returning HRESULTs; .NET methods report them by throwing exceptions. The runtime handles the transition between the two. Each exception class in the .NET Framework maps to an HRESULT.

User-defined exception classes can specify whatever HRESULT is appropriate. These exception classes can dynamically change the HRESULT to be returned when the exception is generated by setting the HResult field on the exception object. Additional information about the exception i...

Interop Marshaling Overview    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

Most data types have common representations in both managed and unmanaged memory. The interop marshaler handles these types for you. Other types can be ambiguous or not represented at all in managed memory. An ambiguous type can have either multiple unmanaged representations that map to a single managed type, or missing type information, such as the size of an array. For ambiguous types, the marshaler provides a default representation and alternative representations, where multiple representatio...

Imported Module Conversion    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

A type library can have one or more modules containing the definitions of constants and methods. Constants defined within modules are imported as public constant static members of a class with the same name as the original module. Constants defined outside of a module are not imported....

Imported Type Conversion    Version: 0.00       Price: $0.00   
Total Hits: 1  |  Today: 0 Author: Microsoft Corporation       Rating:  
Read Reviews | Write Review |   Your Rating: 

In general, Tlbimp.exe imports types with the same name they had in the original type library. Names within a type library must be unique, thereby eliminating naming conflicts during the conversion process. All valid type-library names are valid assembly names.

Imported types are scoped by the namespace to which they belong, which is the same as the original type library. Types are individually identified by their complete namespace and type names....



DevASP.Net - Disclaimer - Privacy
© 2002-2010 DevASP.net