lnkfile

package
v1.0.3-amd64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Load dwMode
	/* Storage instantiation modes */
	STGM_DIRECT           = 0x00000000
	STGM_TRANSACTED       = 0x00010000
	STGM_SIMPLE           = 0x08000000
	STGM_READ             = 0x00000000
	STGM_WRITE            = 0x00000001
	STGM_READWRITE        = 0x00000002
	STGM_SHARE_DENY_NONE  = 0x00000040
	STGM_SHARE_DENY_READ  = 0x00000030
	STGM_SHARE_DENY_WRITE = 0x00000020
	STGM_SHARE_EXCLUSIVE  = 0x00000010
	STGM_PRIORITY         = 0x00040000
	STGM_DELETEONRELEASE  = 0x04000000
	STGM_NOSCRATCH        = 0x00100000
	STGM_CREATE           = 0x00001000
	STGM_CONVERT          = 0x00020000
	STGM_FAILIFTHERE      = 0x00000000
	STGM_NOSNAPSHOT       = 0x00200000
	STGM_DIRECT_SWMR      = 0x00400000
)

consts used for functions

View Source
const (
	SLGP_SHORTPATH        = 0x0001
	SLGP_UNCPRIORITY      = 0x0002
	SLGP_RAWPATH          = 0x0004
	SLGP_RELATIVEPRIORITY = 0x0008
)

IShellLink::GetPath fFlags SLGP_FLAGS

View Source
const FALSE = 0
View Source
const MAX_PATH = 260
View Source
const SHITEMID_SIZE = 500
View Source
const TRUE = 1

Variables

View Source
var (

	// CLSID_ShellLink
	//[ uuid(00021401-0000-0000-C000-000000000046) ] coclass ShellLink { interface IShellLinkW; }
	CLSID_ShellLink *ole.GUID

	//uuid(000214F9-0000-0000-C000-000000000046) IShellLinkW
	IID_IShellLink *ole.GUID

	//uuid(0000010b-0000-0000-C000-000000000046)
	IID_IPersistFile *ole.GUID
)

Functions

func Cov_LPWCHAR_string

func Cov_LPWCHAR_string(p LPWCHAR, max int) (r string)

func Cov_LPWSTR_string

func Cov_LPWSTR_string(p LPWSTR) (r string)

func Cov_PIDLIST_ABSOLUTE_string

func Cov_PIDLIST_ABSOLUTE_string(p PIDLIST_ABSOLUTE) (r string)

func Cov_pLPCOLESTR_string

func Cov_pLPCOLESTR_string(s *LPCOLESTR) (r string)

func Cov_pLPOLESTR_string

func Cov_pLPOLESTR_string(s *LPOLESTR) (r string)

func GetLnkTarget

func GetLnkTarget(lnk string) string

func UTF16PtrToString

func UTF16PtrToString(p *WCHAR, max int) string

UTF16PtrToString is like UTF16ToString, but takes *uint16 as a parameter instead of []uint16. max is how many times p can be advanced looking for the null terminator. If max is hit, the string is truncated at that point.

Types

type BOOL

type BOOL int

type BYTE

type BYTE uint8

type DWORD

type DWORD uint32

type FILETIME

type FILETIME struct {
	// contains filtered or unexported fields
}

type HWND

type HWND uintptr

type IDLIST_ABSOLUTE

type IDLIST_ABSOLUTE ITEMIDLIST

type IPersist

type IPersist struct {
	ole.IUnknown
}

uuid(0000010c-0000-0000-C000-000000000046)

func GetIPersistFromIUnkown

func GetIPersistFromIUnkown(u *ole.IUnknown) *IPersist

func (*IPersist) GetClassID

func (v *IPersist) GetClassID() (pClassID *ole.GUID, err error)

func (*IPersist) VTable

func (v *IPersist) VTable() *IPersistVtbl

type IPersistFile

type IPersistFile struct {
	IPersist
}

uuid(0000010b-0000-0000-C000-000000000046)

func GetIPersistFileFromIUnkown

func GetIPersistFileFromIUnkown(u *ole.IUnknown) *IPersistFile

func (*IPersistFile) GetCurFile

func (v *IPersistFile) GetCurFile() (ppszFileName string, err error)

func (*IPersistFile) IsDirty

func (v *IPersistFile) IsDirty() (err error)

func (*IPersistFile) Load

func (v *IPersistFile) Load(pszFileName string, dwMode uint32) (err error)

func (*IPersistFile) Save

func (v *IPersistFile) Save(pszFileName string, fRemember BOOL) (err error)

func (*IPersistFile) SaveCompleted

func (v *IPersistFile) SaveCompleted(pszFileName string) (err error)

func (*IPersistFile) VTable

func (v *IPersistFile) VTable() *IPersistFileVtbl

type IPersistFileVtbl

type IPersistFileVtbl struct {
	IPersistVtbl
	IsDirty       uintptr
	Load          uintptr
	Save          uintptr
	SaveCompleted uintptr
	GetCurFile    uintptr
}

type IPersistVtbl

type IPersistVtbl struct {
	ole.IUnknownVtbl
	GetClassID uintptr
}
type IShellLink struct {
	ole.IUnknown
}

