From: Thomas Olszewicki on
On Apr 23, 12:42 pm, "Ginny Caughey"
<ginny.caughey.onl...(a)wasteworks.com> wrote:
> Thanks for this Thomas. I've made a change in my Classmate code even though
> I didn't encounter the issue yet. I assume from the additional MemCheckPtr
> code that sometimes you're getting back a bad pointer?
>
> --
>
> Ginny Caugheywww.wasteworks.com

Ginny,
This problem does happen only with 64 bit Windows 7 and IE8.
Several calls to embedded IE8 would crash in GPF.
Some rudimentary debugging shows that pointer to structure sTempVal1
sometimes comes with wrong size.
You can see that this pointer is initialized in function call
variantInit, but the argument of this function is of _WINVARIANTARG
type (Windows OLE type).
CM type is _WINVARIANT (re-declared in CM classes) and that probably
is causing GPF.
Anyway that was fun...
Ginny, could you send it to Brian to review.
Maybe there are some other similar problems in CM.

Thank you
Thomas Olszewicki
CPAS System Inc.
From: Ginny Caughey on
I've sent the email to Brian. Thanks again, Thomas.

--

Ginny Caughey
www.wasteworks.com



From: BatiVenci on
Hi Thomas,

here is what I am doing normally when exporting data to web browser

METHOD Export2HTML() CLASS HolidaysDiary
LOCAL sExpr AS STRING
LOCAL sHTMLExpr AS STRING
LOCAL dwHLD_ID AS DWORD

SELF:Pointer := Pointer{ POINTERHOURGLASS }

IF File( cTempDir + '\' + 'Report1.htm' )
FErase( cTempDir + '\' + 'Report1.htm' )
ENDIF

ToFile( cTempDir + '\' + 'Report1.htm', NewHTMLDocument() )
ToFile( cTempDir + '\' + 'Report1.htm', '<h3><P ALIGN=center><u>' +
sAtsaName + '<br>' + sCenterName + '</u></P></h3>' + CRLF )
sExpr := HTML_FormatText( 'Times New Roman', 5, ,
HTML_BoldText( 'Some TEXT ...' ) )
ToFile( cTempDir + '\' + 'Report1.htm', HTML_NewPara( ,,,,'Center',,
sExpr ) )

ToFile( cTempDir + '\' + 'Report1.htm', '<h3><P ALIGN=center>на: ' +
SELF:sEmpName + '</P></h3>' + CRLF )

....................

ToFile( cTempDir + '\' + 'Report1.htm', HTML_EndBody() )

ShellExecute( SELF:Handle(), PSZ("open"), PSZ( cTempDir + '\' +
'Report1.htm' ), NULL, NULL, SW_SHOWNORMAL )

SELF:Pointer := Pointer{ POINTERARROW }

RETURN TRUE


The ShellExecute() function just starts the default browser and
displays the Report1,htm document.
Tested on XP, Vista and Win7, no problems. Tested with IExplorer,
Firefox. Does not matter how many times You would call the function.
Every new call simply opens a new tab in the browser.

Venci