mirror of
https://github.com/reactos/reactos.git
synced 2025-07-05 11:01:25 +00:00
Synchronisation with explorer source code
svn path=/trunk/; revision=15227
This commit is contained in:
parent
7862b7c070
commit
b269a8333e
1 changed files with 13 additions and 3 deletions
|
@ -182,9 +182,9 @@ using namespace _com_util;
|
||||||
|
|
||||||
|
|
||||||
// launch a program or document file
|
// launch a program or document file
|
||||||
extern BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters=NULL);
|
extern BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow=SW_SHOWNORMAL, LPCTSTR parameters=NULL);
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
extern BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow, LPCSTR parameters=NULL);
|
extern BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow=SW_SHOWNORMAL, LPCSTR parameters=NULL);
|
||||||
#else
|
#else
|
||||||
#define launch_fileA launch_file
|
#define launch_fileA launch_file
|
||||||
#endif
|
#endif
|
||||||
|
@ -300,16 +300,22 @@ protected:
|
||||||
struct Thread
|
struct Thread
|
||||||
{
|
{
|
||||||
Thread()
|
Thread()
|
||||||
: _alive(false)
|
: _alive(false),
|
||||||
|
_destroy(false)
|
||||||
{
|
{
|
||||||
_hThread = INVALID_HANDLE_VALUE;
|
_hThread = INVALID_HANDLE_VALUE;
|
||||||
|
_evtFinish = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~Thread()
|
virtual ~Thread()
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
|
||||||
|
CloseHandle(_evtFinish);
|
||||||
CloseHandle(_hThread);
|
CloseHandle(_hThread);
|
||||||
|
|
||||||
|
if (_destroy)
|
||||||
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
|
@ -322,6 +328,8 @@ struct Thread
|
||||||
|
|
||||||
void Stop()
|
void Stop()
|
||||||
{
|
{
|
||||||
|
SetEvent(_evtFinish);
|
||||||
|
|
||||||
if (_alive) {
|
if (_alive) {
|
||||||
{
|
{
|
||||||
Lock lock(_crit_sect);
|
Lock lock(_crit_sect);
|
||||||
|
@ -343,7 +351,9 @@ protected:
|
||||||
static DWORD WINAPI ThreadProc(void* para);
|
static DWORD WINAPI ThreadProc(void* para);
|
||||||
|
|
||||||
HANDLE _hThread;
|
HANDLE _hThread;
|
||||||
|
HANDLE _evtFinish;
|
||||||
bool _alive;
|
bool _alive;
|
||||||
|
bool _destroy;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue