Jump to content

Ferryman

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

42 profile views

Ferryman's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I would like to display the actual CPU frequency in my app. To determine the CPU frequency I use an external Dll to read the CPU TSC register. The update rate of 1 second would be more than enough, however I cannot figure out how to "loop" the dllcall without locking the other functionality of the GUI (the GUI is unresponsive if the call is looped). $DLL=DllOpen("xxx.dll") $TSCInit = DllCall($DLL, "dword", "Rdtsc", "dword*", "", "dword*", "") Sleep(200) $TSCTerm = DllCall($DLL, "dword", "Rdtsc", "dword*", "", "dword*", "") $TSCInitHi = Hex($TSCInit[2], 8) $TSCInitLo = Hex($TSCInit[1], 8) $TSCTermHi = Hex($TSCTerm[2], 8) $TSCTermLo = Hex($TSCTerm[1], 8) $TSCInitHiLo = $TSCInitHi&$TSCInitLo $TSCInitHiLo = Dec($TSCInitHiLo) $TSCTermHiLo = $TSCTermHi&$TSCTermLo $TSCTermHiLo = Dec($TSCTermHiLo) $TSC = $TSCTermHiLo - $TSCInitHiLo $TSC = $TSC * 5 $TSC = $TSC / 1000000 $TSC = Round($TSC, 2) This loop requires a fixed delay (to determine how much the TSC increases). Also since I want to use as little resources as possible, I would like to set the "polling rate" to 1 second. Is there any way to loop this call without "freezing" to other functionality of the GUI? Thanks
  2. That was simple, thank you I would now have yet another issue. I need to access the physical memory, however it is done with a buffer, and naturally I have no clue how to create one. I have tried with DllStructCreate and MemAlloc, however both methods seem to fail. The required format for the call is: DWORD // Read size(byte), 0: failure WINAPI ReadPhysicalMemory( DWORD_PTR address, // Physical Memory Address PBYTE buffer, // Buffer DWORD count, // Count DWORD unitSize // Unit Size (BYTE, WORD, DWORD) I can easily access the physical memory with another Dll (WinIo), however the driver is unsigned and it would require activation of "Test Mode" on X64 OS. Any help is HIGHLY appreciated, thanks!
  3. I am trying to access CPU MSR registers by using WinRing0 low-level driver. All of the other functions work fine, however I am not able to access any functions which would return multiple values. MSR Read function should return two DWORD;, eax and edx. CPUID function should return quad DWORDs; eax, ebx, ecx, edx. For RdMsr: BOOL // TRUE: success, FALSE: failure WINAPI Rdmsr( DWORD index, // MSR index PDWORD eax, // bit 0-31 PDWORD edx // bit 32-63 For CPUID: BOOL // TRUE: success, FALSE: failure WINAPI Cpuid( DWORD index, // CPUID index PDWORD eax, PDWORD ebx, PDWORD ecx, PDWORD edx $DLL=DllOpen("WinRing0x64.dll") $CPUID1 = DllCall($DLL, "bool", "Cpuid", "dword", "0x00000001", "dword", "", "dword", "", "dword", "", "dword", "") $CPUID1[0] - $CPUID1[5] variables return zero, except $CPUID1[1] which is 1 (0x00000001) of course. Any help would be highly appreciated as I am a total newbie with AutoIT
×
×
  • Create New...