October 23, 2002

DevX - Software Development Resource

Dealing with DllImport

Part 1: Although the .NET framework encapsulates a large portion of the Win32 API, it’s sometimes still necessary to call the API from your managed code using the DllImport attribute?and

DevX - Software Development Resource

D

You can use the technique for an “undo” menu/toolbar option. Use a collection instead of a listbox to reduce overhead. Support for both LIFO and FIFO is also included: Public

DevX - Software Development Resource

Get Dynamic Array Information

Use the GetSafeArrayInfo function to rip the lid off a SAFEARRAY. It allows the caller to identify the number of dimensions and number of elements for each dimension (among other

DevX - Software Development Resource

Find the Cause of Query Malfunctions

This tip is for SQL Server 6.5 and up. When debugging a SELECT query, add an absolute true condition as the first condition of the WHERE clause: SELECT au_lname, au_fnameFROM

DevX - Software Development Resource

Return File Version Info

To use the FileSystemObject, you need to reference the Microsoft Scripting Runtime: Public Function GetExecutableFileVersion(ByVal _ Filename As String) As String Dim FileObj As Scripting.FileSystemObject ‘ Create Object Set FileObj

DevX - Software Development Resource

Let MTS Handle Transaction Management

When you call a stored procedure in SQL Server that performs data manipulation on the database from a Microsoft Transaction Server (MTS) transaction, let MTS handle all the transaction management.