com.jniwrapper.win32.shell.impl
Class IShellLinkImpl

java.lang.Object
  extended bycom.jniwrapper.Parameter
      extended bycom.jniwrapper.win32.com.impl.IUnknownImpl
          extended bycom.jniwrapper.win32.shell.impl.IShellLinkImpl
All Implemented Interfaces:
com.jniwrapper.AutoDeleteParameter, IShellLink, com.jniwrapper.win32.com.IUnknown, com.jniwrapper.PointerParameter

public class IShellLinkImpl
extends com.jniwrapper.win32.com.impl.IUnknownImpl
implements IShellLink

Implements IShellLink interface


Nested Class Summary
 
Nested classes inherited from class com.jniwrapper.win32.com.impl.IUnknownImpl
com.jniwrapper.win32.com.impl.IUnknownImpl.MemoryBufferImpl
 
Field Summary
static com.jniwrapper.win32.com.types.CLSID CLSID_IShellLink
          CLSID of the IShellLink
static java.lang.String INTERFACE_IDENTIFIER
          String representation of the IID of the IShellLink interface
 
Fields inherited from class com.jniwrapper.win32.com.impl.IUnknownImpl
d, DebugComfyJ, LICENSE_TYPE, PTR_NULL
 
Fields inherited from class com.jniwrapper.Parameter
V
 
Constructor Summary
IShellLinkImpl()
          Creates instance of the IShellLink
IShellLinkImpl(com.jniwrapper.win32.com.types.ClsCtx dwClsContext)
          Creates instance of the IShellLinkImpl from the CLSID equal CLSID_IShellLink
IShellLinkImpl(com.jniwrapper.win32.com.types.CLSID clsid, com.jniwrapper.win32.com.types.ClsCtx dwClsContext)
          Creates instance of the IShellLinkImpl from the specified CLSID
IShellLinkImpl(com.jniwrapper.win32.com.types.CLSID clsid, com.jniwrapper.win32.com.impl.IUnknownImpl pUnkOuter, com.jniwrapper.win32.com.types.ClsCtx dwClsContext)
          Creates instance of the IShellLinkImpl from the specified CLSID with the ability to aggregate component
IShellLinkImpl(com.jniwrapper.win32.com.impl.IUnknownImpl that)
          Creates instance of the IShellLinkImpl from the specified instance of IUnknownImpl or its descendant
 
Method Summary
 java.lang.Object clone()
          Creates copy of this instance
 com.jniwrapper.Str getArguments(com.jniwrapper.Int cch)
          Returns the command-line arguments associated with a Shell link object.
 com.jniwrapper.Str getDescription(com.jniwrapper.Int cch)
          Returns the description string for a Shell link object.
 com.jniwrapper.UInt16 getHotkey()
          Returns the keyboard shortcut (hot key) for a Shell link object.
 void getIconLocation(com.jniwrapper.Str pszIconPath, com.jniwrapper.Int cch, com.jniwrapper.Int piIcon)
          Returns the location (path and index) of the icon for a Shell link object.
 ItemIDList getIDList()
          Returns the list of item identifiers for a Shell link object.
 com.jniwrapper.win32.com.types.IID getIID()
          Returns IID of the interface (CLSID_IShellLink)
 void getPath(com.jniwrapper.Str pszFile, com.jniwrapper.Int cch, Win32FindData pfd, com.jniwrapper.UInt32 fFlags)
          Returns the path and file name of a Shell link object.
 com.jniwrapper.Int getShowCmd()
          Returns the show command for a Shell link object.
 com.jniwrapper.Str getWorkingDirectory(com.jniwrapper.Int cch)
          Returns the name of the working directory for a Shell link object.
 void resolve(Wnd hwnd, com.jniwrapper.UInt32 fFlags)
          Attempts to find the target of a Shell link, even if it has been moved or renamed.
 void setArguments(com.jniwrapper.Str pszArgs)
          Sets the command-line arguments for a Shell link object.
 void setDescription(com.jniwrapper.Str pszName)
          Sets the description for a Shell link object.
 void setHotkey(com.jniwrapper.UInt16 wHotkey)
          Sets a keyboard shortcut (hot key) for a Shell link object.
 void setIconLocation(com.jniwrapper.Str pszIconPath, com.jniwrapper.Int iIcon)
          Sets the location (path and index) of the icon for a Shell link object.
 void setIDList(ItemIDList pidl)
          Sets the pointer to an item identifier list (PIDL) for a Shell link object
 void setPath(com.jniwrapper.Str pszFile)
          Sets the path and file name of a Shell link object.
 void setRelativePath(com.jniwrapper.Str pszPathRel, com.jniwrapper.UInt32 dwReserved)
          Sets the relative path to the Shell link object.
 void setShowCmd(com.jniwrapper.Int iShowCmd)
          Sets the show command for a Shell link object.
 void setWorkingDirectory(com.jniwrapper.Str pszDir)
          Sets the name of the working directory for a Shell link object.
 
