Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

Caveats of the CopyMemory API function
Total Hit (4112) Here's the correct declaration of the CopyMemory API function, which is so useful whenever you want to move a block of bytes between two memory locations: «Code LangId=2» Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As Any, _ source As Any, ByVal bytes As Long) «/Code ....Read More
Rating
Determine whether an API function is available
Total Hit (3462) In many cases you may want to call an API function, but you aren't sure whether the Windows version the application is running on supports that particular function. The easiest way to test whether a function exists and can be called is to replicate through VB code what Windows itself would do whe ....Read More
Rating
Extract null-delimited strings
Total Hit (3630) Most API function that return a string require that you pass a buffer where they can place the result as a null-terminated ANSI string (a.k.a. ASCIIZ string). The calling code must then extract the string by taking all the characters up to the first Chr$(0) character, if there is one. For example, t ....Read More
Rating
Never use the GetLastError API function
Total Hit (3712) If you heavily use API calls and strictly follow the SDK documentation, you might be tempted to use the GetLastError API to retrieve the error returned by your last API function or procedure. However, this function doesn't always return valid error codes, because Visual Basic internally does a lot o ....Read More
Rating
Use Currency instead of LARGE_INTEGER values
Total Hit (3319) A few API calls require that you pass one or more LARGE_INTEGER arguments. These are 64-bit integer values, defined as follows: «Code LangId=1» Type LARGE_INTEGER lowpart As Long ' lower 32-bit value highpart As Long ' higher 32-bit value End Type «/Code» Unfortunately, wor ....Read More
Rating
Reduce activation delays by sorting DCOM protocol list properly
Total Hit (1887) When the client and the server machine have different communication protocol lists you can experience serious delays when the client tries to instantiate an object on the server, and you can even get an error if the two protocol lists don't have any protocol in common. For best response times, us ....Read More
Rating
Avoiding Access Denied erros when raising events from MTS objects
Total Hit (3075) If you don't take specific actions, you get an Access Denied Error when you try to raise an event from an MTS component into a client. This happens because the client executable doesn't have the proper DCOM security settings to let the server call it back. In order to have it working you have two so ....Read More
Rating
Be careful in using CreateObject with two arguments
Total Hit (3001) 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 "Application Pro ....Read More
Rating
Disable COM+ 1.5 applications and components
Total Hit (2833) COM+ 1.5 (provided with Windows XP) has an interesting feature that is missing in COM+ 1.0: the ability to disable entire COM+ applications or just their individual components. You can disable and re-enable a COM+ application or component by right-clicking on it in the Component Services MMC explore ....Read More
Rating
Don't let binary compatibility beat you
Total Hit (2757) When you decide to release a new version of an MTS/COM+ component you should take care of its compatibility with the previous version. There are three types of changes you could make: (1) You change only internal code of a component, keeping the interface that the component provides untouched. ( ....Read More
Rating
Don't store object variables in the SPM
Total Hit (2602) Some MTS/COM+ newbies wonder whether it is legal to store object variables in the SPM. No, you can't!! the SPM is unaware of Apartment marshaling issues. If you ask the SPM for an interface pointer while running in an apartment that is different from the one where the interface pointer resides t ....Read More
Rating
Don't use global variables in MTS/COM+ projects
Total Hit (2629) Public variables at module level are thread specific. Each new thread starts get a new fresh & uninitialized copy of such variables. All the activities that are born from the same object context always run in the same apartment (You can confirm this by checking the thread ID) as if the object contex ....Read More
Rating
Generating IDL code to overcome binary compatibility issues
Total Hit (3491) 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 it si ....Read More
Rating
GetObjectContext.CreateInstance is obsolete in COM+
Total Hit (3540) 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 wrapper t ....Read More
Rating
Improve availability by running a COM+ app as an NT service
Total Hit (1748) 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 can ....Read More
Rating
Make COM objects in a COM+ application visible to clients
Total Hit (1733) 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 application proxy, ....Read More
Rating
Misconceptions on variables and binding
Total Hit (1800) Consider this line of code: Dim x as Project1.Class1 Many developers think that we were declaring x as a "Project1.Class1" object. This is wrong. All object variables in VB are interface variables. In this line of code x is declared as the _Class1 interface defined in the Project1 Type librar ....Read More
Rating
Never use New to create MTS/COM+ objects
Total Hit (1815) A common question among VB developers is: Why is it dangerous the use of the New keyword in VB to create COM objects registered under MTS/COM+? The New keyword is the only way to go when you want to create objects that are defined as PublicNotCreatable or Private (CreateObject doesn't work) insid ....Read More
Rating
Reduce COM+ context overhead: use non configured classes
Total Hit (1598) 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 deployment and ....Read More
Rating
Reduce context overhead for COM+ components
Total Hit (1469) 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 is whe ....Read More
Rating
Replicate a complete COM+ catalog to another machine
Total Hit (1792) 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:\windows\system32\com directory. ....Read More
Rating
Setting authentication across different domains
Total Hit (1432) 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 client ....Read More
Rating
The best setting for the RunAs option in a server package
Total Hit (1726) When you deploy COM objects in DLLs no security issues arise since DLLs run in the process of the caller. On the contrary, when you deploy your COM objects into an .EXE, you have to deal with such issues. - (D)COM needs to know under what security principal (read identity) the process, where you ....Read More
Rating
Tips for debugging MTS components in the VB IDE
Total Hit (1554) 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 preparin ....Read More
Rating
Setting authentication across different domains
Total Hit (1634) 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 client ....Read More
Rating
Avoid duplicate entries for the same serviced component
Total Hit (2615) 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 new v ....Read More
Rating
Reduce COM+ context overhead: activate in the caller's context
Total Hit (2687) 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. In ....Read More
Rating
Reduce COM+ context overhead: use modules and shared members
Total Hit (2718) 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: «Code LangId ....Read More
Rating
Select the transaction isolation level and timeout in a serviced component
Total Hit (2949) 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: «Code LangId=2» Imports System.EnterpriseServices < Transaction()> Public Class BankTransfer Inherits ServicedC ....Read More
Rating
Support COM+ constructor strings in serviced components
Total Hit (2798) 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. ....Read More
Rating


(Page 115 of 133) 3968 Result(s) found  ... 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ...

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.