uuid(000214F9-0000-0000-C000-000000000046)

func GetIShellLinkFromIUnkown

func GetIShellLinkFromIUnkown(u *ole.IUnknown) *IShellLink

func (*IShellLink) GetArguments

func (v *IShellLink) GetArguments(cch int32) (pszArgs string, err error)

func (*IShellLink) GetDescription

func (v *IShellLink) GetDescription() (pszName string, err error)

func (*IShellLink) GetHotkey

func (v *IShellLink) GetHotkey() (pwHotkey *uint16, err error)

func (*IShellLink) GetIDList

func (v *IShellLink) GetIDList() (ppidl string, err error)

func (*IShellLink) GetIconLocation

func (v *IShellLink) GetIconLocation() (pszIconPath string, piIcon *int, err error)

func (*IShellLink) GetPath

func (v *IShellLink) GetPath(fFlags uint32) (pszFile string, err error)

func (*IShellLink) GetShowCmd

func (v *IShellLink) GetShowCmd() (piShowCmd *int, err error)

func (*IShellLink) GetWorkingDirectory

func (v *IShellLink) GetWorkingDirectory() (pszDir string, err error)

func (*IShellLink) QueryInterface

func (v *IShellLink) QueryInterface(iid *ole.GUID) (unk *ole.IUnknown, err error)

func (*IShellLink) Resolve

func (v *IShellLink) Resolve(hwnd HWND, fFlags uint32) (err error)

func (*IShellLink) SetArguments

func (v *IShellLink) SetArguments(s string) (err error)

func (*IShellLink) SetDescription

func (v *IShellLink) SetDescription(s string) (err error)

func (*IShellLink) SetHotkey

func (v *IShellLink) SetHotkey(wHotkey uint16) (err error)

func (*IShellLink) SetIDList

func (v *IShellLink) SetIDList(t string) (err error)

func (*IShellLink) SetIconLocation

func (v *IShellLink) SetIconLocation(s string, iIcon int32) (err error)

func (*IShellLink) SetPath

func (v *IShellLink) SetPath(s string) (err error)

func (*IShellLink) SetRelativePath

func (v *IShellLink) SetRelativePath(s string, dwReserved uint32) (err error)

func (*IShellLink) SetShowCmd

func (v *IShellLink) SetShowCmd(iShowCmd int) (err error)

func (*IShellLink) SetWorkingDirectory

func (v *IShellLink) SetWorkingDirectory(s string) (err error)

func (*IShellLink) VTable

func (v *IShellLink) VTable() *IShellLinkVtbl

type IShellLinkVtbl

type IShellLinkVtbl struct {
	ole.IUnknownVtbl
	GetPath             uintptr
	GetIDList           uintptr
	SetIDList           uintptr
	GetDescription      uintptr
	SetDescription      uintptr
	GetWorkingDirectory uintptr
	SetWorkingDirectory uintptr
	GetArguments        uintptr
	SetArguments        uintptr
	GetHotkey           uintptr
	SetHotkey           uintptr
	GetShowCmd          uintptr
	SetShowCmd          uintptr
	GetIconLocation     uintptr
	SetIconLocation     uintptr
	SetRelativePath     uintptr
	Resolve             uintptr
	SetPath             uintptr
}

type ITEMIDLIST

type ITEMIDLIST struct {
	SHITEMID
}

type LPCOLESTR

type LPCOLESTR *WCHAR

func Cov_string_LPCOLESTR

func Cov_string_LPCOLESTR(s string) (r LPCOLESTR)

type LPCSTR

type LPCSTR *WCHAR

func Cov_string_LPCSTR

func Cov_string_LPCSTR(s string) (r LPCSTR)

type LPCWSTR

type LPCWSTR *WCHAR

func Cov_string_LPCWSTR

func Cov_string_LPCWSTR(s string) (r LPCWSTR)

type LPITEMIDLIST

type LPITEMIDLIST *ITEMIDLIST

typedef /* [wire_marshal] */ ITEMIDLIST __unaligned *LPITEMIDLIST;

type LPOLESTR

type LPOLESTR *WCHAR

type LPWCHAR

type LPWCHAR *WCHAR

type LPWSTR

type LPWSTR *WCHAR

type PCIDLIST_ABSOLUTE

type PCIDLIST_ABSOLUTE *IDLIST_ABSOLUTE

func Cov_string_PCIDLIST_ABSOLUTE

func Cov_string_PCIDLIST_ABSOLUTE(s string) (p PCIDLIST_ABSOLUTE)

type PIDLIST_ABSOLUTE

type PIDLIST_ABSOLUTE *IDLIST_ABSOLUTE

func Cov_string_PIDLIST_ABSOLUTE

func Cov_string_PIDLIST_ABSOLUTE(s string) (p PIDLIST_ABSOLUTE)

type SHITEMID

type SHITEMID struct {
	// contains filtered or unexported fields
}

type USHORT

type USHORT uint16

type WCHAR

type WCHAR uint16

type WIN32_FIND_DATAW

type WIN32_FIND_DATAW struct {
	// contains filtered or unexported fields
}

type WORD

type WORD uint16

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL