Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - FindExecutable

Posted in WinTask

'
' FindExectuable
'
'

' "shell32.dll" Alias "FindExecutableA"
' (ByVal lpFile As String,
'  ByVal lpDirectory As String,
'  ByVal lpResult As String) As Long
'

Function FindExecutable$(File$)
  Local Exe$
  Local ret
  Exe$="                                                                                 "
  ret=External("shell32.dll", "FindExecutableA", File$, "", Exe$)
  If ret>32 then
   FindExecutable$=Exe$
  else
   FindExecutable$="NOT FOUND - Return code is "+Str$(ret)
  endif
EndFunction

MyFile$="d:\wwf.doc"

Msgbox("The .exe that opens "+MyFile$+" is : "+FindExecutable$(MyFile$))


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now