January 19, 2000

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

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


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