Changeset 1339 for trunk/dll/arccnrs.c
- Timestamp:
- Dec 14, 2008, 3:55:04 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1335 r1339 174 174 typedef struct { 175 175 176 CHAR filename[CCHMAXPATH]; //file passed as MP1 message parameter (file selected)177 176 HWND hwndCnr; //hwnd you want the message posted to 178 177 HWND hwndClient; //hwnd calling this thread; NULL will work 179 178 ULONG RunFlags; //runemf2 flags see systemf.h 180 CHAR *pszDirectory; 181 CHAR *pszEnvironment; 179 ULONG msg; //Message to post 180 UINT uiLineNumber; 181 PCSZ pszSrcFile; 182 CHAR filename[CCHMAXPATH]; //file passed as MP1 message parameter (file selected) 183 CHAR *pszDirectory; //Execution directory 184 CHAR *pszEnvironment; //Enviroment -- NULL passes current 185 CHAR *pszCmdLine; //Use sprintf to format multipart command line into single string 182 186 CHAR formatstring[40]; //Usally "%s" 183 CHAR CmdLine[1024]; //Use sprintf to format multipart command line into single string184 187 } 185 188 WAITCHILD; … … 208 211 IncrThreadUsage(); 209 212 priority_normal(); 210 ret = runemf2(WaitChild->RunFlags, WaitChild->hwndClient, pszSrcFile, __LINE__, 213 ret = runemf2(WaitChild->RunFlags, WaitChild->hwndClient, 214 WaitChild->pszSrcFile, WaitChild->uiLineNumber, 211 215 WaitChild->pszDirectory, WaitChild->pszEnvironment, 212 WaitChild->formatstring, WaitChild-> CmdLine);216 WaitChild->formatstring, WaitChild->pszCmdLine); 213 217 if (ret != -1) { 214 218 if (IsFile(WaitChild->filename) == 1) 215 PostMsg(WaitChild->hwndCnr, UM_ENTER, MPFROMP(filename), MPVOID);219 PostMsg(WaitChild->hwndCnr, WaitChild->msg, MPFROMP(filename), MPVOID); 216 220 } 217 221 DecrThreadUsage(); … … 220 224 xfree(WaitChild->pszDirectory, pszSrcFile, __LINE__); 221 225 xfree(WaitChild->pszEnvironment, pszSrcFile, __LINE__); 226 xfree(WaitChild->pszCmdLine, pszSrcFile, __LINE__); 222 227 free(WaitChild); 223 228 } // if WaitChild … … 1585 1590 1586 1591 WaitChild = xmallocz(sizeof(WAITCHILD), pszSrcFile, __LINE__); 1592 WaitChild->pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__); 1587 1593 if (!WaitChild) 1588 1594 return 0; … … 1593 1599 return 0; 1594 1600 } 1595 sprintf(WaitChild->CmdLine, "%s %s %s", 1596 dcd->info->exwdirs ? dcd->info->exwdirs : 1597 dcd->info->extract, 1598 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1599 BldQuotedFileName(szQuotedMemberName, s)); 1600 /*runemf2(SEPARATE | ASYNCHRONOUS | WAIT | 1601 (fArcStuffVisible ? 0 : BACKGROUND), 1602 , pszSrcFile, __LINE__, dcd->workdir, NULL, 1603 "%s %s %s", 1604 dcd->info->exwdirs ? dcd->info->exwdirs : 1605 dcd->info->extract, 1601 sprintf(WaitChild->pszCmdLine, "%s %s %s", 1602 dcd->info->exwdirs ? dcd->info->exwdirs : 1603 dcd->info->extract, 1606 1604 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1607 BldQuotedFileName(szQuotedMemberName, s)); */1605 BldQuotedFileName(szQuotedMemberName, s)); 1608 1606 if (!dcd->info->exwdirs) { 1609 1607 p = s; … … 1627 1625 WaitChild->RunFlags = SEPARATE | ASYNCHRONOUS | WAIT | 1628 1626 (fArcStuffVisible ? 0 : BACKGROUND); 1629 WaitChild->hwndClient = dcd->hwndClient; 1627 WaitChild->hwndClient = dcd->hwndClient; 1628 WaitChild->msg = UM_ENTER; 1629 WaitChild->uiLineNumber = __LINE__; 1630 WaitChild->pszSrcFile = pszSrcFile; 1630 1631 WaitChild->pszDirectory = xstrdup(dcd->workdir, pszSrcFile, __LINE__); 1631 1632 WaitChild->pszEnvironment = NULL; … … 1900 1901 } 1901 1902 } 1902 1903 1904 1905 1906 1903 z = x; 1904 runemf2(SEPARATE | WINDOWED | WAIT | 1905 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 1906 hwnd, pszSrcFile, __LINE__, 1907 li->targetpath, NULL, "%s", pszCmdLine); 1907 1908 *endofit = 0; 1908 1909 } while (li->list[x]);
Note:
See TracChangeset
for help on using the changeset viewer.