Alternate Data Streams in VB6 Hello everyone. Today I'm gonna show you how to use ADS in VB6 At first we need 2 APIs because we can't use common methods for the Windows ADS. Private Declare Function OpenFile Lib "kernel32" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long Private Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long And the used declarations Private Const OF_EXIST = &H4000 Private Const OFS_MAXPATHNAME = 128 Private Type OFSTRUCT cBytes As Byte fFixedDisk As Byte nErrCode As Integer Reserved1 As Integer Reserved2 As Integer szPathName(OFS_MAXPATHNAME) As Byte End Type With these APIs (OpenFile and DeleteFile) we can easily access hidden Files. Now we need to create a file as an ADS. Here is a code, how to read a File into the memory and then recreate it as an ADS Dim buffer as string, FilePath as string, NewPath as string FilePath = "C:\a.txt" NewPath = "C:\b.txt:a.txt" Open FilePath For Binary As #1 Open NewPath For Binary As #2 buffer = Space$(LOF(1)) Get #1, , buffer Put #2, , buffer Close In this code the File 'a.txt' with the number #1 is read in the Memory and than it will be recreated as 'b.txt:a.txt' Now we don't know if the file really exists. With the common 'FileExists' function we can't check it, because the file is hidden. That's why the API 'OpenFile' will be used. Here is a code to check if a file exists using the 'OpenFile' API Public Function FileExists(ByVal Filename As String) As Boolean Dim OF As OFSTRUCT FileExists = OpenFile(Filename, OF, OF_EXIST) = 1 End Function You can save this as a Module or what ever and call it in your code like this If FileExists(NewPath) = True then Call MsgBox("File exists") End if To delete a File use this code Call DeleteFile(newpath) Now you can easily hide files, such as inis which you need for your program, in the ADS.