devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

Retrieving Browseforfolder() Files

Question: I’m using a function named Browseforfolders() that uses the following code: Private Declare Function SHBrowseForFolder Lib “shell32.dll” _Alias “SHBrowseForFolderA” (lpBrowseInfo As BROWSEINFO) As Long and the declaration of this

SQL Stored Procedures and VB

Question: How do I run a SQL stored procedure from within Visual Basic? Answer: The easiest way is to use the Execute method of either the Database object (DAO) or

Recognizing variables

Question: I have two varibles, one containing the name of another varible, and one containing a string. How can can I set the varible that’s name is contained in the

Converting a Hex String to Decimal

Question: I have a database of strings of hex numbers and I want to convert them to decimal. There doesn’t seem to be a function for it, but can you

Transfering Records From One DB to Another

Question: I want to Transfer records from one Database table to other Database table but through VB. I can’t write a query such as I can for SQL Server: Insert

Building SQL in Code

Question: I am building an SQL statement to Insert and Update records. If the user enters a double quote mark in the text box the SQL statement treats this as

Pointer to Structure

Question: I have a struct: struct mystruct{ DWORD dw_Id;}*pMystruct; In the following function I want to pass the address of ‘dw_Id’ which is a member of mystruct. How do I

Use of void** in QueryInterface (COM)

Question: When using Queryinterface in COM, why is the interface pointer cast to void** andwhy is it passed as a pointer to a pointer (double indirection)? Answer: This is because

Malloc and Free

Question: If I use malloc locally in a function do I have to use free as well? Won’t someother piece of the application eventually chew up the memory I mallocd,

Changing a DOS Program to a Win32 App

Question: I’ve writen a program that simulates a heat circulation, and one of its functions performs an optimization processwhich uses a lot of dynamic memory. Myquestion is, can I use

CallByName

Question: Is there an equivalent of the CallByName function that returns a list of proprety and method names for an object? Answer: No, there isn’t. If you need that, you

Concrete Class

Question: What is a concrete class? Answer: A class that is neither derived from another class nor is meant to serve as the base for other classes is a concrete

Dead Code

Question: Do you know of a tool that helps to either eliminate or identify dead code? Answer: You don’t need a special tool to detect dead code. Every decent compiler

RuleZero 1.2 for VID 6 Going Open Source

RuleZero 1.2, the easiest and fastest add-on tool for creating database-driven Web pages in Visual InterDev 6 is now free. You can get a copy from Vertigo Software’s site, www.vertigosoftware.com.

Handling string Exceptions

Several member functions of std::string might throw exceptions. For example, if you use a very large number to specify the initial storage size, string’s constructor will throw an exception: string

Iterators Aren’t Pointers

Suppose you define a the following list object and you need the address of one of its elements: std::list li; std::list ::iterator iter = li.begin(); In many contexts, iter functions

Calling a Member Function From a Destructor

It’s perfectly legal to call a member function?virtual or not?from a destructor. However, you should avoid calling a member function that accesses data members that have already been destroyed. For

The Order of Local Objects’ Destruction

On exit from a scope, destructors are called for all local automatic objects that are declared in that scope, in the reverse order of their declaration. For example: void f()

Understanding Default Initialization

A POD (plain old data) type is a union, struct or class with no user-declared constructors, no private or protected non-static data members, no base classes, and no virtual functions.

Understanding Zero Initialization

To zero-initialize an object of type T means that the memory storage occupied by the object is set to binary zeros. More precisely, if T is a built-in data type,

Rounding a Number Up and Down

The standard &ltmath.h> header declares the function ceil() and floor(). These function round the fractional part of a floating point number. ceil() returns the smallest integer that is no less

Declaring a Volatile Member Function

You’re probably familiar with const member functions such as: class A { public: int get_x() const; // can’t change A’s state }; C++ also supports volatile member functions. You declare

The this Pointer

In the body of a non-static member function, the keyword this is a non-lvalue expression whose value is the address of the object for which the function is called. However,

Find Constant Name

Question: Instead of trapping an Error by its value (If err.number=429 then…) I would prefer to use a VB defined Constant Name.I can’t seem to find a way to locate

Databases and Large Amounts of Data

Question: I wrote a VB program that uses MS-Access (MDB) type data base using DAO . The application gathers a huge amount of information (25meg a week) and accesses the

Setting Reminders

Question: I am developing an application in VB which requires Reminders. On the basis of dates input, if the current date goes past the date in the database it should

Initialization of an Array of Classes

Question: A common practice in C is to do something like this to initialize an array of structs: typedef struct {float x,y,z;} Vector3;Vector3 VecList[] = {{1,0,0},{0,1,0},{0,0,1}};// Now VecList[0] = {1,0,0};//