Access violation after HtmlHelp window closed 
Author Message
 Access violation after HtmlHelp window closed

Hi,

I am calling HtmlHelp API from my VC++ application. Displaying the help
works fine but after I close HtmlHelp window (Alt+F4), I cannot access
object created in external DLL (Multithreaded DLL) and error message "...
access vialoation ..." appears on that object (in debug). I have tried to
use HtmlHelp in both other thread and single thread (HH_INITIALIZE) and my
app behaves the same.

I don't use MFC in my app.

Many thanks if you can help
--
Miroslav ?ulc

StartNet s.r.o.
Softwarov oddlen

--------------------------------------------------
Vrchlickho 161/5, Praha 5, 150 00, Czech republic
--------------------------------------------------

tel.:       +420 2 57225602
fax:        +420 2 57225592
mob. tel.:  +420 603 711413
--------------------------------------------------
Hlavn strnka: http://www.*-*-*.com/
Obchod:         http://www.*-*-*.com/
Software:       http://www.*-*-*.com/
--------------------------------------------------



Tue, 14 Oct 2003 20:13:15 GMT  
 Access violation after HtmlHelp window closed
You must call Htmlhelp(0, HH_CLOSE_ALL, , ) before closing your application
or you get access violations.  Or is this really Alt+F4 on the actual HHH
Window?
If so are you opening help from the DLL? Try opening from the Executable -
does it help? See some strange things when running HH from DLLs.
--
Rob Chandler [MVP]
http://www.helpware.net


Quote:
> Hi,

> I am calling HtmlHelp API from my VC++ application. Displaying the help
> works fine but after I close HtmlHelp window (Alt+F4), I cannot access
> object created in external DLL (Multithreaded DLL) and error message "...
> access vialoation ..." appears on that object (in debug). I have tried to
> use HtmlHelp in both other thread and single thread (HH_INITIALIZE) and my
> app behaves the same.

> I don't use MFC in my app.

> Many thanks if you can help
> --
> Miroslav ?ulc

> StartNet s.r.o.
> Softwarov oddlen

> --------------------------------------------------
> Vrchlickho 161/5, Praha 5, 150 00, Czech republic
> --------------------------------------------------

> tel.:       +420 2 57225602
> fax:        +420 2 57225592
> mob. tel.:  +420 603 711413
> --------------------------------------------------
> Hlavn strnka: http://www.startnet.cz/
> Obchod:         http://shop.startnet.cz/
> Software:       http://software.startnet.cz/
> --------------------------------------------------



Tue, 14 Oct 2003 21:35:48 GMT  
 Access violation after HtmlHelp window closed
Hi Rob,

I have went through DLLs code and I have realized that I use LoadLibrary()
in DllMain(). MSDN documentation for DllMain() says that it could be source
of strange errors. Now I am moving the LoadLibrary() functions to a separate
initialization functions. Then I will see if this is the cause.

Thank you for your help

M.?.

P.S.: I have also included comments into your message.

Quote:
----- Original Message -----

Newsgroups:
microsoft.public.helpauthoring,microsoft.public.vstudio.helpauthoring,micros
oft.public.vc.language,microsoft.public.vc.ide_general
Sent: Friday, April 27, 2001 3:35 PM
Subject: Re: Access violation after HtmlHelp window closed

> You must call Htmlhelp(0, HH_CLOSE_ALL, , ) before closing your
application
> or you get access violations.

I do not use HH_CLOSE_ALL on application close and that works fine (no
error).

>  Or is this really Alt+F4 on the actual HHH
> Window?

After I close HHH window I cannot access object created in DLL from main
EXE.

> If so are you opening help from the DLL? Try opening from the Executable -
> does it help? See some strange things when running HH from DLLs.

I run HH from the main EXE.

> --
> Rob Chandler [MVP]
> http://www.helpware.net



> > Hi,

> > I am calling HtmlHelp API from my VC++ application. Displaying the help
> > works fine but after I close HtmlHelp window (Alt+F4), I cannot access
> > object created in external DLL (Multithreaded DLL) and error message
"...
> > access vialoation ..." appears on that object (in debug). I have tried
to
> > use HtmlHelp in both other thread and single thread (HH_INITIALIZE) and
my
> > app behaves the same.

