Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ToolBook running Acrobat

1 view
Skip to first unread message

Ben Williams

unread,
Apr 10, 2001, 6:14:28 PM4/10/01
to
Dear ToolBook Wizards:

Hoping someone out there can help me solve my latest puzzle. If I
"run" a .pdf file on WinNT from ToolBook 7.2 (Acrobat is version 4.05),
I get a fatal error in Acrobat while it is starting up ("AcroRd32.exe
Exception: access violation (0xc0000005), Address: 0x00416ab5 as
reported by Dr. Watson). However, if I double-click on the PDF, or RUN
it from WindowNT's RUN dialog, or even if I "run" it from ToolBook 7.2
on Win98, it works fine (also v3.01 of Acrobat works ok from TB 7.2 on
WinNT). Is this some 16-bit vs. 32-bit problem, like maybe the latest
version of Acrobat is overstepping the amount of RAM it is allocated
from a 16-bit application like ToolBook? Would really appreciate any
clues on this...

Ben.

Jeffrey Rhodes

unread,
Apr 10, 2001, 6:58:53 PM4/10/01
to

Hi Ben,

I ran into something similar from Delphi trying to launch a PDF file. I was
using their 16-bit ShellExecute wrapper and getting a GPF. I fixed it by
linking ShellExecuteA() [the 32-bit version] directly. So I would try the
same approach here to see if it helps. If you need a ShellExecuteA example,
let me know and I'll dig one up.

Hope this helps.

Jeff Rhodes
Platte Canyon Multimedia Software Corporation
"Improving the Lives of ToolBook Developers"
http://www.plattecanyon.com

The ToolBook User's Conference
http://www.tbcon.com

Graham Cownie

unread,
Apr 11, 2001, 5:17:21 AM4/11/01
to
Ben,

I don't think this is a 16/32 bit problem. I have an app authored in
Toolbook 6.1 which runs pdf files using the run command. It works fine on
Win NT Sp5.

Graham

Dean Interactive Learning

unread,
Apr 11, 2001, 6:39:35 AM4/11/01
to
Here's what I used to open PDF files in a recent project - this worked on
95, 98 and NT with no problems. Hope it can be some use.

Paul.

-- this routine opens checks for acrobat being installed and opens the PDF
file in it
TO HANDLE OPENPDF string fileName
-- check whether PDF reader installed
local string returnedExecutable;
returnedExecutable = exe("pdf");
-- request returnedExecutable
if not(returnedExecutable <> NULL)then
request "This computer does not have the Acrobat PDF Reader installed.
Would you like to install it now?" with Yes or No
if it is yes then
runstring = quote & (mypath of this book) & "acrobat\ar405eng.exe" &
quote
-- request runstring
run runstring
break handle
end if
else
-- open the pdf
runString = """"& returnedExecutable &"""" && """"&(myPath of this book) &
filename & """"
-- request runstring
run runstring
end
END OPENPDF

-- this routine returns the exe filename associated with a given file type
to get exe string extension
local pMem;
local string tempFile, retVal;
local DWORD dwBufferSize;

linkDLL "tbfile32.dll"
int removeFile32(string);
end

linkDLL32 "shell32.dll"
DWORD FindExecutableA(string, string, pointer32);
end linkDLL32

linkDLL32 "kernel32.dll"
DWORD GetTempPathA(DWORD, pointer32);
pointer32 GlobalAlloc(DWORD, DWORD);
DWORD GlobalFree(pointer32);
end linkdll32

dwBufferSize = 260; -- MAX_PATH
pMem = GlobalAlloc(0, dwBufferSize);

if (GetTempPathA(dwBufferSize, pMem) <> 0) then
tempFile = pointerString32(0, pMem);
if (last char of tempFile <> "\") then
put "\" after tempFile;
end if
else
tempFile = "c:\";
end if

put "$_dummy" after tempFile;

if (first char of extension <> ".") then
put "." after tempFile;
end if

put extension after tempFile;

-- create a dummy file
createFile tempFile;
closeFile tempFile;
if (FindExecutableA(tempFile, "c:\", pMem) > 32) then
retVal = pointerString32(0, pMem);
end if

get GlobalFree(pMem);
get removeFile32(tempFile);
return retVal;
end


--
Dean Interactive Learning Ltd
http://www.deancbt.co.uk

9 The South West Centre
Troutbeck Rd
Sheffield S7 2QA
United Kingdom

Tel: +44 (0)114 258 1171
Fax: +44 (0)114 258 1338


Ben Williams <bewil...@link.com> wrote in message
news:3AD382C3...@link.com...

Ben Williams

unread,
Apr 11, 2001, 4:14:05 PM4/11/01
to
Thanks so much for all the replies! But unfortunately my puzzle has gotten
even more puzzling. We have 2 machines, both Micron ClientPro XLUs with
WinNT 96Megs of RAM, one with SP5 and the other with SP6, both with Acrobat
4.05 loaded, both being run as "administrator". On one (SP5, which just
happens to be the project manager's), after calling up a pdf file about 3 or
4 times from ToolBook 7.2, the Acrobat executable crashes. Once this
happens, it never succeeds again. On the other (SP6), there is never any
problem. But on another machine with WinNT SP6 running as "administrator",
the error also occurs. This Toolbook 7.2 program is calling it via
"ShellExecute" (is that different than ShellExecuteA?) and running through
Neuron. Sigh...

Ben.
"Puzzles, puzzles, everywhere. And no where to hide..."

0 new messages