Code

Welcome to the code section! Below you can find some samples that Michiel wrote and that might be useful to others as well. Before downloading anything, please read the license agreement for this code.
 
EjectMedia.zip - Contains a VB6 example project that shows how to safely eject removable media on Windows NT (only). Supercedes botched code I posted to microsoft.public.vb.winapi.
 
DirExact() function - Provides a simple workaround for a 'feature' in VB's Dir() function where a search for (for example) *.HTML returns not only all .HTML files, but also all .HTM ones.
 
Two recursive directory-related functionss:
CopyTree() emulates XCOPY /E and copies an entire tree structure, whereas DelTree() acts more like RD /S/Q and removes the specified tree.
 
If you're looking for a reasonably fast but not terribly secure VB string-based crypto routine, check out
SimpleCrypt(). EnDeCryptFile() is a companion routine to process an entire file at a time.
 
The
SplitFile() function takes a file and (surprise!) splits it up into multiple chunks of user-specified size. And guess what the UnSplitFile() function does...
 
 

[Home] [Publications] [Code] [Contact Us] [Legal]