1. EuCOM Help!

Hi all,

perhaps Matt Lewis or someone expert with EuCOM could help me to prevent 
or trap this error?

F:\EUPHORIA\!HYPro\include\HlpEucom.ew:1124 in function quick_activate()
A machine-level exception occurred during execution of this statement
... called from F:\EUPHORIA\!HYPro\include\HlpEucom.ew:1700 in procedure
init_control()
... called from F:\EUPHORIA\!HYPro\include\HlpEucom.ew:1815 in function
create_com_control()
... called from F:\EUPHORIA\!HYPro\include\HlpEucom.ew:2803 in function
ExpHelpPage()
... called from F:\EUPHORIA\!HYPro\Help_262a.ew:2169 in procedure
onEvent_helpWin()
... called from D:\EUPHORIA\include\win32lib.ew:6855 in function invokeHandler()

... called from D:\EUPHORIA\include\win32lib.ew:24400 in function
MessageProcessor()
... called from D:\EUPHORIA\include\win32lib.ew:24485 in function WndProc()

^^^ call-back from Windows
... called from D:\EUPHORIA\include\w32dll.ew:208 in function w32Func()
... called from F:\EUPHORIA\!HYPro\include\LimitSize.ew:23 in function
LS_SetLimits()

^^^ call-back from Windows
... called from D:\EUPHORIA\include\w32dll.ew:208 in function w32Func()
... called from D:\EUPHORIA\include\win32lib.ew:24425 in function
MessageProcessor()
... called from D:\EUPHORIA\include\win32lib.ew:24485 in function WndProc()

^^^ call-back from Windows
... called from D:\EUPHORIA\include\w32dll.ew:208 in function w32Func()
... called from F:\EUPHORIA\!HYPro\include\LimitSize.ew:23 in function
LS_SetLimits()

^^^ call-back from Windows
... called from D:\EUPHORIA\include\w32dll.ew:279 in procedure w32Proc()
... called from D:\EUPHORIA\include\win32lib.ew:24775 in procedure eventLoop()

... called from D:\EUPHORIA\include\win32lib.ew:24919 in procedure WinMain()
... called from F:\EUPHORIA\!HYPro\HYPro.exw:3390
--> see ex.err

Press Enter...



I am using the EuCOMN procedure as a browser included into a Help program,
mainly
to display local files; the error above randomly arises in such "plain"
conditions)

Thanks a lot.
Antonio Alessi

new topic     » topic index » view message » categorize

2. Re: EuCOM Help!

Antonio Alessi wrote:
> 
> Hi all,
> 
> perhaps Matt Lewis or someone expert with EuCOM could help me to prevent 
> or trap this error?
> 

<snip>

> 
> I am using the EuCOMN procedure as a browser included into a Help program, 
> mainly to display local files; the error above randomly arises in such 
> "plain" conditions)
> 

This actually doesn't help me very much.  Which version of EuCOM are you
using?  I can't match up that line to that function.  Did you change the
file, by chance?

Also, what ActiveX control are you trying to use?

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuCOM Help!

Hi Matt,

I used the EuCOM.ew v2.04, but I see that a v2.07 is available.
Perhaps I should try it before deepening the current problem.

However I do not expressly use any ActiveX control, in that I don't
know what exactly is: I come from Quick Basic and I know very little 
of Windows programming. Just Euphoria, and I have slightly changed 
your file to be interfaced into my help program, a bit complex by the way,
but all the functions were debugged until error free in the normal use 
conditions.

So, let me try the latest version without touching any line.

Antonio A.

new topic     » goto parent     » topic index » view message » categorize

4. Re: EuCOM Help!

Antonio Alessi wrote:
> 
> Hi Matt,
> 
> I used the EuCOM.ew v2.04, but I see that a v2.07 is available.
> Perhaps I should try it before deepening the current problem.
> 
> However I do not expressly use any ActiveX control, in that I don't
> know what exactly is: I come from Quick Basic and I know very little 
> of Windows programming. Just Euphoria, and I have slightly changed 
> your file to be interfaced into my help program, a bit complex by the way,
> but all the functions were debugged until error free in the normal use 
> conditions.
> 
> So, let me try the latest version without touching any line.
> 

