🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.acrobat.reader.pocketpc
Article #11

Re: parameter for acrobat reader 1.0

#11
From: David_M_Boucher
Date: Wed, 28 Jul 2004 01:14
36 lines
2045 bytes
Sure...

"MyCreateProcess" function...

Declare Function MyCreateProcess Lib "coredll" _
        Alias "CreateProcessW" ( _
        ByVal lpApplicationName As String, _
        ByVal lpCommandLine As String, _
        ByVal lpProcessAttributes As Long, _
        ByVal lpThreadAttributes As Long, _
        ByVal bInheritHandles As Long, _
        ByVal dwCreationFlags As Long, _
        ByVal lpEnvironment As Long, _
        ByVal lpCurrentDirectory As Long, _
        ByVal lpStartupInfo As Long, _
        ByVal lpProcessInformation As String) As Long

"Shell" function...

Public Function Shell(ByVal Application As String, ByVal Parameters As String) As Long

Shell = MyCreateProcess(Application, Parameters, 0, 0, 0, 0, 0, 0, 0, (0,0,0,0,))

End Function

Call to shell function...

v_ShellResult = Shell("\Windows\fexplore.exe", _
        grdPdf.TextMatrix(grdPdf.Row, 1))
    If v_ShellResult <> 0 Then MsgBox "Shell() error: " & v_ShellResult

Notice that the "grdPdf.TextMatrix(grdPdf.Row, 1))" is just a reference to the contents of a grid control -- it only contains a path to the pdf file I want to open. I'm actually shelling out to the file explorer and passing the file as a parameter to the shell function.

Hope this helps!

BR... -- Dave
Technical Details
Message-ID: <3bb3d8ff.9@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <3bb3d8ff.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1012e1,387386798ad293dd
X-Google-Attributes: gid1012e1,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: David_M_Boucher@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.acrobat.reader.pocketpc
Subject: Re: parameter for acrobat reader 1.0
Message-ID: <3bb3d8ff.9@webx.la2eafNXanI>
Date: Tue, 27 Jul 2004 18:14:44 -0700
References: <3bb3d8ff.-1@webx.la2eafNXanI>
Lines: 41
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit