Pure attraction.
COM programming materials are hard to find and do not know how to find.
In Windows COM programming, BSTR variant ccombstr ccomvariant is a common com variable ..
Come back and make a summary of the usage of the variables.
I don't know much about com, but I have to use it to understand it.
The auth
XPCOMAs a component technology implemented by Microsoft, the component development technology COM in Linux plays an important role in the Windows platform and can be seen in module reuse and cross-language communication. But today I want to introduce the com implementation in Linux ---- XPCOM, which is the basic technology used in the Mozilla Browser project. We can use C ++ to create the XPCOM component, i
generated by a COM object?
Here's the question: how deep is the. NET Framework related to com/com+.
First make a mark, these days to study ...
======================================================
Information, from MSDN:
HRESULT
. NET Exceptions
msee_e_appdomainunloaded
appdomainunloadedexception
cor_e_applicat
Exception Reason:1, wrote a cycle of death, this is the most likely.2, the operation of large data volume, resulting in the status of suspended animation.Solution: Managed Debug Assistants in Debug---Exceptions, remove ContextSwitchDeadlock a front hook.Exception information: The CLR cannot convert from COM context 0x645e18 to COM context 0x645f88, which has lasted for 60 seconds. The thread that owns the t
. messagequeuetransactiontype. Automatic );}}}
Set the assemly strong name;I) create key pair;Prompt command: Sn-K key. SNK;And then key. SNK will be generatedSet assemlyinfo. CS as following:[Assembly: assemblydelaysign (false)][Assembly: assemblykeyfile ("key. SNK")][Assembly: assemblykeyname ("")]Build the project and generate complusservice. dll;
3. register the COM + services;Prompt command: regsvcs complusservice. dll// Exception occurs: the t
Original article: http://www.codeproject.com/Articles/17038/COM-in-plain-C-part-8
Download routine-419kb
Content
Introduction
Script code persistence
Script code and "Naming item"
Call a specific function in the script
Query/set the variable value in the script
Query/set the variable value in the script
Introduction
In the previous chapter, we learned how to create an ActiveX Script Host. Although these chapters cover most of the writing of a
1. hkey_classes_root1> the CLSID subkey records all COM component information:A> the inprocserver32 sub-Key of the CLSID sub-Key of the (in-process component) OBJECT records the full path File Name of the component program;The localserver32 sub-Key of the CLSID sub-Key of the (out-of-process component) OBJECT records the full path File Name of the component program;B> the progid (Program identifier, program identifier) of the CLSID subkey defines the
cannot directly access other interfaces through one interface. However, COM allows customers to call QueryInterface () in the com library to query other interfaces supported by component objects. In this sense, the component object is a bit like the broker of the interface object.After QueryInterface () is called, if the component object supports the interface t
, the stub code will ask your object for this interface and call the marshalinterface method for each required interface. This method will pass in an istream interface pointer, you can set interface-related data (for example, server name, listener port ,...) when this stream is written, the COM Service will pass the content of this stream to the client. The stub code will also call getunexternalclass to obtain a CLSID, which will be used to create a
to make the application programming interfaces more orderly, the organizational hierarchy is more advanced.
In addition to the specifications, Com also has the implementation part, including some core system-level code, which is exactly the core code, in this way, objects can interact with customers at the binary code level through interfaces.
In a Microsoft Windows operating system, these libraries exist as. DLL files, including the following:
(1) A
performance differences, but even if you change the location of other components, you do not have to rewrite anything, this is the key .)COM is based on objects-but this object concept is not the same as the objects in C ++ or Visual Basic that you are familiar. By the way, "object" and "component" are almost the same thing. GUI doctors are willing to say "components" when talking about the structure of the application, but are willing to say "object
. Collect (); 3 iworkspace ws = ((Idataset) FLS). workspace;4 int i = Marshal.ReleaseComObject (WS), 5 6//i has a value of 0.Compare case four, it can be concluded that when the COM object is released in the Dotnet mapping object, the reference count will be reduced by oneScenario Five: Call condition three to get Featureclass method, release get Featureclass, delete mdb file1 Ifeatureclass FLS = GETFCLSS (Mdbpath, Featureclassname); 2
term "Suite", this is only the com Runtime Library (note, not the COM specification, or "com") that uses the suite technology to implement the preceding three thread models, it should be noted that the suite and thread model are not the same concept. There are three types of suites provided by COM, which correspond on
the object is marked as threadingmodel = apartment, the five object instances will be created in the STA of the Object Creator. Because each object instance runs on the thread that occupies its STA, all five object instances can run concurrently.
So far, everything is good. Consider what happens if these object instances share data. Because all objects are executed on concurrent threads, two or more objects may attempt to access the same data at the
between COM, COM +, and local winapi calls and uncontrolled code during runtime. For this reason, Bcl provides a set of classes and attributes, including precise control of the lifetime of the controlled object. To achieve interoperability, you must first introduce the. NET Framework system. runtime. interopservices namespace. C # Syntax:
Using system. runtime. interopservices;
The syntax of VB. NET is:
Im
on the STA and the object is marked as threadingmodel = apartment, the five object instances will be created in the STA of the Object Creator. Because each object instance runs on the thread that occupies its STA, all five object instances can run concurrently.So far, everything is good. Consider what happens if these object instances share data. Because all objects are executed on concurrent threads, two or more objects may attempt to access the sam
can be useful if you want to manually extend some features. COM + WEB Services is a simple wrapper that can be easily extended by developers or administrators through a fairly rich set of services provided by the. NET Remoting.
Server IIS Virtual root
To use this feature, a hidden hook was not added to the. NET Remoting, but COM + code was written to make the necessary configuration to publish the
of code that leads to engineering bloat and bloat. Windows uses DLLs to share code at the binary level. This is also the key to the operation of Windows programs-reuse Kernel32.dll, user32.dll and so on. But DLLs are written for C interfaces and can only be used by C or the language that understands the C call specification. The programming language is responsible for implementing shared code, not the DLLs itself. In this way, the use of DLLs is limited. MFC introduces another MFC extended DLLs
C # series of articles on interoperability:
C # Introduction to interoperability (I): C # Introduction to interoperability
C # Introduction to interoperability series (II): use the platform to call Win32 Functions
C # Introduction to interoperability series (III): data sending and processing in Platform calls
C # Introduction to interoperability series (4): Calling COM components in C #
Summary of this topic:
Introduction
How to call
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.