Click here to Skip to main content
16,016,750 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: external program Pin
MrChefman20-Apr-06 5:03
MrChefman20-Apr-06 5:03 
QuestionRe: external program Pin
David Crow20-Apr-06 5:13
David Crow20-Apr-06 5:13 
Questionclient app -- web app communication? Pin
Peter Weyzen17-Apr-06 21:24
Peter Weyzen17-Apr-06 21:24 
AnswerRe: client app -- web app communication? Pin
ThatsAlok18-Apr-06 7:42
ThatsAlok18-Apr-06 7:42 
GeneralRe: client app -- web app communication? Pin
Peter Weyzen18-Apr-06 8:36
Peter Weyzen18-Apr-06 8:36 
GeneralRe: client app -- web app communication? Pin
ThatsAlok18-Apr-06 18:23
ThatsAlok18-Apr-06 18:23 
GeneralRe: client app -- web app communication? Pin
Peter Weyzen18-Apr-06 19:26
Peter Weyzen18-Apr-06 19:26 
Questiona problem on threads Pin
keerthikaaa17-Apr-06 21:15
keerthikaaa17-Apr-06 21:15 
hai to all

i have created a thread function
void ThreadRoute1( void* arg )
{
USES_CONVERSION;


HANDLE hDir = CreateFile( "C:\\", // pointer to the file name
FILE_LIST_DIRECTORY, // access (read/write) mode
FILE_SHARE_READ|FILE_SHARE_DELETE, // share mode
NULL, // security descriptor
OPEN_EXISTING, // how to create
FILE_FLAG_BACKUP_SEMANTICS, // file attributes
NULL // file with attributes to copy
);

FILE_NOTIFY_INFORMATION Buffer[1024];
DWORD BytesReturned;
while( ReadDirectoryChangesW(
hDir, // handle to directory
&Buffer, // read results buffer
sizeof(Buffer), // length of buffer
TRUE, // monitoring option
FILE_NOTIFY_CHANGE_SECURITY|
FILE_NOTIFY_CHANGE_CREATION|
FILE_NOTIFY_CHANGE_LAST_ACCESS|
FILE_NOTIFY_CHANGE_LAST_WRITE|
FILE_NOTIFY_CHANGE_SIZE|
FILE_NOTIFY_CHANGE_ATTRIBUTES|
FILE_NOTIFY_CHANGE_DIR_NAME|
FILE_NOTIFY_CHANGE_FILE_NAME, // filter conditions
&BytesReturned, // bytes returned
NULL, // overlapped buffer
NULL// completion routine
))
{
CTime tm = CTime::GetCurrentTime();

CString helper_txt;

switch(Buffer[0].Action)
{
case FILE_ACTION_ADDED: break;
case FILE_ACTION_REMOVED:break;
case FILE_ACTION_MODIFIED: break;
case FILE_ACTION_RENAMED_OLD_NAME: break;
case FILE_ACTION_RENAMED_NEW_NAME: break;
}
int i=0;
do
{
m_Sec.Lock();
int item = pList1->InsertItem(pList1->GetItemCount(), CString(Buffer[i].FileName).Left(Buffer[i].FileNameLength / 2) );

pList1->SetItemText(item, 1, tm.Format("%Y/%m/%d/ - %H:%M:%S"));
i++;
m_Sec.Unlock();
}
while (!Buffer[i].NextEntryOffset);
}
}

i have called the thread by using a button click function.when i click the button the followinf function works

_beginthread( ThreadRoute1, 0,0 );
here i have a problem .the problem i need to pass a directory path which i have written in a edit box .how can i pass that path to the thread function which i created
please help me to solve this problem
Smile | :)
AnswerRe: a problem on threads Pin
Parthiban17-Apr-06 21:23
Parthiban17-Apr-06 21:23 
GeneralRe: a problem on threads Pin
keerthikaaa17-Apr-06 21:29
keerthikaaa17-Apr-06 21:29 
GeneralRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:35
Stephen Hewitt17-Apr-06 21:35 
AnswerRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:25
Stephen Hewitt17-Apr-06 21:25 
GeneralRe: a problem on threads Pin
keerthikaaa17-Apr-06 21:34
keerthikaaa17-Apr-06 21:34 
GeneralRe: a problem on threads Pin
Parthiban17-Apr-06 21:41
Parthiban17-Apr-06 21:41 
GeneralRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:44
Stephen Hewitt17-Apr-06 21:44 
QuestionHow to repaint all child windows from CMainFrame? Pin
Sarvan AL17-Apr-06 21:09
Sarvan AL17-Apr-06 21:09 
AnswerRe: How to repaint all child windows from CMainFrame? Pin
Parthiban17-Apr-06 21:15
Parthiban17-Apr-06 21:15 
GeneralRe: How to repaint all child windows from CMainFrame? Pin
Sarvan AL17-Apr-06 21:32
Sarvan AL17-Apr-06 21:32 
QuestionCreate Mutiple Insatnces of same control Pin
RockyJames17-Apr-06 20:27
RockyJames17-Apr-06 20:27 
AnswerRe: Create Mutiple Insatnces of same control Pin
Cedric Moonen17-Apr-06 20:57
Cedric Moonen17-Apr-06 20:57 
AnswerRe: Create Mutiple Insatnces of same control Pin
Parthiban17-Apr-06 21:10
Parthiban17-Apr-06 21:10 
QuestionParallel port and MFC application integration Pin
christinalimsw17-Apr-06 20:12
christinalimsw17-Apr-06 20:12 
AnswerRe: Parallel port and MFC application integration Pin
Branislav17-Apr-06 22:18
Branislav17-Apr-06 22:18 
QuestionProblem in - typeid - in Release version Pin
Sarvan AL17-Apr-06 18:48
Sarvan AL17-Apr-06 18:48 
AnswerRe: Problem in - typeid - in Release version Pin
Stephen Hewitt17-Apr-06 19:24
Stephen Hewitt17-Apr-06 19:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.