devxlogo

The Latest

Canceling a call to a dll

Question: In a program, I’m calling a function in a dll. The time before that function is finished can vary from a few seconds to an hour, depending on the

How to Build an Online Help System

Question: How do I create an online help system to use in VB6? Answer: Try the HTML Help Workshop that ships with VB. It allows you to create a help

Registering DLL Files

Question: When I try to register a DLL I created in VB6, I get the message that tells me the DLL is not a valid windows NT image. At the

Maximum length of SQL

Question: Is there a maximaum length of an SQL program? I have used the query designer in Visual Foxpro 3.0 with many lines of criteria. When I try to run

MicroSoft Visual Foxpro 6.0 Grid Control

Question: I have a grid control on a form in Visual Foxpro. I want to keep it unbound and then later fill it with data. I set the recordsource property

MMX code in C++

Question: I am involved in a project the aim of which is to demonstrate the effectiveness of MMX for image manipulation. For this project I need to write some MMX

Is ‘delete this;’ a good idea?

Question: We have a use counted object with addRef() and removeRef() functions. When the reference count gets to 0, we want the object to be deleted. Is { delete this;

IRQ7 handler

Question: How can I handle in Windows an IRQ7 interrupt, generated by my own measurement device connected to parallel port? It was easy in DOS. Any generic code would be

How to Time a Set of Threads

hen you time a set of threads, you generally want to know thetime elapsed between when the first thread starts and the last threadfinishes. When you time a single thread,

Disconnected Recordsets

ne of the great and flexible features of the amazing elastic ADO recordset is that it can be disconnected from its data source, modified, and reconnected to update the data

What are Lvalues and Rvalues?

An object is a contiguous region of memory storage. An lvalue (pronounced: L value) is an expression that refers to such an object. The original definition of lvalue referred to

Loading Resources With the getResource() Method

Most nontrivial applications are packaged with “resource files,” which are nothing more than files used by the application for various purposes. Some examples of these resources include image (GIF, JPEG)

Fast String Array Load and Save

VB6 offers a couple new string functions that work with string arrays. One of these new string functions, Join, concatenates all the items of an array into an individual string

Yet Another Wrinkle in BCP

It is now easy to create scripts using the functionality in T-SQL to automate the loading of data into SQL Server with the addition of the bulk insert command in

Listing Remote Objects in Registry

When creating programs that use Remote Method Invocation (RMI), you’ll need to obtain a reference to a remote object. Although the name of the specific object will usually be pre-defined

Hexadecimal and Octal Literals

Hexadecimal and octal literals are indicated by special prefixes. A hexadecimal literal is indicated by the ‘0x’ prefix: int n =0x1000; // decimal value of n is 4096 An octal

Create Summary Tables Efficiently

Suppose you have a table that contains transactions for different products and clients. Each day you need to summarize this information. If you need to know the sales figures for

Using Types as Template Parameters

A template can take ordinary types such as int and long as parameters: template class Array // type int used a parameter {/* Related Posts API Resource groupPIVOTing Data in

Event Thread and Painting

Java uses the event thread to notify listeners of events by making calls to methods such as actionPerformed() and itemStateChanged(). However, this same thread is also responsible for repainting components.

Displaying Native SQL

Java Database Connectivity (JDBC) drivers sometimes perform conversions on Structured Query Language (SQL) statements that you execute before sending them to the database. It can be helpful for debugging purposes

Call Functions by Name

JavaScript has a powerful mechanism to create and execute code on the fly using the eval() statement. This statement takes a string as a parameter. This string is then run

Using Roles Properly

SQL Server 7 has taken great strides in improving its security model. Groups have been done away with and replaced by roles. The practical difference lies in the fact that

Use the right type for constants

VB stores symbolic and literal constants internally using the simplest data type possible; this means that most common numeric constants-such as zero or one-are stored as Integers. If you use

Use Sleep API to add pauses to your programs

Don’t use an empty For…Next loop to add pauses to your programs; instead, use the Sleep API function, that releases the CPU and lets other apps in the system effectively

GoSub are slower in compiled programs

In VB applications compiled as native code, GoSubs are 5-6 times slower than calls to regular Subs or Functions; conversely, in p-code they are considerably faster. This is one of