Methods inherited from class com.jniwrapper.win32.com.impl.IUnknownImpl
, a, acceptIOPerformer, addRef, asVoidPointer, b, d, dumpVTBL, equals, fromVoidPointer, getDebugInfo, getInterfaceIdentifier, getLength, hashCode, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, isAutoDelete, isNull, isSameObject, queryInterface, queryInterface, read, release, setAutoDelete, setNull, setValue, write
 
Methods inherited from class com.jniwrapper.Parameter
a, a, asReturnValue, b, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jniwrapper.win32.com.IUnknown
addRef, isNull, queryInterface, release, setNull
 
Methods inherited from interface com.jniwrapper.AutoDeleteParameter
isAutoDelete, setAutoDelete
 

Field Detail

INTERFACE_IDENTIFIER

public static final java.lang.String INTERFACE_IDENTIFIER
String representation of the IID of the IShellLink interface


CLSID_IShellLink

public static final com.jniwrapper.win32.com.types.CLSID CLSID_IShellLink
CLSID of the IShellLink

Constructor Detail

IShellLinkImpl

public IShellLinkImpl()
Creates instance of the IShellLink


IShellLinkImpl

public IShellLinkImpl(com.jniwrapper.win32.com.impl.IUnknownImpl that)
               throws com.jniwrapper.win32.com.ComException
Creates instance of the IShellLinkImpl from the specified instance of IUnknownImpl or its descendant

Parameters:
that - Instance of IUnknownImpl or its descendant
Throws:
com.jniwrapper.win32.com.ComException

IShellLinkImpl

public IShellLinkImpl(com.jniwrapper.win32.com.types.CLSID clsid,
                      com.jniwrapper.win32.com.types.ClsCtx dwClsContext)
               throws com.jniwrapper.win32.com.ComException
Creates instance of the IShellLinkImpl from the specified CLSID

Parameters:
clsid - CLSID of the component
dwClsContext - The execution contexts in which an object is to be run
Throws:
com.jniwrapper.win32.com.ComException

IShellLinkImpl

public IShellLinkImpl(com.jniwrapper.win32.com.types.CLSID clsid,
                      com.jniwrapper.win32.com.impl.IUnknownImpl pUnkOuter,
                      com.jniwrapper.win32.com.types.ClsCtx dwClsContext)
               throws com.jniwrapper.win32.com.ComException
Creates instance of the IShellLinkImpl from the specified CLSID with the ability to aggregate component

Parameters:
clsid - CLSID of the component
pUnkOuter - If NULL, indicates that the object is not being created as part of an aggregate. If non-NULL, pointer to the aggregate object's IUnknown interface (the controlling IUnknown)
dwClsContext - The execution contexts in which an object is to be run
Throws:
com.jniwrapper.win32.com.ComException

IShellLinkImpl

public IShellLinkImpl(com.jniwrapper.win32.com.types.ClsCtx dwClsContext)
               throws com.jniwrapper.win32.com.ComException
Creates instance of the IShellLinkImpl from the CLSID equal CLSID_IShellLink

