Msdn Library Vb6 Zip

  1. Download ccrpTmr6.zip, Version 2.00 for VB6, 197Kb, Last Updated: 23-Nov-1998 Download ccrpTmr.zip, Version 1.23 for VB5, 153Kb, Last Updated: 24-Nov-1998 From the CCRP Website: CCRP High Performance Timer Objects, created by CCRP member Karl E. Peterson, provide much more robust options than Visual Basic's intrinsic Timer control ever has.
  2. Opens a zip archive at the specified path and in the specified mode. Open(String, ZipArchiveMode, Encoding) Opens a zip archive at the specified path, in the specified mode, and by using the specified character encoding for entry names. OpenRead(String) Opens a zip archive for reading at the specified path.
By the way, I did a little hunting on the web. Here are some links that may be of interest, with the original descriptions (I didn't write them)...

VB-JSON is a Visual Basic 6 class library for parsing and emitting JSON (Javascript Object Notation) and can handle nested arrays and objects in the data. It does not rely on the JScript engine for parsing. JSON is a useful and compact format for data interchange between a browser based JavaScript client program and a VB6 based data server,.

Msdn library vb6 zip download
  • Info-ZIP's ZIP libraries
    Info-ZIP's purpose is to 'provide free, portable, high-quality versions of the Zip and UnZip compressor-archiver utilities that are compatible with the DOS-based PKZIP by PKWARE, Inc.' - and they do an excellent job at it. Download their free Zip and Unzip DLLs here.
  • Zlib
    zLib is a 'A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)' [ahem - that really is how the authors introduce it!] The compression algorithm used is essentially the same as used in PKZip and gzip. This is the home page for the algorithm with C code and specifications; however if you want to use it in VB, then go to:
  • Mark Nelson's OCX for ZLib
    A nice, free, fully working OCX providing access to Zlib compression and decompression. MFC source code is included. Recommended!
  • www.info-zip.org
    This last one definitely seems worth a look (Killer42)

The information here is applicable to the DLLs supplied with CLW3225DAL. For the latest information on calling the NAG C Library DLLs from various environments, or for sample projects for a specific Mark of the NAG C Library, please go to the main NAG C Library DLL support index page.

This web page contains links to several zip files, each containing a Microsoft Visual Basic 6 project showing how to call a NAG C Library function. These projects have been tested with Visual Basic 6.0. There are separate examples showing how to call the Library from Visual Basic .NET (VB.NET).

Support files for Visual Basic 6 (VB6) may be found under the VB6 headers page. These files can be used in both Visual Basic 6 (and earlier) and Visual Basic for Applications code. Separate VB.NET headers are available.

For each NAG C Library chapter letter there is a file called clvb6-<chapter letter>.bas which contains the VB declarations of the C functions from all the chapters beginning with this letter. For example, clvb6-e.bas contains the declarations of all the functions from chapters e01, e02, e04 and e05. There is also a corresponding set of files called clvb6-<chapter letter>-long.bas using NAG C Library long names. The supplied files also contain commented out skeletons for call-back functions. All Enum and Type declarations necessary for the parameters (mandatory and optional) can be found in the file clvb6-types.bas. The file clvb6-utilities.bas contains declarations of the Windows kernel function RtlMoveMemory and its aliases. This function is used to copy memory between C pointers and VB variables or arrays. clvb6-*.bas files can be imported into your VB project.

The header files are based on the stand-alone version of the NAG C Library DLL (CLW3225DA_nag.dll); to specify the version of the DLL which uses the MKL BLAS/LAPACK instead (CLW3225DA_mkl.dll), replace CLW3225DA_nag.dll by CLW3225DA_mkl.dll in the Function and Sub declarations.

These support files use the VB option to base arrays at one, i.e.

All the examples use this convention.

Note: Regardless of this option, arrays within User Defined Types (UDT) have a base of 0, unless explicitly declared to be 1, e.g.

Remember also that to be able to use the NAG C Library DLL, its location will need to appear somewhere in your current path. If the DLL is in C:Program FilesNAGCL25clw3225dalbin (for example), then your PATH environment variable must contain this folder before starting Visual Basic. You will also need the folder containing the Intel run-time libraries on your path (unless these are already present). If you are using the MKL-based version of the NAG C Library (CLW3225DA_mkl.dll), then the folder containing the MKL DLLs should also be on your path, but should appear later in the path than the bin folder for the NAG C Library DLLs, e.g.

Arrays

In the NAG C Library function declarations, arrays are declared only with their type. To pass a VB array to the C Library simply pass the first element and, by default, VB6 passes its address.


(Note that the declarations in the header files specify 'ByRef' explicitly for clarity.)

Call-back Functions

The supplied clvb6-<chapter letter>.bas files contain commented out skeletons for call-back functions. They can be copied into your code and uncommented to form the basis of your call-back function.

In the VB6 declarations of NAG C Library functions and subroutines, call back function dummy arguments are declared as Long. In fact, these are pointers to the functions and a Long is used to contain this pointer. The pointer to the actual function is passed using the VB AddressOf operator.
E.g.


Please see the d01sjc and e04nfc examples for examples of call-back functions.

Array Arguments to Call-back Functions

Because the underlying library is written in C, array arguments are simply declared as the appropriate type. VB6 passes arguments, by default, ByRef. Hence we have access to a pointer to the array. In the case of input array arguments, the appropriate amount of storage has to be copied to a VB array before it can be used. At the end of the function, output arrays must be copied back to the pointer.

In the examples, the Windows function RtlMoveMemory is used to do this copying, e.g.


Sometimes Alias is used to rename declarations requiring different types, e.g.


These declarations are included in the supplied file clvb6-utilities.bas.

Here is an example of how to do this in a user supplied function called objfun.


Examples of how to handle arrays in call-back functions can be found in e04nfc.

C Library Typedefs and VB6 User Defined Types

Assigning pointers in VB6 Types

Pointers in the VB6 Types defined for the NAG C Library are declared as Long. In order to assign, for example, a VB Double array to such a pointer, some trickery is needed.

First we need a function that accepts the array pointer ByVal and assigns it to the pointer in the Type, in this case Nag_User.


This subroutine is called using the VarPtr function to pass the address of the array x as a Long.


To access the array pointer stored in the VB Type we again use RtlMoveMemory, but this time there is a slight change needed in its declaration. As the pointer is stored in a Long we need to trick RtlMoveMemory to accept this and the argument associated with this pointer is declared as being passed ByVal, which causes VB to pass the contents of the Long to RtlMoveMemory which hence receives the required pointer.

Msdn Library Vb6 Zip

Msdn Library Vb6 Zip File

Two different declarations are used, to copy to and from the local array, for example


These declarations are included in the supplied file clvb6-utilities.bas.

In, for example, a user supplied function this array may be accessed by first copying it to a VB array. If the array is updated it must then be copied back.


Use of such an array is illustrated in the d01sjc and e02bac examples.

Assigning function pointers in VB6 Types

Again a function, declared to receive the pointer ByVal, is used to assign the pointer as a Long.


The call to this function uses the AddressOf function to pass the address of our function called monit.

Strings

Msdn Library Vb6 Zip Download

Internally VB uses Unicode ('wide') characters, whereas the NAG C Library uses ASCII. VB handles the conversion from Unicode to ASCII for function/subroutine arguments but not for strings in UDTs. Therefore, some C strings are declared as Byte arrays in the VB header files. These VB strings need to be copied to and from the Byte arrays.

To copy a C null terminated String to a VB String, e.g. the fail.message Byte array in the NAG error structure:

Zip


Or, to copy a VB String to an optional Byte array parameter to a NAG C Library function:

Msdn Library Vb6 Zip Code

Console Window

Msdn Library Vb6 Zip Download

A number of NAG C Library functions, by default, create a console window to display intermediate results, etc.

Alternatively, this output may be redirected to a file, or suppressed entirely as may be seen in the e04nfc example.

The console window may be closed temporarily (until more output arrives) via File | Close or permanently (until the next time Excel is invoked) via File | Exit. Closing the console window from the close button ('X') in the top right hand corner or via Alt-F4 has the same effect as File | Close. There are also cut, copy and paste facilities available via the Edit menu.

A number of Excel Visual Basic for Applications examples are also available. These examples provide further illustrations of the techniques described above.