Foreword.
Preface.
1. Building Blocks.
Phantom Pointers.
Living Pointers.
VBoost Objects.
2. Leveraging Arrays.
Array Descriptors.
Reading Array Variables.
Writing to Array Variables.
Array Options: Beyond Fixed or Variable Size.
Miscellaneous Tips for Using Arrays.
3. IUnknown: An Unknown Quantity.
VB and IUnknown.
Declaring IUnknown and Calling Its Functions.
4. Binding Functions to Objects.
When are objects bound to?
Name Binding at Runtime.
VTable-Binding Custom Control Interfaces.
5. Object Design Constructs.
Abstraction with Implements.
Pluggability of Calling Code.
Implements and Implementation Reuse.
Aggregation.
6. Circular References.
Intermediate Object Solutions.
Weak References and Collections.
Transferring Object Ownership.
Hierarchical Object Models.
7. External Object Creation.
Object Creation with Class Factories.
Loading DLL Objects Directly.
Custom Loading Custom Controls.
Custom Class Objects.
8. Lightweight COM Objects.
Lightweight Basics.
Termination Code on Structures.
LastIID Lightweight.
ArrayOwner Lightweight.
Where's the Interface?
To Err or Not to Err.
Returning Errors from Lightweights.
Aggregating Lightweight Objects.
Coding the QueryInterface Function.
9. Large Systems of Objects.
Using a Fixed-Size Memory Manager.
Scribble Sample.
10. VB Objects and the Running Object Table.
Registering VB Objects with The ROT.
ROTHook Implementation Details.
11. Calling Function Pointers.
Sample: Calling DllRegisterServer.
Sample: QuickSort, Once and for All.
Function Pointers in VB for Alpha.
Stack Allocation.
Generating Your Own In-Line Assembly.
Pointers to Class Functions.
Using CDECL Functions.
12. Overriding Functions.
Cooperative Redirection.
Interface Wrapping.
Thinner Interface Wrapping.
Wrapping Issues.
13. Threads in VB.
Thread Local Storage.
Can You Avoid the Marshaling Overhead?
To Thread or Not to Thread.
Creating Threads in a Client EXE.
Coordinated Gate-Crashing in STA Apartments.
Creating Worker Threads in DLLs.
14. Strings in VB.
UNICODE Conversions.
String Allocation.
Strings as Numbers.
15. Type Libraries and VB.
VB-Generated Type Libraries.
VB-Friendly Custom Type Libraries.
Binary Compatibility.
Post-Build Type Library Modifications.
16. Controlling Windows.
Subclassing.
Custom Window Creation.
Windowless Controls.
Appendix: VBoost Reference.
Assignment and Arithmetic Functions.
Memory Allocation Objects.
Aggregation Functions.
Index. 0201707128T04062001
In Advanced Visual Basic 6, two of the world's leading VB experts take experienced developers "under the hood" with VB, introducing powerful techniques for writing high-performance, reusable code that leverages the close relationships between VB, COM, and OLE Automation. This book presents advanced VB programming from a COM data type approach, helping developers build more robust, effective code -- and overcome obstacles that appear as they "push the envelope" with VB. Developers learn how VB describes arrays, and how to duplicate that definition manually to perform simple type casting, and gain unprecedented control over how their programs use memory. The authors introduce best practices for interface-based design using normal VB class modules; show how to partition code for optimal reuse; and more. Next, they present advanced techniques for creating COM lightweight objects; and alternate memory management techniques that allow the creation of complex systems with many objects and minimal overhead. The book also covers threading, type libraries, component versioning, and more.
Matthew Curland is a long-time member of Microsoft's Visual Studio
development team. Visual Basic's IntelliSense feature is his most
visible contribution. A frequent and popular speaker at VBITS, he
also contributes black-belt articles to the leading VB journal,
VBPJ, and is the co-author of Object Programming with Visual Basic
4 (Microsoft Press).
0201707128AB04062001
![]() |
Ask a Question About this Product More... |
![]() |