Parameters:
dwClsContext - The execution contexts in which an object is to be run
Throws:
com.jniwrapper.win32.com.ComException
Method Detail

getPath

public void getPath(com.jniwrapper.Str pszFile,
                    com.jniwrapper.Int cch,
                    Win32FindData pfd,
                    com.jniwrapper.UInt32 fFlags)
             throws com.jniwrapper.win32.com.ComException
Returns the path and file name of a Shell link object.

Specified by:
getPath in interface IShellLink
Parameters:
pszFile - The string that receives the path and file name of the Shell link object.
cch - The maximum number of characters to copy to the string pointed to by the pszFile parameter.
pfd - The address of a Win32FindData class that receives information about the Shell link object. If this parameter is NULL, then no additional information is returned.
fFlags - Flags that specify the type of path information to retrieve.
Throws:
com.jniwrapper.win32.com.ComException

getIDList

public ItemIDList getIDList()
                     throws com.jniwrapper.win32.com.ComException
Returns the list of item identifiers for a Shell link object.

Specified by:
getIDList in interface IShellLink
Returns:
The list of item identifiers, represented by ItemIDList class
Throws:
com.jniwrapper.win32.com.ComException

setIDList

public void setIDList(ItemIDList pidl)
               throws com.jniwrapper.win32.com.ComException
Sets the pointer to an item identifier list (PIDL) for a Shell link object

Specified by:
setIDList in interface IShellLink
Parameters:
pidl - The list of item identifiers, represented by ItemIDList class
Throws:
com.jniwrapper.win32.com.ComException

getDescription

public com.jniwrapper.Str getDescription(com.jniwrapper.Int cch)
                                  throws com.jniwrapper.win32.com.ComException
Returns the description string for a Shell link object.

Specified by:
getDescription in interface IShellLink
Parameters:
cch - The maximum number of characters of string, which is being returned
Returns:
The description string for a Shell link object.
Throws:
com.jniwrapper.win32.com.ComException

setDescription

public void setDescription(com.jniwrapper.Str pszName)
                    throws com.jniwrapper.win32.com.ComException
Sets the description for a Shell link object.

Specified by:
setDescription in interface IShellLink
Parameters:
pszName - The description string for a Shell link object.
Throws:
com.jniwrapper.win32.com.ComException

getWorkingDirectory

public com.jniwrapper.Str getWorkingDirectory(com.jniwrapper.Int cch)
                                       throws com.jniwrapper.win32.com.ComException
Returns the name of the working directory for a Shell link object.

Specified by:
getWorkingDirectory in interface IShellLink
Parameters:
cch - The maximum number of characters of string, which is being returned
Returns:
The name of the working directory for a Shell link object.
Throws:
com.jniwrapper.win32.com.ComException

setWorkingDirectory

public void setWorkingDirectory(com.jniwrapper.Str pszDir)
                         throws com.jniwrapper.win32.com.ComException
Sets the name of the working directory for a Shell link object.

Specified by:
setWorkingDirectory in interface IShellLink
Parameters:
pszDir - The name of the working directory for a Shell link object.
Throws:
com.jniwrapper.win32.com.ComException

getArguments

public com.jniwrapper.Str getArguments(com.jniwrapper.Int cch)
                                throws com.jniwrapper.win32.com.ComException
Returns the command-line arguments associated with a Shell link object.

Specified by:
getArguments in interface IShellLink
Parameters:
cch - The maximum number of characters of string, which is being returned
Returns:
The command-line arguments associated with a Shell link object.
Throws:
com.jniwrapper.win32.com.ComException

setArguments

public void setArguments(com.jniwrapper.Str pszArgs)
                  throws com.jniwrapper.win32.com.ComException
Sets the command-line arguments for a Shell link object.

Specified by:
setArguments in interface IShellLink
Parameters:
pszArgs - The command-line arguments string
Throws:
com.jniwrapper.win32.com.ComException

getHotkey

public com.jniwrapper.UInt16 getHotkey()
                                throws com.jniwrapper.win32.com.ComException
