Subj : Re: Accessing WinHelp files from application To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Fri Feb 11 2005 09:39 am David Ayre wrote: >I tried WinExec("hh.exe help.chm#Topic", SW_SHOW); and I got >an error message 'Can't open file help.chm#Topic'. If I leave >off the #Topic it opens the help file at the beginning. >I've tried everything I can think off but that's the best I can do. This works. #include int main() { STARTUPINFO si = {sizeof(si),0}; PROCESS_INFORMATION pi = {0}; char param[1024]; char Prog[] = "hh.exe"; char Help[] = "..\\system\\html\\manual\\v6manual.htm"; char Topic[] = "AddressIssues"; wsprintf( param,"%s %s#%s",Prog,Help,Topic); /* this works if i copy hh.exe to the working directory */ CreateProcess( Prog, param, 0, 0, FALSE, 0, 0, 0, &si, &pi); /* this works without copying hh.exe */ CreateProcess( NULL, param, 0, 0, FALSE, 0, 0, 0, &si, &pi); /* this also works */ WinExec(param, SW_SHOW); return 0; } .