Click here to Skip to main content
16,005,437 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionconvert long -> CString Pin
minkowski23-Jul-07 4:53
minkowski23-Jul-07 4:53 
AnswerRe: convert long -> CString Pin
Nibu babu thomas23-Jul-07 5:05
Nibu babu thomas23-Jul-07 5:05 
AnswerRe: convert long -> CString Pin
led mike23-Jul-07 5:07
led mike23-Jul-07 5:07 
Questionwhat is the meaning of the L in _bstr_t(L"ROOT\\CIMV2")? Pin
teohs23-Jul-07 4:49
teohs23-Jul-07 4:49 
AnswerRe: what is the meaning of the L in _bstr_t(L"ROOT\\CIMV2")? Pin
Rage23-Jul-07 4:54
professionalRage23-Jul-07 4:54 
GeneralRe: what is the meaning of the L in _bstr_t(L"ROOT\\CIMV2")? Pin
teohs23-Jul-07 5:05
teohs23-Jul-07 5:05 
AnswerRe: what is the meaning of the L in _bstr_t(L"ROOT\\CIMV2")? Pin
David Crow23-Jul-07 5:09
David Crow23-Jul-07 5:09 
QuestionForce a thread to execute an APC? Pin
alex.lavoro.propio23-Jul-07 3:56
alex.lavoro.propio23-Jul-07 3:56 
Hello,

I want to queue a user APC to a thread in the other running process (code injection issue resolved), but it is never executed. I guess the problem is the thread never enter the alertable state. How can I force it to enter the alertable state and executed my queued APC?

However, if I create that foreign process with CREATE_SUSPEND, queue the APC to the primary thread, resume it, the APC will be executed as expected.

I know it's unusual because it's not the designed purpose of APC. The preempted thread may be in a unstable state when executing APC.

I know it can be done easily in the kernel mode, but I am looking for a userland solution. Maybe using some native APIs in NTDLL.DLL, but I've not got any luck.

(1)
SuspendThread(hThread);
QueueUserAPC(apcFunc, hThread, NULL);
NtAlertResumeThread(hThread, &suspendCount);

(2)
QueueUserAPC(apcFunc, hThread, NULL);
NtAlertThread(hThread);

Neither of the above two method works. Do I miss something?
QuestionAPI for UNICODE Pin
sandeepkavade23-Jul-07 3:41
sandeepkavade23-Jul-07 3:41 
AnswerRe: API for UNICODE Pin
Abhijeet Pathak23-Jul-07 3:52
Abhijeet Pathak23-Jul-07 3:52 
AnswerRe: API for UNICODE Pin
Nibu babu thomas23-Jul-07 4:03
Nibu babu thomas23-Jul-07 4:03 
GeneralRe: API for UNICODE Pin
sandeepkavade23-Jul-07 4:36
sandeepkavade23-Jul-07 4:36 
GeneralRe: API for UNICODE Pin
Rage23-Jul-07 4:56
professionalRage23-Jul-07 4:56 
GeneralRe: API for UNICODE Pin
Nemanja Trifunovic23-Jul-07 4:48
Nemanja Trifunovic23-Jul-07 4:48 
GeneralRe: API for UNICODE Pin
Ralf Lohmueller15-Aug-07 17:18
Ralf Lohmueller15-Aug-07 17:18 
QuestionReal time directory listing Pin
KirkNarine23-Jul-07 3:21
KirkNarine23-Jul-07 3:21 
AnswerRe: Real time directory listing Pin
Anurag Gandhi23-Jul-07 3:29
professionalAnurag Gandhi23-Jul-07 3:29 
GeneralRe: Real time directory listing Pin
KirkNarine23-Jul-07 4:11
KirkNarine23-Jul-07 4:11 
AnswerRe: Real time directory listing Pin
David Crow23-Jul-07 3:32
David Crow23-Jul-07 3:32 
GeneralRe: Real time directory listing Pin
KirkNarine23-Jul-07 4:13
KirkNarine23-Jul-07 4:13 
GeneralRe: Real time directory listing Pin
David Crow23-Jul-07 4:20
David Crow23-Jul-07 4:20 
AnswerRe: Real time directory listing Pin
Abhijeet Pathak23-Jul-07 3:36
Abhijeet Pathak23-Jul-07 3:36 
GeneralRe: Real time directory listing Pin
KirkNarine23-Jul-07 4:14
KirkNarine23-Jul-07 4:14 
AnswerRe: Real time directory listing Pin
Abhijeet Pathak23-Jul-07 4:19
Abhijeet Pathak23-Jul-07 4:19 
GeneralRe: Real time directory listing Pin
KirkNarine23-Jul-07 4:25
KirkNarine23-Jul-07 4:25 

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.