The function create_com_control() creates an ActiveX object.  Part of 
creating an ActiveX object is setting up several interfaces to allow 
the object to communicate with your program (through EuCOM).  It's 
failing somewhere in the initialization code, but I don't know exactly 
where.  If you could tell me what ActiveX control you were trying to create,
it would be helpful (best would be if I could replicate your crash on 
my machine).

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

5. Re: EuCOM Help!

Yes, I see now why I kept using the ver. 2.04: the latest version works with the
win32Lib  v0.60.x,
while my application was developed under the v0.59.1 and I cannot upgrade it for
too many problems.

So I strived to adapt the new EuCOM version to the previous Winlib and it seems
to work fine however.
I could not get the same error again until now (but which "same error"?), that's
to say no errors.
A very good work this EuCOM! 

I can show you how I have interfaced it to my program, hoping this will answer
to your question.
After embedding the include shdocvw.ew into the same EuCOM.ew, just after the
init_com() instruction,
these are the routines that were added to the end of the EuCOM file:

function getURL( sequence fileop)

	if equal( "help\\", fileop[1..5]) then
		return HyphenatorDir&"help\\"&fileop[6..$] 
	else
		return fileop
	end if
	
end function
--- ========

global procedure helpOn_go( atom id, atom bstr, sequence params)

    bstr = alloc_bstr( getURL( getText(URL)))
-- Note that I didn't use WebBrowser_m_Navigate2.  I did this in order to
-- have invoke call GetIdsOfNames for me to get the dispid of URL.  EuCOM stops
-- calling GetIdsOfNames at the first atom it runs into, so you have to look up
-- Navigate2 as well, rather than using the constant.
VOID = invoke( Browser, {"Navigate2", "URL"}, {bstr}, {VT_BSTR},
    DISPATCH_METHOD)
    free_bstr(bstr)
end procedure
--- =========

global function ExpHelpPage( integer ExpHelp, sequence webUrls)  -- activate the
Browser
sequence prm
	
	if not Win then
Win = createEx( Window, "", helpWin, 35, 43, {w32Edge, 0}, {w32Edge, 0},
{WS_CHILD, WS_VISIBLE}, 0)
		prm = getCtlSize( helpWin) -{44, 77}
		URL = create( Combo, "", Win, 0, 3, prm[1], 200, CBS_AUTOHSCROLL) 
Browser = create_com_control( WebBrowser_clsid_ix, getHandle( Win), -4, 24,
prm[1]+4, prm[2]+2)
		setHandler( Browser, w32HResize, routine_id( "Resize_theWin"))
		bar = create( LText, "", Win, -1, 24, {w32Edge, 0}, 2,0)		
		setWindowBackColor( bar, getSysColor( COLOR_WINDOW))
		
		addNewItem( URL, webUrls)      
		setIndex( URL, length( webUrls))
setHandler( {URL, getEdit( URL)}, {w32HChange, w32HKeyPress}, routine_id(
"helpOn_go"))
	else
		if ExpHelp then
			closeWindow( Win)
		else
			openWindow( Win, 1)
			setFocus( Browser)
		end if
	end if

	if not ExpHelp then helpOn_go(1,1,{}) end if
	return not ExpHelp

end function
--- ========

It deals with a "browser mode"/"normal text window" toggle, where the problem
arised at first.
For more details you can browse
http://www.hyphenator.com/tutorial/context_help.htm - EuCOM is
simulated to the bottom of the page. That can give you an idea on how various
windows are being
opened and closed onto the same area, switching the browser on/off by
setVisible( Win, 0/1)
(it might look like a miracle that all these do work toghether!).

I will keep you informed if any error will appear again.
Have a nice day.
Antonio Alessi

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu