Changeset 93 for trunk/helper.cpp
- Timestamp:
- Jul 17, 2021, 9:18:29 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/helper.cpp
r49 r93 25 25 { 26 26 HELPINIT helpInit; 27 PPIB ppib; 28 char *ptr; 29 30 // get the Process Information Block 31 DosGetInfoBlocks(0, &ppib); 32 33 // get a pointer to the environment 34 ptr = ppib->pib_pchenv; 35 36 // loop through the environment strings to find 37 // the null string that terminates it 38 while (*ptr) 39 ptr = strchr(ptr, 0) + 1; 40 41 // the exe's fully-qualified filename starts at the next character 42 ptr++; 27 43 28 44 // if we return because of an error, Help will be disabled … … 46 62 helpInit.fShowPanelId = CMIC_HIDE_PANEL_ID; 47 63 64 CHAR fullExeName[CCHMAXPATH]; 65 CHAR *p;; 66 strcpy(fullExeName, ptr); 67 p = strrchr(fullExeName, '\\'); 68 if (p) 69 *p = 0; 48 70 CHAR ach[_MAX_FNAME+_MAX_EXT]; 49 sprintf (ach, "%s .hlp", pset->QueryString (SEI_LANGUAGEHELP));71 sprintf (ach, "%s\\%s.hlp", fullExeName, pset->QueryString (SEI_LANGUAGEHELP)); 50 72 helpInit.pszHelpLibraryName = PSZ (ach); 51 73
Note:
See TracChangeset
for help on using the changeset viewer.