> > I don't use MFC in my app.

> > Many thanks if you can help
> > --
> > Miroslav ?ulc

> > StartNet s.r.o.
> > Softwarov oddlen

> > --------------------------------------------------
> > Vrchlickho 161/5, Praha 5, 150 00, Czech republic
> > --------------------------------------------------

> > tel.:       +420 2 57225602
> > fax:        +420 2 57225592
> > mob. tel.:  +420 603 711413
> > --------------------------------------------------
> > Hlavn strnka: http://www.startnet.cz/
> > Obchod:         http://shop.startnet.cz/
> > Software:       http://software.startnet.cz/
> > --------------------------------------------------



Tue, 14 Oct 2003 23:47:05 GMT  
 Access violation after HtmlHelp window closed
Hi,

I have moved the LoadLibrary() from DllMain() to separate initialization
function and that solved the problem.

M.?.



Quote:
> Hi Rob,

> I have went through DLLs code and I have realized that I use LoadLibrary()
> in DllMain(). MSDN documentation for DllMain() says that it could be
source
> of strange errors. Now I am moving the LoadLibrary() functions to a
separate
> initialization functions. Then I will see if this is the cause.

> Thank you for your help

> M.?.

> P.S.: I have also included comments into your message.

> ----- Original Message -----

> Newsgroups:

microsoft.public.helpauthoring,microsoft.public.vstudio.helpauthoring,micros

- Show quoted text -

Quote:
> oft.public.vc.language,microsoft.public.vc.ide_general
> Sent: Friday, April 27, 2001 3:35 PM
> Subject: Re: Access violation after HtmlHelp window closed

> > You must call Htmlhelp(0, HH_CLOSE_ALL, , ) before closing your
> application
> > or you get access violations.

> I do not use HH_CLOSE_ALL on application close and that works fine (no
> error).

> >  Or is this really Alt+F4 on the actual HHH
> > Window?

> After I close HHH window I cannot access object created in DLL from main
> EXE.

> > If so are you opening help from the DLL? Try opening from the
Executable -
> > does it help? See some strange things when running HH from DLLs.

> I run HH from the main EXE.

> > --
> > Rob Chandler [MVP]
> > http://www.helpware.net



> > > Hi,

> > > I am calling HtmlHelp API from my VC++ application. Displaying the
help
> > > works fine but after I close HtmlHelp window (Alt+F4), I cannot access
> > > object created in external DLL (Multithreaded DLL) and error message
> "...
> > > access vialoation ..." appears on that object (in debug). I have tried
> to
> > > use HtmlHelp in both other thread and single thread (HH_INITIALIZE)
and
> my
> > > app behaves the same.

> > > I don't use MFC in my app.

> > > Many thanks if you can help
> > > --
> > > Miroslav ?ulc

> > > StartNet s.r.o.
> > > Softwarov oddlen

> > > --------------------------------------------------
> > > Vrchlickho 161/5, Praha 5, 150 00, Czech republic
> > > --------------------------------------------------

> > > tel.:       +420 2 57225602
> > > fax:        +420 2 57225592
> > > mob. tel.:  +420 603 711413
> > > --------------------------------------------------
> > > Hlavn strnka: http://www.startnet.cz/
> > > Obchod:         http://shop.startnet.cz/
> > > Software:       http://software.startnet.cz/
> > > --------------------------------------------------



Wed, 15 Oct 2003 00:51:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Access violation after HtmlHelp window closed

2. Help for Access violation using HtmlHelp in MFC

3. HTMLHelp Access Violation problem

4. OLE32.DLL Access Violation on close...

5. Access violation in CRecordset.Close()

6. access violation relating to a window

7. Riched20.dll access violation under Windows 2000

8. Windows 98 Access Violation?

9. Splitter Windows Make FrameWnd::OnClose give Access Violation

10. I want to access the IHTMLWindow2 and close the window

11. HTMLHelp API - first-chance exception/ WinHelp vs. HTMLHelp

12. "Access violation" accessing a DLL

 

 
Powered by phpBB® Forum Software