Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

DllCall with multiple outputs

$
0
0
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


[ autoit ]      
$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 :

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>