' ------------------------------------------------------------------------
'      Copyright  1997 Microsoft Corporation.  All rights reserved.
'
' You have a royalty-free right to use, modify, reproduce and distribute
' the Sample Application Files (and/or any modified version) in any way
' you find useful, provided that you agree that Microsoft has no warranty,
' obligations or liability for any Sample Application Files.
' ------------------------------------------------------------------------
VB 5 - ICtxMenu Readme...

==========================================================================
Contents 
==========================================================================
1. Description of project
2. Installation and setup 

==========================================================================
1. Description of project
==========================================================================
The ICtxMenu is an unsupported VB5 sample that demonstrates how VB5 can be
used to create a Win95 and NT 4 ContextMenu Shell Extension.  A shell 
extension is an application that is an "extension" to the windows shell also
known as the Explorer.  An extension is a program that runs when a program 
specific event occurs inside Explorer.  In this case, Explorer will fire 
the ContextMenu extension when the user right clicks the mouse over any 
file with the .INI extension.  The user is given a chance to make a 
selection from the context menu and do one of two things... 1) shell
VB5, or 2) view the ini file inside a special Ini File viewer...  
That's it.

Note:  This sample requires the Release version of Visual Basic 5 Professional
       or Enterprise.

==========================================================================
2. Installation and setup 
==========================================================================
<Build ICtxMenu.DLL>
1. Load the ICtxMenu.vbp, located in this directory, project into VB5 and 
   recompile the project into ICtxMenu.dll.

<Modify ICtxMenu.reg>
2. Once you have compiled the ICtxMenu.dll you MUST modify ICtxMenu.reg in
   order to register you shell extension properly, failing to do so will 
   prevent the shell extension from working.  First open the registry editor
   by running RegEdit.exe from the start menu.  Second copy the Clsid
   for you newly compiled ICtxMenu.dll, by copying the (Default) value in the 
   registry under...

   HKEY_CLASSES_ROOT\pIContextMenu.ShellExt\Clsid
        (Default)={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

   and modify the Clsid value in the following entries of ICtxMenu.reg

     [HKEY_CLASSES_ROOT\IniFile\shellex\ContextMenuHandlers\IniFileMenu]
     @="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"

     [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
    "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"="VB 5 - Shell Extension"

    NOTE:  If you don't set binary compatibility in your vb project you
           will need to repeat this step every time you recompile ICtxMenu.dll.
   
<Register the Shell extension>
2. Double click and run the ICtxMenu.reg file in Explorer.  By doing so, Explorer 
   will automatically run ICtxMenu.reg and register your shell extension.  You may 
   need to reboot Windows in order to get Explorer to recognize the or notice
   new registry settings.  If you look at a file in Explorer's "View Details" 
   mode with the .INI extension, under Explorers "Type" column the file should
   read "Windows Ini - File", if so then the shell extension should be registered
   properly.

<Build ShellVwr.exe and copy it to the Windows\NT directory.(or somewhere in your path)>
3. goto the .\ShellVwr sub directory and load the ShellVwr.vbp project into
   VB5 and recompile the project into ShellVwr.exe.  Once compiled be sure to
   copy the ShellVwr.exe file to you windows, winnt directory, or somewhere in your
   path.  Note: the current directory is NOT sufficient, the directory that this 
   file is placed MUST be in your path.

<RUN IT>
4. Open Explorer and navigate to a directory that contains .INI files, or files of 
   Type "Windows Ini - File".  Select or highlight one or more ini files and
   right click the mouse pointer over a selected file.  A context menu should
   pop-up with 3 custom VB installed menuitems.  Select the 1st VB menu and it
   should "Shell" vb5.exe, NOTE: This will only work if you have put the location
   of VB5.exe in your path.  Select the 2nd or 3rd(they both do the same thing)
   menu items and it should shell the ShellVwr.exe program and send it the file(s) 
   that you currently have selected and open them up in the viewer.  You should 
   see a treeview list as follows...

..IniFile1
          ..[Section 1]
                       ..Key1=value1
                       ..Keyn=valuen
          ..[Section n]
                       ..Key1=value1
                       ..Keyn=valuen
...IniFile(n)

