January 19, 2000

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

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,