October 2, 2000

Sizeof Structure as Defined, Not Allocated

Question: Given: pre>typedef struct{ byte a; byte b; byte c; byte d; byte e;} LETTERS; sizeof(LETTERS) returns eight bytes because of padding by the compiler for alignment.How can I determine how many bytes were actually defined, not allocated? Answer: There is no standard function or operator to detect how many

Static Memory or Heap?

Question: When I creating a class, I declare several large arrays, and some integers within one ofof class function members.Within main, I call new, making the object declared on the heap. Are the arrays and interges also delcared on the heap? Answer: It depends on how you declared these variables

MTS Objects Containing ADO

Question: I have an MTS object that contains an ADO connection object which I use in an ASP page. I look at the MTS console and confirm that the package gets activated, and I use ODBC performance-monitoring counters to verifty a connection gets pooled. But when I manually shutdown the

ListFileExtensions – Retrieve information about all registered file extensions

‘ List all the File extensions that are registered in the system” return a bi-dimension string array, where’ arr(0, i) is the file extension’ arr(1, i) is the coresponding ProgID’ arr(2, i) is the associated description’ arr(3, i) is the location of the executable file” Example:’ ‘ fill a listbox

Paranoid and Proud of It: Part I

t is a natural tendency?and normally a very healthy attitude?to look for the best in any situation, to be optimistic about opportunities and life in general. However, when it comes to contingency planning for mission-critical systems, such an attitude can be deadly. I was reminded of this fact during the

New PL/SQL Features in Oracle 8i: Part I

L/SQL is Oracle’s procedural extension to industry-standard SQL. Prior to Oracle 8i, PL/SQL was in a sort of static condition. It has not been changed much since Oracle 7. I believe one of the main factors that pushed the Oracle PL/SQL team to make significant enhancements was the introduction of