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

C / C++ / MFC

 
QuestionDetect USB Pendrive Pin
Manmohan2921-Sep-09 3:27
Manmohan2921-Sep-09 3:27 
QuestionRe: Detect USB Pendrive Pin
David Crow21-Sep-09 4:01
David Crow21-Sep-09 4:01 
AnswerRe: Detect USB Pendrive [modified] Pin
Iain Clarke, Warrior Programmer21-Sep-09 6:07
Iain Clarke, Warrior Programmer21-Sep-09 6:07 
JokeRe: Detect USB Pendrive Pin
Rajesh R Subramanian21-Sep-09 9:02
professionalRajesh R Subramanian21-Sep-09 9:02 
GeneralRe: Detect USB Pendrive Pin
Iain Clarke, Warrior Programmer21-Sep-09 9:16
Iain Clarke, Warrior Programmer21-Sep-09 9:16 
JokeRe: Detect USB Pendrive Pin
Moak24-Sep-09 5:01
Moak24-Sep-09 5:01 
QuestionThread pool query Pin
Rajesh R Subramanian21-Sep-09 3:14
professionalRajesh R Subramanian21-Sep-09 3:14 
AnswerRe: Thread pool query Pin
Naveen21-Sep-09 4:04
Naveen21-Sep-09 4:04 
Rajesh R Subramanian wrote:
I was I'm not able to find something like GetThreadCount() the thread pool API.


The CreateToolhelp32Snapshot() function with TH32CS_SNAPTHREAD might be helpful. isnt it?

DWORD GetThreadCount()
{
    THREADENTRY32 stThreadEntry = {0};
    stThreadEntry.dwSize = sizeof( stThreadEntry );
    HANDLE hSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
    if( !Thread32First( hSnap, &stThreadEntry ))
    {
        return 0;
    }
    int nCount = 0;
    DWORD dwCurrentProcessId = GetCurrentProcessId();
    do 
    {
        if( dwCurrentProcessId == stThreadEntry.th32OwnerProcessID )
        {
            nCount ++;
        }
    } while (Thread32Next(hSnap, &stThreadEntry ));
    return nCount;
}



GeneralRe: Thread pool query Pin
Rajesh R Subramanian21-Sep-09 4:42
professionalRajesh R Subramanian21-Sep-09 4:42 
GeneralRe: Thread pool query Pin
Naveen21-Sep-09 7:10
Naveen21-Sep-09 7:10 
GeneralRe: Thread pool query Pin
Rajesh R Subramanian21-Sep-09 7:48
professionalRajesh R Subramanian21-Sep-09 7:48 
QuestionCell change event in Excel Pin
NarVish21-Sep-09 0:35
NarVish21-Sep-09 0:35 
AnswerRe: Cell change event in Excel Pin
Stuart Dootson21-Sep-09 2:35
professionalStuart Dootson21-Sep-09 2:35 
GeneralRe: Cell change event in Excel Pin
NarVish21-Sep-09 20:31
NarVish21-Sep-09 20:31 
GeneralRe: Cell change event in Excel Pin
NarVish23-Sep-09 23:26
NarVish23-Sep-09 23:26 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson24-Sep-09 5:57
professionalStuart Dootson24-Sep-09 5:57 
GeneralRe: Cell change event in Excel Pin
NarVish24-Sep-09 19:32
NarVish24-Sep-09 19:32 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson24-Sep-09 20:11
professionalStuart Dootson24-Sep-09 20:11 
GeneralRe: Cell change event in Excel Pin
NarVish24-Sep-09 21:26
NarVish24-Sep-09 21:26 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson25-Sep-09 4:03
professionalStuart Dootson25-Sep-09 4:03 
GeneralRe: Cell change event in Excel Pin
NarVish29-Sep-09 19:45
NarVish29-Sep-09 19:45 
GeneralRe: Cell change event in Excel Pin
NarVish30-Sep-09 18:29
NarVish30-Sep-09 18:29 
GeneralRe: Cell change event in Excel Pin
NarVish15-Oct-09 1:38
NarVish15-Oct-09 1:38 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson15-Oct-09 2:26
professionalStuart Dootson15-Oct-09 2:26 
GeneralRe: Cell change event in Excel Pin
NarVish15-Oct-09 2:43
NarVish15-Oct-09 2:43 

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.