' Warranties: None. This code is provided AS-IS.
' Developed on the Windows 98 SE platform.
' Version: 1.6.1!
'
' Dependencies:
' ftiExtractFileName
' ftiExtractProgNane
' ftiExtractProgPath
'
' Description:
' A cool include file that uses the registry to retrieve information on
'any file extension/type!

'Several constants have been defined that are used to retrieve this
'information, they are:

'
' Note(s):
' I'm going to try to put some of the code that reads the registry into
' a function, to reduce the file size.
'
' ftiClassName:
' queries the class name of the specified filetype
'
' ftiDefCommand:
' queries the value of the "shell/open/command" sub key
' of the parent program (module), the default command
'
' ftiContentType:
' queries the content type of the specified file type
'
' ftiQueryDefault:
' queries the integrity of the registered file extension
' (helps to see if there are any errors in the registry ;) )
'
' ftiProgramCommand:
' queries the parent (module) of the specified file type
'
' ftiDefaultIcon:
' queries the icon for the specified file type
'
' New updates:
'*****************************
' ftiProgramName:
' gets the actual file name of the parent of the specified file type
'
' ftiProgramExt:
' Gets the extension of the parent program. Later on I want to enable
' queries for the file extension.
'
' ftiProgramPath:
' Gets the actual program path.
'
' ** end of description *******************************************
' Special precautions:
' Whatever you do, DON'T turn the $escapechars preprocessor
' directive ON! Doing so may result in incorrect registry
' settings, and/or may cause Windows to CRASH (not being able to boot
' up Windows sounds about right).
'
' When you enter the first string argument of the GetFileTypeInfo function,
' make sure that you do not have 2 or more forward/backward slashes beside each other.
' Instead, enter the first argument like this: "C:/blah/files";
' not like this: "C:///blah//files".
'
' Of course, you wouldn't actually have paths like that,
' that is, unless Windows was playing dominoes with your ASCII character set at the time :P
'
' Known bugs:
' None actually, unless you consider the forward/backward slash problem a bug ;)
' You should be fine if you just obey the special rule.
'
' Usage:
'
' function:
' GetFileTypeInfo(FileType, ftiQueryValue)
'
' FileType: string
' ftiQueryValue: integer
'
' FileType can be a file extension, file name, path and file name,
' or even a dot with a file extension; basically anything as long as
' you obey the special rule defined in the Special precautions
' section. I'm trying to fix this =)
'
' ftiQueryValue is any of the several constants defined in the
' Description section.
'
' If an error occurs in reading the registry, GetFileTypeInfo will return -1.
' If you get a return value of one, that value is TRUE.
' If you get a return value of zero, that value is FALSE.