How can we use COM Components in .NET? | ||
.NET components communicate with COM using RCW (Runtime Callable Wrapper). | ||
Once I have developed the COM wrapper do I have to still register the COM in registry? | ||
Yes | ||
How can we use .NET components in COM? | ||
.NET components can not be used in straight forward way with COM. You will need to create CCW in order that COM components communicate with .NET assemblies. | ||
When we use windows API in .NET is it managed or unmanaged code? | ||
Windows API in .NET is unmanaged code. | ||
What is COM? | ||
Microsoft's COM is a technology for component software development. It is a binary standard which is language independent. DCOM is a distributed extensio of COM. | ||
What is Reference Counting in COM? | ||
Reference counting is a memory management technique used to count how many times an object has a pointer referring to it. The first time it is created, the reference count is set to one. When the last reference to the object is nulled, the reference count is set to zero and the object is deleted. Care must be exercised to prevent a context switch from changing the reference count at the time of deletion. | ||
Can you describe IUKNOWN interface in short? | ||
Every COM object supports at least one interface, the IUNKNOWN interface. All interfaces are classes derived from the base class IUnknown. Each interface supports methods access data and perform operations transparently to the programmer. For Example, IUnknown supports three methods, AddRef,Release(), and QueryInterface(). Suppose that pinterf is a pointer to an IUnknown. pinterf->AddRef() increments the referene count. pinterf->Release() decrements the reference count,deleting the object when the reference count reaches zero. pinterf->QueryInterface(IDesired,pDesired) checks to see if the current interface (IUnknown) supports another interface, IDesired, creates an instance of the object if the reference count is zero and then calls pDesired->AddRef() to increment the reference count and returns the pointer to caller. | ||
Can you Explain what is DCOM? | ||
|
How do we create DCOM object in VB6? | ||
Using the CreateObject method you can create a DCOM object. You have to put the server name in the registry. | ||
How many types of Transactions are there in COM+.NET? | ||
| ||
How do you do object pooling in .NET? | ||
COM+ reduces overhead by creating object from scratch. So in COM+ when object is activated its activated from pool and when its deactivated its pushed back to the pool. Object pooling is configures by using the "ObjectPoolingAttribute" to the class. | ||
What are the types of compatability in VB6? | ||
There are three possible project compatability settings No Compatbility with this setting, new clss ID's,new interface ID's and a new type library ID will be generated by VB each time the ActiveX component project is compiled. This will cause any compiled client components to fail and report a missing reference to the 'VB ActiveX Test Component' when a client project is loaded in the VB IDE Project Compatability With this setting, VB will generate new interface ID's for classes whose interfaces have changed,but will not change the class ID's or the type library ID. This will still cause any compiled client components to fail but will not report a missing reference to the 'VB ActiveX Test Component' when a client project is loaded in the VB IDE. Recompilation of client components will restore them to working order again. Binary Compatability VB makes it possible to extend an existing class or interface by adding new methods and properties etc. and yet still retain binary compatibility. It can do this, because it silently creates a new interface ID for the extended interface and adds registration code to register the original interface ID but with a new Forward key containing the valueof this new interface ID. COM will then substitute calls having the old ID with the new ID and hence applications built against the old interface will continue to work. | ||
What is equivalent for regsvr32 exe in .NET? | ||
Regasm |