devxlogo

Tip Bank

Run a VB Application During Start-up

Depending on the version of Windows targeted, there are two different ways to run a VB application during the boot process.Under Windows 9x systems, place a Shell command in the

CheckWindowsUser – Validate a username/password pair

Private Declare Function LogonUser Lib “Advapi32” Alias “LogonUserA” (ByVal _ lpszUserName As String, ByVal lpszDomain As String, _ ByVal lpszPassword As String, ByVal dwLogonType As Long, _ ByVal dwLogonProvider As

“Setter” and “Getter” Member Functions

Encapsulation is a fundamental principle in object orientation. Encapsulation restricts direct access to a data member of a class. Instead, users query the object itself in order to get or

Streams and Pointers

Look at the following program. It compiles correctly under every standard-conforming compiler. At first, this may seem surprising because seemingly, because it’s impossible delete an object which is not a

auto_ptr and Derived Objects

The auto_ptr class template respects polymorphism and destroys derived objects of base pointers properly. In the following program, an auto_ptr is actually bound to a B * pointer, where B

Qualified Calls

A function call such as the following: classname::funcname(); is a qualified call. Qualified disambiguate function names. They are needed, for instance, in a class that inherits from several base classes,

Accessing Static Class Members

Because static class members are not associated with a particular object of their class, you can access them even if you haven’t instantiated any object. In the following example, the

Emitting a Beep

The escape sequence ‘a’ is the ASCII code for a beep. To emit a beep from your program, output this escape sequence to the standard output. For example: const char