August 7, 1999

Determine whether a folder is shared

The Windows shell provides a simple way to detect whether a given folder is shared or not. You must call the SHGetFileInfo() API function and analyze the way it fills out a given structure. Type SHFILEINFO hIcon As Long iIcon As Long dwAttributes As Long szDisplayName As String * MAX_PATH

Find out the Windows version a program require

Not all programs may run on all the Windows platforms. Often programs require at least a certain version of Windows. In most cases, this is due to the lack of specific functions in the SDK.Anyway, to detect yourself whether a given EXE file can run under the current version of

Display the Find system dialog

If you ever needed to programmatically enable your users to search for files, you certainly found useful the possibility of reusing the system Find dialog integrated in the Start menu and also available through the F3 key within the Explorer. The key to obtain such a dialog is the ShellExecute

Determine whether a program is 16- or 32-bit

Even if we’re living in a 32-bit world, and closer and closer to the 64-bit day, 16-bit programs are still running out there. Knowing whether a given EXE is 32-bit or not can be useful when you have to arrange version checking routine, for example to detect which version of

Provide a free preview of Office Documents

NOTE that this tip requires Windows 98, Windows 2000, Windows 95/NT 4.0 + Active Desktop.If your application must do a lot of work with Office documents, then chances are that you might need to provide a quick preview of them. I’m not talking about scrolling pages up and down as

Use Cogetclassobject Instead Of Cocreateinstance While Creating COM Components

In most cases, you can use CoCreateInstance and forget about CoGetClassObject.Function CoGetClassObject returns the pointer to the desired component’s classfactory and not the component itself. The desired component is created using thethe pointer returned from the function CoGetClassObject while theCoCreateInstance returns the requested interface pointer to that component (itcreates the

Use Unicode Strings in SQL Intelligently to Save on Storage

Unicode characters use more storage space than characters in a regular SQLServer character set use. A regular SQL Server character set is a single-byte set that supports up to 256 characters. Unicode is a double-byte set that supports as many as 65,536 distinct values. Each stored character in the extra