vbAccelerator - Contents of code file: ShellLink.odl

[
    uuid(80AFED2D-2F2B-4bf0-8292-A8E781349E34),
    helpstring("VB IShellLink Interface"),
    version(1.0)
]
library IShellLinkVB
{
    importlib("stdole2.tlb");

    typedef enum {
       APITRUE = 1,
       APIFALSE = 0
    } BOOL;

    typedef struct tagUUID {        
       long Data1;
       short Data2;
       short Data3;
       unsigned char Data4[8];
    } UUID;

    typedef enum {
        SLR_NO_UI = 1,
        SLR_ANY_MATCH = 2,
        SLR_UPDATE = 4
    } EShellLinkResolveFlags;

    typedef enum {
        SLGP_SHORTPATH = 1,
        SLGP_UNCPRIORITY = 2
    } EShellLinkGP;

    typedef enum {
        SW_HIDE = 0,
        SW_SHOWNORMAL = 1,
        SW_NORMAL = 1,
        SW_SHOWMINIMIZED = 2,
        SW_SHOWMAXIMIZED = 3,
        SW_MAXIMIZE = 3,
        SW_SHOWNOACTIVATE = 4,
        SW_SHOW = 5,
        SW_MINIMIZE = 6,
        SW_SHOWMINNOACTIVE = 7,
        SW_SHOWNA = 8,
        SW_RESTORE = 9,
        SW_SHOWDEFAULT = 10,
        SW_MAX = 10
    } EShowWindowFlags;

    [
       uuid(0000010C-0000-0000-C000-000000000046),
       helpstring("Visual Basic version of IPersist"),
       odl
    ]
    interface IPersistVB : IUnknown 
    {
       HRESULT _stdcall GetClassID([in, out] UUID* pClassID);
    };

    [
       odl,
       uuid(0000010B-0000-0000-C000-000000000046),
       helpstring("Visual Basic version of IPersistFile")
    ]
    interface IPersistFileVB : IPersistVB 
    {
       [helpstring("Checks for changes since last file write")]
       HRESULT _stdcall IsDirty();
       [helpstring("Opens the specified file and initializes the object from
        its contents")]
       HRESULT _stdcall Load(
                    [in] LPWSTR pszFileName, 
                    [in] long dwMode);
       [helpstring("Saves the object into the specified file")]
       HRESULT _stdcall Save(
                    [in] LPWSTR pszFileName, 
                    [in] BOOL fRemember);
       [helpstring("Notifies the object that save is completed")]
       HRESULT _stdcall SaveCompleted([in] LPWSTR pszFileName);
       [helpstring("Gets the current name of the file associated with the
        object")]
       HRESULT _stdcall GetCurFile([in] long ppszFileName);
    };

    [
       odl,
       uuid(000214EE-0000-0000-C000-000000000046),
       helpstring("Visual Basic version of IShellLinkA interface")
    ]
    interface IShellLinkVB : IUnknown 
    {
       [helpstring("Retrieves the path and filename of a shell link object")]
       HRESULT _stdcall GetPath(
                    [in, out] LPSTR pszFile, 
                    [in] int cchMaxPath, 
                    [in, out] void* pfd, 
                    [in] EShellLinkGP fFlags);
       [helpstring("Retrieves the list of shell link item identifiers")]
       HRESULT _stdcall GetIDList([out, retval] long* ppidl);
       [helpstring("Sets the list of shell link item identifiers")]
       HRESULT _stdcall SetIDList([in] long pidl);
       [helpstring("Retrieves the shell link description string")]
       HRESULT _stdcall GetDescription(
                    [in, out] LPSTR pszName, 
                    [in] int cchMaxName);
       [helpstring("Sets the shell link description string")]
       HRESULT _stdcall SetDescription([in] LPSTR pszName);
       [helpstring("Retrieves the name of the shell link working directory")]
       HRESULT _stdcall GetWorkingDirectory(
                    [in, out] LPSTR pszDir, 
                    [in] int cchMaxPath);
       [helpstring("Sets the name of the shell link working directory")]
       HRESULT _stdcall SetWorkingDirectory([in] LPSTR pszDir);
       [helpstring("Retrieves the shell link command-line arguments")]
       HRESULT _stdcall GetArguments(
                    [in, out] LPSTR pszArgs, 
                    [in] int cchMaxPath);
       [helpstring("Sets the shell link command-line arguments")]
       HRESULT _stdcall SetArguments([in] LPSTR pszArgs);
       [propget, helpstring("Retrieves or sets the shell link hot key")]
       HRESULT _stdcall Hotkey([out, retval] short* pwHotkey);
       [propput, helpstring("Retrieves or sets the shell link hot key")]
       HRESULT _stdcall Hotkey([in] short pwHotkey);
       [propget, helpstring("Retrieves or sets the shell link show command")]
       HRESULT _stdcall ShowCmd([out, retval] EShowWindowFlags* piShowCmd);
       [propput, helpstring("Retrieves or sets the shell link show command")]
       HRESULT _stdcall ShowCmd([in] EShowWindowFlags piShowCmd);
       [helpstring("Retrieves the location (path and index) of the shell link
        icon")]
       HRESULT _stdcall GetIconLocation(
                    [in, out] LPSTR pszIconPath, 
                    [in] int cchIconPath, 
                    [in, out] int* piIcon);
       [helpstring("Sets the location (path and index) of the shell link icon")]
       HRESULT _stdcall SetIconLocation(
                    [in] LPSTR pszIconPath, 
                    [in] int iIcon);
       [helpstring("Sets the shell link relative path")]
       HRESULT _stdcall SetRelativePath(
                    [in] LPSTR pszPathRel, 
                    [in] long dwReserved);
       [helpstring("Resolves a shell link. The system searches for the shell
        link object and updates the shell link path and its list of identifiers
        (if necessary)")]
       HRESULT _stdcall Resolve(
                    [in] long hwnd, 
                    [in] EShellLinkResolveFlags fFlags);
       [helpstring("Sets the shell link path and filename")]
       HRESULT _stdcall SetPath([in] LPSTR pszFile);
    };



    [
       uuid(00021401-0000-0000-C000-000000000046),
       helpstring("Visual Basic CShellLink class")
    ]
    coclass CShellLink {
       [default] interface IShellLinkVB;
    };


}