| help | account  


Advanced Visual Basic 6: Power Techniques for Everyday Programs
View Larger Image
Matthew Curland
Addison-Wesley, Paperback, Published July 2000, 494 pages, ISBN 0201707128
List Price: $39.95
Our Price: $27.95
You Save: $12.00 (30% Off)


FREE Shipping on Orders over $40!*
Availability: Out-Of-Stock

Customer Reviews: 1     Average Customer Rating:

Write a Review and tell the world about this title!

People who purchase this book frequently purchase:

Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:

In Advanced Visual Basic 6, leading Visual Basic expert Matthew Curland demonstrates powerhouse techniques programmers can use to write high-performance, robust, and reusable VB code. Readers learn how to leverage the close relationships between VB, COM, and OLE Automation, extending the envelope of VB's capabilities and building high-quality, object-based systems.

Key topics include how to:

  • Control VB array variables explicitly to directly access arbitrary memory locations
  • Call pointers to standard, cdecl, and class module functions
  • Aggregate complete interface implementations into any VB object
  • Override functions on any interface, including those implemented automatically by VB
  • Turn any user-defined type into a lightweight COM object
  • Minimize memory usage in systems with a large number of objects
  • Safely create and manage threads in ActiveX EXEs and DLLs
  • Interact with messages to customize windowed and windowless UserControl objects

With this compendium of best practices, sophisticated techniques, and valuable utilities, VB programmers will gain a deeper understanding of VB's inner workings and be able to extend its object-oriented capabilities.


Table of Contents

Foreword xiii
Preface xvii

1 Building Blocks 1
Phantom Pointers 2
Living Pointers 3
VBoost Objects 9

2 Leveraging Arrays 11
Array Descriptors 12
Reading Array Variables 16
Writing to Array Variables 19
Array Options: Beyond Fixed or Variable Size 27
Miscellaneous Tips for Using Arrays 37

3 IUnknown: An Unknown Quantity 41
VB and IUnknown 43
Declaring IUnknown and Calling Its Functions 48

4 Binding Functions to Objects 53
When are objects bound to? 56
Name Binding at Runtime 60
VTable-Binding Custom Control Interfaces 65

5 Object Design Constructs 73
Abstraction with Implements 75
Pluggability of Calling Code 78
Implements and Implementation Reuse 81
Aggregation 89

6 Circular References 101
Intermediate Object Solutions 105
Weak References and Collections 110
Transferring Object Ownership 111
Hierarchical Object Models 112

7 External Object Creation 119
Object Creation with Class Factories 121
Loading DLL Objects Directly 125
Custom Loading Custom Controls 130
Custom Class Objects 138

8 Lightweight COM Objects 143
Lightweight Basics 144
Termination Code on Structures 153
LastIID Lightweight 156
ArrayOwner Lightweight 158
Where's the Interface? 161
To Err or Not to Err 162
Returning Errors from Lightweights 165
Aggregating Lightweight Objects 173
Coding the QueryInterface Function 178

9 Large Systems of Objects 183
Using a Fixed-Size Memory Manager 186
Scribble Sample 188

10 VB Objects and the Running Object Table 203
Registering VB Objects with The ROT 205
ROTHook Implementation Details 211

11 Calling Function Pointers 227
Sample: Calling DllRegisterServer 231
Sample: QuickSort, Once and for All 235
Function Pointers in VB for Alpha 239
Stack Allocation 241
Generating Your Own In-Line Assembly 247
Pointers to Class Functions 255
Using CDECL Functions 258

12 Overriding Functions 261
Cooperative Redirection 262
Interface Wrapping 265
Thinner Interface Wrapping 272
Wrapping Issues 276

13 Threads in VB 279
Thread Local Storage 281
Can You Avoid the Marshaling Overhead? 283
To Thread or Not to Thread 283
Creating Threads in a Client EXE 286
Coordinated Gate-Crashing in STA Apartments 307
Creating Worker Threads in DLLs 310

14 Strings in VB 357
UNICODE Conversions 360
String Allocation 363
Strings as Numbers 369

15 Type Libraries and VB 379
VB-Generated Type Libraries 380
VB-Friendly Custom Type Libraries 387
Binary Compatibility 410
Post-Build Type Library Modifications 417

16 Controlling Windows 421
Subclassing 423
Custom Window Creation 433
Windowless Controls 443

Appendix: VBoost Reference 449
Assignment and Arithmetic Functions 451
Memory Allocation Objects 457
Aggregation Functions 459

Index 477


Customer Reviews

Customer Reviews: 1     Average Customer Rating:

Sep 28, 2000     Scott Newman (newm0004@hotmail.com) from USA
Oh, my, god
Only get this book if you want to go past you average vb programmer. I've heard it said that Matt Curland has forgotten more about VB than most people know. Believe it. Stuff you thought impossible in VB is now possible thanx to Matt. Incredible book.



Forgot your password?
FAQs
Shipping Options
Returns
Your Orders
Your Account