Returns the keyboard shortcut (hot key) for a Shell link object.

Specified by:
getHotkey in interface IShellLink
Returns:
The keyboard shortcut (hot key) for a Shell link object.
Throws:
com.jniwrapper.win32.com.ComException

setHotkey

public void setHotkey(com.jniwrapper.UInt16 wHotkey)
               throws com.jniwrapper.win32.com.ComException
Sets a keyboard shortcut (hot key) for a Shell link object.

Specified by:
setHotkey in interface IShellLink
Parameters:
wHotkey - The virtual key code
Throws:
com.jniwrapper.win32.com.ComException

getShowCmd

public com.jniwrapper.Int getShowCmd()
                              throws com.jniwrapper.win32.com.ComException
Returns the show command for a Shell link object.

Specified by:
getShowCmd in interface IShellLink
Returns:
The show command for a Shell link object.
Throws:
com.jniwrapper.win32.com.ComException

setShowCmd

public void setShowCmd(com.jniwrapper.Int iShowCmd)
                throws com.jniwrapper.win32.com.ComException
Sets the show command for a Shell link object. The show command sets the initial show state of the window.

Specified by:
setShowCmd in interface IShellLink
Parameters:
iShowCmd - Value, which specifies the show command
Throws:
com.jniwrapper.win32.com.ComException

getIconLocation

public void getIconLocation(com.jniwrapper.Str pszIconPath,
                            com.jniwrapper.Int cch,
                            com.jniwrapper.Int piIcon)
                     throws com.jniwrapper.win32.com.ComException
Returns the location (path and index) of the icon for a Shell link object.

Specified by:
getIconLocation in interface IShellLink
Parameters:
pszIconPath - String that receives the path of the file containing the icon.
cch - The maximum number of characters to copy to the string pointed to by the pszIconPath parameter.
piIcon - Value that receives the index of the icon.
Throws:
com.jniwrapper.win32.com.ComException

setIconLocation

public void setIconLocation(com.jniwrapper.Str pszIconPath,
                            com.jniwrapper.Int iIcon)
                     throws com.jniwrapper.win32.com.ComException
Sets the location (path and index) of the icon for a Shell link object.

Specified by:
setIconLocation in interface IShellLink
Parameters:
pszIconPath - The path of the file containing the icon.
iIcon - The index of the icon.
Throws:
com.jniwrapper.win32.com.ComException

setRelativePath

public void setRelativePath(com.jniwrapper.Str pszPathRel,
                            com.jniwrapper.UInt32 dwReserved)
                     throws com.jniwrapper.win32.com.ComException
Sets the relative path to the Shell link object.

Specified by:
setRelativePath in interface IShellLink
Parameters:
pszPathRel - String that contains the new relative path. It should be a file name, not a folder name.
dwReserved - Reserved. Set this parameter to zero.
Throws:
com.jniwrapper.win32.com.ComException

resolve

public void resolve(Wnd hwnd,
                    com.jniwrapper.UInt32 fFlags)
             throws com.jniwrapper.win32.com.ComException
Attempts to find the target of a Shell link, even if it has been moved or renamed.

Specified by:
resolve in interface IShellLink
Parameters:
hwnd - A handle to the window that the Shell will use as the parent for a dialog box. The Shell displays the dialog box if it needs to prompt the user for more information while resolving a Shell link.
fFlags - Action flags.
Throws:
com.jniwrapper.win32.com.ComException

setPath

public void setPath(com.jniwrapper.Str pszFile)
             throws com.jniwrapper.win32.com.ComException
Sets the path and file name of a Shell link object.

Specified by:
setPath in interface IShellLink
Parameters:
pszFile - String that contains the new path.
Throws:
com.jniwrapper.win32.com.ComException

getIID

public com.jniwrapper.win32.com.types.IID getIID()
Returns IID of the interface (CLSID_IShellLink)

Returns:
IID of the interface (CLSID_IShellLink)

clone

public java.lang.Object clone()
Creates copy of this instance

Returns:
Copy of this instance