|
|
Home » Visual Basic » Article
Visual Basic FileSystemObject Wrapper v2.5
|
| Article by: | Kenneth Ives (3/29/2003) |
|
| Sponsored by: | FindMyHosting - Web Hosting Search |
| Summary: | DLL with several routines to make use of the Scripting.FileSystemObject.
Be sure to make a reference to "Microsoft Scripting Runtime" (scrrun.dll)
in your project. |
|
| Viewed: 33230 times |
Rating (39 votes): |
|
1.5 out of 5 |
|
|
|
Visual Basic FileSystemObject Wrapper v2.5
Download now (136KB)
In this project we create a DLL with several routines to make use of the Scripting.FileSystemObject.
Be sure to make a reference to "Microsoft Scripting Runtime" (scrrun.dll)
in your project. To get a hard copy of the VBScript documentation or an updated version, visit:
VB Script DLL:
http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/msdn-files/027/001/733/msdncompositedoc.xml
VBScript Documentation:
http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/001/728/msdncompositedoc.xml
Registering FsoKci.dll
Copy the FsoKci.dll file to the system directory where all your
other DLL's are stored.
- Windows 9x, ME:
\Windows\System
- Windows NT4, 2000, XP:
\Winnt\System32
Now register the DLL so it will be recognized by the system.
Select the START button, RUN
for Windows 9x, ME type:
regsvr32 c:\windows\system\FsoKci.dll
for NT4, 2000, XP Type:
regsvr32 c:\winnt\system32\FsoKci.dll
In the VB IDE, to use this DLL, you must first reference it via
Projects, References on the toolbar menu. Scroll down the list
and place a checkmark next to FsoKci
Hints and Tips
Passing a Type structure from a DLL is simple after you have done it at
least once. However, this process is not well documented anywhere.
In the receiving form or module:
-
Set up a reference to the DLL in the declarations section.
Private cFSO as FsoKci.clsFSO
or
Private WithEvents cFSO as FsoKci.clsFSO
-
Set up a reference to the Type structure located within the DLL class
Private mtypFI as FsoKci.FileInfo
- Instantsiate the object.
Set cFSO = New FsoKci.clsFSO
Now you can reference the Type structure via mtypFI within your
form or module.
- When you want the file information, you would first request
information and then make a call to retrieve the information.
Do the same for drive information.
If cFSO.GetFileInfo("C:\Windows\Win.com") then
' The data is now the file structure
Call cFSO.ReturnFileInfo(mtypFI)
End If
|
|
View highlighted Comments
User Comments on 'Visual Basic FileSystemObject Wrapper v2.5 '
|
Posted by :
Milos1 at 02:42 on Wednesday, April 27, 2005
|
hello author who ever you maby be im trying to find out coding for Visual Bascs 6.0. im trying to find how to make an organiser the program and im having trouble. it has been hard and every time i download a code for VB and it come up as it is an error and im not sure can u explain y?? thank-you
your sincerialy Milos MIlanovic!
| |
|
To post comments you need to become a member. If you are already a member, please log in .
| RELATED ARTICLES |
Generate License Keys (such as CD keys on Microsoft software) by Brian Gillham
This class allows you to generate license keys, such as the CD keys on the case of most Microsoft software |
 |
Visual Basic Read and Modify the Registry by Kenneth Ives
Perform the four basic functions to the Windows registry. Add, change, delete, and query. Allows you to to read registry values, and modify both keys and values.
|
 |
Communicating with the Database (Using ADO) by Chaudhary Pradeep K. Roy
Using ADO to get connected with the database. |
 |
Generate an Array of Unique Random Numbers by Brian Gillham
This function will generate an ARRAY of TRULY random numbers. |
 |
Beginning Resource Files in Visual Basic by Kenneth Ives
Have you ever wanted to use graphics, such as icons, bitmaps, cursors, and AVI files? How about sound or even message box text? This can be an enormous amount of overhead. These are all examples of more files to keep track of when you distribute an application, DLL, or OCX. Lets find out how resource files can help.... |
 |
Visual Basic Compact/Repair Access Database Utility by Kenneth Ives
This utility will compact and repair the access database you select. It is actually more convenient to use this utility than do the same task with Access, because you don't have to save the database with a different name and then delete the old database when you are done: here, a temporary copy of the database is automatically created and deleted. |
 |
Creating a watermark in Excel with VBA by Kenneth Ives
Adding a watermark to an Excel spreadsheet using VBA. |
 |
Generate your own Random Numbers by Thaha Hussain
This simple program generates random numbers using the basic mathematical methods. |
 |
Change Cursor to Hour Glass by Brian Gillham
A simple script to change the cursor to an hour glass. |
 |
Analog Clock by Thaha Hussain
This program demonstrates Thaha Hussain's Clock Work Formula to paint an Analogue Clock. |
 |
| |