|
-
May 18th, 2022, 10:41 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Type library: SHELLLNK.TLB#VB5 - IShellLinkA Interface(ANSI), want upgrade to oleexp
Hi fafalone
I this ancient .tlb that I would like to upgrade to yours from ansi to unicode:
Reference=*\G{11269241-F241-11CF-BD9A-00AA00575603}#1.0#0#..\Resources\type libraries\SHELLLNK.TLB#VB 5 - IShellLinkA Interface(ANSI)
Any ideas? Here is the code, I was hoping to change a couple of letters and have it ended up pointing to your functions instead:
Private Function ResolveLink(ByVal sLnkFile As String) As String
'this is called if a file is dropped from explorer is actually a shortcut
Dim sExeFile As String
Dim lBuffLen As Long
Dim cShellLink As ShellLinkA
Dim cPersistFile As IPersistFile
Dim fd As IShellLinkA.WIN32_FIND_DATA
'Bomb out early if no valid info was passed.
If LenB(sLnkFile) Then
If LenB(Dir(sLnkFile, vbNormal Or vbArchive)) Then
'Do the magical mumbo jumbo to resolve the link.
Set cShellLink = New ShellLinkA
Set cPersistFile = cShellLink
cPersistFile.Load StrConv(sLnkFile, vbUnicode), 0&
sExeFile = Space$(255)
lBuffLen = Len(sExeFile)
cShellLink.GetPath sExeFile, lBuffLen, fd, SLGP_UNCPRIORITY
ResolveLink = Trim(sExeFile)
If InStr(1, ResolveLink, Chr$(0)) = Len(ResolveLink) Then
ResolveLink = Left$(ResolveLink, Len(ResolveLink) - 1)
End If
End If
End If
End Function
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|