Click here to Skip to main content
15,887,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Device Running Windows CE 6.0 Pin
Richard MacCutchan4-Jun-19 21:04
mveRichard MacCutchan4-Jun-19 21:04 
AnswerRe: Device Running Windows CE 6.0 Pin
CPallini4-Jun-19 22:28
mveCPallini4-Jun-19 22:28 
Questionhow i can disable key from keyboard of computer using C language Pin
Member 1447157029-May-19 6:45
Member 1447157029-May-19 6:45 
AnswerRe: how i can disable key from keyboard of computer using C language Pin
Victor Nijegorodov29-May-19 8:12
Victor Nijegorodov29-May-19 8:12 
AnswerRe: how i can disable key from keyboard of computer using C language Pin
leon de boer31-May-19 17:10
leon de boer31-May-19 17:10 
AnswerRe: how i can disable key from keyboard of computer using C language Pin
jschell2-Jun-19 8:42
jschell2-Jun-19 8:42 
AnswerRe: how i can disable key from keyboard of computer using C language Pin
David Crow3-Jun-19 9:06
David Crow3-Jun-19 9:06 
QuestionChange value to a thread Pin
_Flaviu29-May-19 3:24
_Flaviu29-May-19 3:24 
I indent to use FindFirstChangeNotification in a class static method in order to use it in a thread, something like this:
C++
DWORD WINAPI FilesWatchDogThread(LPVOID lpParam)
{
      HANDLE hFileChange = ::FindFirstChangeNotification((LPCTSTR)lpParam, // folder path
                                    TRUE,
                                    FILE_NOTIFY_CHANGE_FILE_NAME); 
   if(INVALID_HANDLE_VALUE == hFileChange)
   {
      DWORD dwError = ::GetLastError();
      return dwError;
   }
   
   while(TRUE)
   {
      ::WaitForSingleObject(hFileChange, INFINITE);
      // do my job
      ::FindNextChangeNotification(hFileChange);
   }
   return 0;
}

   // somewhere …
   ::CreateThread(NULL, 0, &CMyClass::FilesWatchDogThread, _T("c:\\temp"), 0, NULL);

but how can Itell the thread when a folder to watch has been changed (I mean _T("c:\\temp") change to _T("e:\\whatever")) ? What should I use for that ? CreateEvent or what ?
AnswerRe: Change value to a thread Pin
Victor Nijegorodov29-May-19 5:28
Victor Nijegorodov29-May-19 5:28 
GeneralRe: Change value to a thread Pin
_Flaviu29-May-19 21:23
_Flaviu29-May-19 21:23 
GeneralRe: Change value to a thread Pin
Victor Nijegorodov29-May-19 23:01
Victor Nijegorodov29-May-19 23:01 
GeneralRe: Change value to a thread Pin
_Flaviu29-May-19 23:23
_Flaviu29-May-19 23:23 
GeneralRe: Change value to a thread Pin
Victor Nijegorodov30-May-19 0:46
Victor Nijegorodov30-May-19 0:46 
GeneralRe: Change value to a thread Pin
_Flaviu29-May-19 23:26
_Flaviu29-May-19 23:26 
GeneralRe: Change value to a thread Pin
leon de boer30-May-19 1:30
leon de boer30-May-19 1:30 
GeneralRe: Change value to a thread Pin
_Flaviu30-May-19 21:08
_Flaviu30-May-19 21:08 
GeneralRe: Change value to a thread Pin
_Flaviu30-May-19 22:12
_Flaviu30-May-19 22:12 
GeneralRe: Change value to a thread Pin
Victor Nijegorodov30-May-19 22:39
Victor Nijegorodov30-May-19 22:39 
GeneralRe: Change value to a thread Pin
_Flaviu30-May-19 23:57
_Flaviu30-May-19 23:57 
GeneralRe: Change value to a thread Pin
Victor Nijegorodov31-May-19 0:01
Victor Nijegorodov31-May-19 0:01 
QuestionKnow when a files has been copied Pin
_Flaviu28-May-19 5:36
_Flaviu28-May-19 5:36 
AnswerRe: Know when a files has been copied Pin
Richard MacCutchan28-May-19 5:50
mveRichard MacCutchan28-May-19 5:50 
AnswerRe: Know when a files has been copied Pin
Victor Nijegorodov28-May-19 20:37
Victor Nijegorodov28-May-19 20:37 
AnswerRe: Know when a files has been copied Pin
Dave Kreskowiak31-May-19 2:49
mveDave Kreskowiak31-May-19 2:49 
QuestionI have 3rd party . OCX file. which loads in HTML scripts and do desired work Pin
Gaurav__Kapoor26-May-19 22:12
Gaurav__Kapoor26-May-19 22:12 

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.