Results 1 to 8 of 8

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    AMD fan EvilDevil_'s Avatar
    Join Date: Dec:2010
    Location:
    Posts: 1,275

    GetCurrentProcessorNumber KERNEL32.dll Windows XP

    .
    BF3 Windows XP .
    Microsoft Vista 7. , , XP.
    Code:
    //
    // GetCurrentProcessorNumber.cpp
    //
    // an XP version of GetCurrentProcessorNumber()
    //
    // 14/11/07 first version
    //
    
    #include "stdafx.h"
    
    #define   NTHREADS 8
    
    //
    // GetCurrentProcessorNumberXP
    //
    
    DWORD GetCurrentProcessorNumberXP(void)
    {
        _asm {mov eax, 1}
        _asm {cpuid}
        _asm {shr ebx, 24}
        _asm {mov eax, ebx}
    }
    
    //
    // thread procedure
    //
    DWORD WINAPI threadProc(LPVOID p)
    {
        printf("thread %d:\tlogical CPU %d\n", (int) p, GetCurrentProcessorNumberXP());
    
        clock_t t = clock() + 100;  // consume 100ms ...
        while (clock() < t)              // of CPU time
    
        return 0;
    }
    
    //
    // _tmain
    //
    int _tmain(int argc, _TCHAR* argv[])
    {
        for (int i = 0; i < NTHREADS; i++)
            CreateThread(NULL, 0, threadProc, (LPVOID) i, 0, NULL);
    
        _getch(); // stop console window disappearing prematurely
        return 0;
    
    }
    /Hidden: Code

    dll, ? , ?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	dll.JPG‎ 
Views:	296 
Size:	12.4 KB 
ID:	44232  

    Laa shay'a waqi'un moutlaq bale kouloun moumkine.
    Nulla &#233; reale, tutto &#233; lecito.

  2. #2
    The Conquerer I Be RazorJack's Avatar
    Join Date: Jul:2001
    Location:
    Posts: 3,108
    dll

  3. #3
    AMD fan EvilDevil_'s Avatar
    Join Date: Dec:2010
    Location:
    Posts: 1,275
    . . dll-a.

    Laa shay'a waqi'un moutlaq bale kouloun moumkine.
    Nulla &#233; reale, tutto &#233; lecito.

  4. #4
    The Conquerer I Be RazorJack's Avatar
    Join Date: Jul:2001
    Location:
    Posts: 3,108
    windows-

  5. #5
    Registered abUser ike's Avatar
    Join Date: Jul:2004
    Location: sofi
    Posts: 4,965
    Have no fear ike iz here.
    CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color

  6. #6
    AMD fan EvilDevil_'s Avatar
    Join Date: Dec:2010
    Location:
    Posts: 1,275
    , . XP -. ?

    Laa shay'a waqi'un moutlaq bale kouloun moumkine.
    Nulla &#233; reale, tutto &#233; lecito.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |