PDA

View Full Version : Use .NET functionality from VB6



sadegi
چهارشنبه 26 مرداد 1384, 11:49 صبح
This is a link to the MSDN site with a very interesting article on how to call .NET functionality from within VB6.
.
http://msdn.microsoft.com/vbrun/vbfusion/usingnet/default.aspx.
.
Kinda weird...one of the nice things about VB6 is no dependancy on .NET library/download, but if thats not an issue for you, then check it out and let me know what you think..
.
The .NET Framework Class Library provides extensive functionality for the following areas:.
New data types, such as GUID for working with Global Unique Identifiers, and TimeSpan – for working with a relative times (5 minutes instead of 12:05 AM 1/1/2005).
.
Environment information – OS version, environment variables, command line arguments, machine name, user name, user domain, special folder paths, logical drives..
.
Functionality for creating console (command line) applications.
.

Functionality for writing Windows services
Registry access.
.
Power events.
.
Database access.
.
Numerous types of collections, including sorted lists, dictionaries, and queues..
.
Configuration file management.
.
Operating system interaction – processes, event logs, performance counters, services, tracing and debugging.
.
Active Directory access.
.
Advanced graphics capabilities – drawing, gradients, images, printing (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=62208&lngWId=1#).
.
Access to COM+ services such as distributed transactions

File system interaction and IO

Windows Management Interface access

Access to message queuing

Low level network (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=62208&lngWId=1#) access – DNS lookups, IP Addresses, sockets, HTTP communication (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=62208&lngWId=1#) Interoperability with non .NET code (known as unmanaged code)

Reflection – allows late binding, and inspection of types at runtime

Remote object access – creating instance ' s of remote classes and calling their me ' thods.

Serialization – the ability to easily import/export the data of a class as XML.

Cryptography – hashing, symmetric and asymmetric encryption (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=62208&lngWId=1#), X509 certificates.

Text formats – Conversions for ASCII, UTF-7, UTF-8, Unicode.

Regular Expressions – The ability to insure that a string conforms to a certain pattern (the string looks like a phone (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=62208&lngWId=1#) number, IP address, e-mail address, etc.) The ability to extract sub-strings from a string (for example, extract all the HTML tags).

Threading - The ability to have an application do work in the background.

Web Services

XML support – superior functionality compared to MSXML ("")