to execute a hlp file
1 posts in topic
Flat View  Flat View

Posted By:   richa_mehrotra
Posted On:   Monday, March 11, 2002 04:53 AM

how can i invoke a help file of notepad
by clicking on a help button.already have try RunTime.exec use for executable file

Re: to execute a hlp file

Posted By:   Laurent_Mihalkovic  
Posted On:   Monday, March 11, 2002 06:41 PM

i believe the answer in still in using the runtime.exec call. However, you have to try with a fully qualified command line, including the "winhelp.exe" part, and not just "abc.hlp". The reason is that the association between a file extension and an executable is implemented inside the shell layer (shell32.dll), and not inside the CreateProcess API. The runtime.exec function uses the process api directly instead of calling the shell layer.

alternatively, you could also write you own JNI wrapper around the shell32 API.

i think the first method is a tad simpler... ;-)



About | Sitemap | Contact