Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > COM/DCOM/COM+

COM/DCOM/COM+ - Page 2

dcom
21-40 of 116     Previous     Next
Improve availability by running a COM+ app as an NT service
by Francesco Balena
COM+ 1.5 has the ability to run any server application as a NT service, so that the application is up and running when the machine reboots, before any client makes the first requests. This improves the response time of the COM+ application. Besides, running a COM+ app as a service means that it ...
Select the transaction isolation level and timeout in a serviced component
by Francesco Balena
Writing a transactional COM+ component with VB.NET is as simple as applying the Transaction attribute to a class that inherits from System.EnterpriseServices.ServicedComponent: Imports System.EnterpriseServices < Transaction()> _ Public Class BankTransfer Inherits ...
Support COM+ constructor strings in serviced components
by Francesco Balena
Having a VB6 component support a COM+ construction string requires that you implement the IObjectConstruct interface and its only method, Construct. The .NET ServicedComponent class implements this interface internally and expose the Construct method as a protected, overridable method. Thus your VB.
Take advantage of COM+ object pooling
by Francesco Balena
VB6 objects can't be pooled under COM+, because they are apartment threaded. This restriction is void with VB.NET objects (and all .NET objects in general), because they are free-threaded. To make an object poolable you just need to decorate the class with the ObjectPooling attribute:
Be careful in using CreateObject with two arguments
by Enrico Sabbadin
If you install a COM+ application proxy on a client and open its Properties dialog, you'll see that the field "Remote Server Name" is set to the server where you created and exported the application. Before you export the component, you can also change the server name by setting the ...
Replicate a complete COM+ catalog to another machine
by Francesco Balena
The Component Services MMC gives you an easy way to export and import COM+ applications. However, if you want to export the entire COM+ catalog to one or more systems on your LAN you can do it quickly with the COMREPL command-line utility, which you can find in the c:\windo
Reduce COM+ context overhead: activate in the caller's context
by Jimmy Nilsson
Even though you may want to use some COM+ services, it doesn't mean that you have to have a unique context for each and every instance. The root instance, that is, the instance that the client uses, must have a context, but the secondary instances can often co-locate within the first context. ...
Reduce COM+ context overhead: use modules and shared members
by Jimmy Nilsson
If you use Shared members in .NET or modules in VB6, you reduce COM+ context overhead without any risk whatsoever that you will get extra context overhead for that code. You also release yourself from the clean-up burden that you have in both worlds. Instead of the VB6 consumer code:
Reduce COM+ context overhead: use non configured classes
by Jimmy Nilsson
In another item in this Tip Bank (see link below), we mention that you can co-locate secondary instances within the context of the caller. If you don't need any services at all for your secondary components, then you don't have to configure them as COM+ components either. You lose the ...
Reduce context overhead for COM+ components
by Jimmy Nilsson
Instances of configured components, that is, components configured in COM+, get runtime services owing to context objects. When you instantiate a COM+ component, your instance will live in a context object. When you call a method of your instance, the call will go through the context and that ...
Release COM objects earlier
by Francesco Balena
If you're using a COM object through COM Interop you should be aware that the object isn't released as soon as you set it to Nothing, as it happens with VB6. Instead, the object will be released only at the first garbage collections that occurs after the object is set to Nothing or goes out of ...
Avoid duplicate entries for the same serviced component
by Francesco Balena
A common mistake when creating a .NET component that runs under Component Services - that is, a class that inherits from ServicedComponents - is that you forget to assign a fixed version and/or GUID to the component being built. In this case, whenever the assembly is modified and recompiled, a ...
Generate a Multi-Level Tree Structure Map that Names All Include Files
by Lars Christiansen
Visio will search the connections between all of the <!--#includes virtual=”blah blah blah.asp”--> attributes branching off from the file in which you are interested. However, ...
Trim the Contents of HTML Form Elements
by Narender Saraswati
To use this tip, the HTML form element which is required for Null Check should assign the title property some value concatenated with "C." For ...
Tips for debugging MTS components in the VB IDE
by Enrico Sabbadin
It was and it is still easy to debug MTS components written on Visual C++ version 5 and higher. Debugging components written on Visual Basic 5 is possible under VC IDE. Starting with version 6, Visual Basic allows to debug under its own IDE. Here are the things you should keep in mind while ...
Generating IDL code to overcome binary compatibility issues
by Enrico Sabbadin
Among the different COM details that VB hides to the programmers, one of the most problematic one is that it doesn't let you take control on interface GUIDs. Binary compatibility settings in VB try to make you follow COM rules (as a fact breaking such rules with the interface forward mechanism ...
GetObjectContext.CreateInstance is obsolete in COM+
by Enrico Sabbadin
CreateInstance was necessary in COM to provide a COM object activation mechanism that could be hooked by the MTS runtime before the activation request reached the COM runtime. So that MTS could apply some pre and post activation magic to put a wrapper around the real object and return this ...
Make COM objects in a COM+ application visible to clients
by Enrico Sabbadin
What I describe for COM+, applies to MTS with some slight differences as well. Registering COM objects remotely has been quite a pain before MTS showed up (remember the VBR file?). In COM+ it's very easy to do: 1) Right click on the COM+ application and choose export Choose ...
Setting authentication across different domains
by Enrico Sabbadin
COM doesn't have a built in security mechanism, but relies on Windows authentication services (Security Service Providers). When you access a resource or invoke a method in a remote DCOM server (or MTS package / COM+ Application), security checks cannot be performed in the standard way if the ...
Understanding interface marshaling
by Enrico Sabbadin
There is quite a lot of misunderstanding among COM newbies about what really happens when a COM interface is passed as a method parameter. As in most of the cases, VB programmers are protected from a lot of details on the COM run-time, but you do have to know such details if you want to ...
21-40 of 116     Previous     Next
Sitemap