Changeset 1271 for trunk/dll/arccnrs.c
- Timestamp:
- Nov 10, 2008, 4:58:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1270 r1271 162 162 typedef struct { 163 163 164 CHAR filename[CCHMAXPATH]; 165 HWND hwndCnr; 164 CHAR filename[CCHMAXPATH]; //file passed as MP1 message parameter (file selected) 165 HWND hwndCnr; //hwnd you want the message posted to 166 HWND hwndClient; //hwnd calling this thread; NULL will work 167 ULONG RunFlags; //runemf2 flags see systemf.h 168 CHAR *pszDirectory; 169 CHAR *pszEnvironment; 170 CHAR formatstring[40]; //Usally "%s" 171 CHAR CmdLine[1024]; //Use sprintf to format multipart command line into single string 166 172 } 167 173 WAITCHILD; … … 173 179 HAB thab; 174 180 CHAR *filename; 181 INT ret; 175 182 176 183 DosError(FERR_DISABLEHARDERR); … … 186 193 if (thab) { 187 194 IncrThreadUsage(); 188 priority_normal(); 189 DosWaitEventSem(hWaitChildSem, SEM_INDEFINITE_WAIT); 190 priority_bumped(); 191 if (IsFile(WaitChild->filename) == 1) 192 PostMsg(WaitChild->hwndCnr, UM_ENTER, MPFROMP(filename), MPVOID); 195 priority_bumped(); //normal(); 196 ret = runemf2(WaitChild->RunFlags, WaitChild->hwndClient, pszSrcFile, __LINE__, 197 WaitChild->pszDirectory, WaitChild->pszEnvironment, 198 WaitChild->formatstring, WaitChild->CmdLine); 199 if (ret != -1) { 200 //priority_bumped(); 201 if (IsFile(WaitChild->filename) == 1) 202 PostMsg(WaitChild->hwndCnr, UM_ENTER, MPFROMP(filename), MPVOID); 203 } 193 204 DecrThreadUsage(); 194 205 WinTerminate(thab); 195 206 } 207 xfree(WaitChild->pszDirectory, pszSrcFile, __LINE__); 208 xfree(WaitChild->pszEnvironment, pszSrcFile, __LINE__); 196 209 free(WaitChild); 197 210 } // if WaitChild … … 1560 1573 return 0; 1561 1574 } 1562 runemf2(SEPARATE | ASYNCHRONOUS | WAIT | 1575 sprintf(WaitChild->CmdLine, "%s %s %s", 1576 dcd->info->exwdirs ? dcd->info->exwdirs : 1577 dcd->info->extract, 1578 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1579 BldQuotedFileName(szQuotedMemberName, s)); 1580 /*runemf2(SEPARATE | ASYNCHRONOUS | WAIT | 1563 1581 (fArcStuffVisible ? 0 : BACKGROUND), 1564 dcd->hwndClient, pszSrcFile, __LINE__, dcd->workdir, NULL,1582 , pszSrcFile, __LINE__, dcd->workdir, NULL, 1565 1583 "%s %s %s", 1566 1584 dcd->info->exwdirs ? dcd->info->exwdirs : 1567 1585 dcd->info->extract, 1568 1586 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1569 BldQuotedFileName(szQuotedMemberName, s)); 1587 BldQuotedFileName(szQuotedMemberName, s));*/ 1570 1588 if (!dcd->info->exwdirs) { 1571 1589 p = s; … … 1586 1604 p++; 1587 1605 } 1588 free(s); 1606 free(s); 1607 WaitChild->RunFlags = SEPARATE | ASYNCHRONOUS | WAIT | 1608 (fArcStuffVisible ? 0 : BACKGROUND); 1609 WaitChild->hwndClient = dcd->hwndClient; 1610 WaitChild->pszDirectory = xstrdup(dcd->workdir, pszSrcFile, __LINE__); 1611 WaitChild->pszEnvironment = NULL; 1612 strcpy(WaitChild->formatstring, "%s"); 1589 1613 WaitChild->hwndCnr = dcd->hwndCnr; 1590 1614 rc = _beginthread(WaitChildThread, NULL, 65536, WaitChild);
Note:
See TracChangeset
for help on using the changeset viewer.