Posted on

Advanced Visual Basic 6: power techniques for everyday by Matthew Curland

By Matthew Curland

In complicated visible uncomplicated 6, major visible simple specialist Matthew Curland demonstrates powerhouse suggestions programmers can use to put in writing high-performance, strong, and reusable VB code. Readers how to leverage the shut relationships among VB, COM, and OLE Automation, extending the envelope of VB's functions and development top of the range, object-based platforms. Key subject matters comprise how to:* regulate VB array variables explicitly to at once entry arbitrary reminiscence destinations* name tips to ordinary, cdecl, and sophistication module services* mixture whole interface implementations into any VB item* Override services on any interface, together with these carried out immediately through VB* flip any user-defined variety right into a light-weight COM item* reduce reminiscence utilization in structures with a good number of items* properly create and deal with threads in ActiveX EXEs and DLLs* have interaction with messages to customise windowed and windowless UserControl objects.The website accompanying this booklet includes broad resource code samples to let all thoughts with out exterior DLLs. It additionally presents built-in sort library add-ins for growing and enhancing referenced libraries, enhancing binary compatibility documents, and customizing the sort libraries that VB generated for ActiveX elements. With this compendium of most sensible practices, subtle suggestions, and precious utilities, VB programmers will achieve a deeper realizing of VB's internal workings and have the ability to expand its object-oriented services.

Show description

Read or Download Advanced Visual Basic 6: power techniques for everyday programs PDF

Similar visual basic books

Subclassing and Hooking with Visual Basic

Subclassing & Hooking with visible simple deals builders a distinctive solution to customise home windows habit. home windows is a message-based method. each motion you request creates a number of messages to hold out the motion. those messages are handed among items and hold with them info that provides the recipient extra aspect on the best way to interpret and act upon the message.

Upgrading Visual Basic 6.0 Applications to Visual Basic .NET and Visual Basic 2005 (Patterns & Practices)

Offers directions on upgrading Microsoft visible uncomplicated 6. zero purposes to new models of visible easy, with details on making plans an improve venture, trying out an upgraded software, and deploying the hot program.

Additional resources for Advanced Visual Basic 6: power techniques for everyday programs

Example text

Arrays also allow you to impose an order on multiple items. As a reader of this book, you should be familiar with arrays, but you may not know how VB handles arrays internally. This chapter is placed very early in the book because understanding how VB uses arrays is required for many other techniques discussed in later chapters. At its lowest level, an array is simply a block of contiguous memory. This block of memory is divided into a number of equally sized elements. An element in an array is accessed via a zero-based index for the element by adding * to the starting address of the memory block.

The one downside of both Any and void* is that the compiler does not support passing an array to either of these types. Unfortunately, VB does not support SAFEARRAY(void*) in a type library. Because a SafeArray is actually a type-agnostic structure to begin with, this is doubly unfortunate: There is no way to write a typelib-defined VarPtrArray function that accepts an arbitrarily typed array. In order to humor the compiler, you would have to include definitions for VarPtrLongArray, VarPtrIntegerArray, VarPtrSingleArray, and so on.

In this table, the variable's type is shown to the left of the equals statement going down, and the type of the right-hand side expression going across. The types represented fall into five categories. • UNK=VT_UNKNOWN type • DISP=VT_DISPATCH • USER:DISP= VT_USERDEFINED with IDispatch support • USER:UNK=VT_USERDEFINED with no IDispatch support • RHLS=LHS means that the type of the left-hand variable is exactly the same as the right-hand expression Notice how assigning to VT_UNKNOWN never performs a QI, and assigning to the same user-defined type never performs a QI.

Download PDF sample

Rated 4.28 of 5 – based on 43 votes