Jump to content

[Solved] Dllcall help


Recommended Posts

Here there is a hardwareid.dll, can be used to generate machine code, including HDD, NIC, CPU, BIOS, can be a single, can also be a combination of the four. attachment's inside contains the code written in VB, I tried DLLCALL, but failed.

here is my code.

#include "array.au3"
Local $result = DllCall("HardwareID.dll", "str", "GetHardwareID", "BOOLEAN", False, "BOOLEAN", False , "BOOLEAN", True, "BOOLEAN", True, "str","R5LR-S4TQ")
;_arraydisplay($result)
MsgBox(0,0,$result[0])

 

 

HardwareID VB6.zip

Edited by afoocn
Link to comment
Share on other sites

Check for @error

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

You can do it like this.

 

Local $aRet = DllCall("HardwareID.dll", "long", "GetHardwareId", "bool", False, "bool", False, "bool", True, "bool", True, "str", "", "int", 255)
If Not @error And $aRet[0] > 0 Then
    Local $sHardwareId = $aRet[5]
    MsgBox(0, "HardwareId", $sHardwareId)
EndIf

Saludos

Edited by Danyfirex
Link to comment
Share on other sites

7 hours ago, Danyfirex said:

You can do it like this.

 

Local $aRet = DllCall("HardwareID.dll", "long", "GetHardwareId", "bool", False, "bool", False, "bool", True, "bool", True, "str", "", "int", 255)
If Not @error And $aRet[0] > 0 Then
    Local $sHardwareId = $aRet[5]
    MsgBox(0, "HardwareId", $sHardwareId)
EndIf

Saludos

Thanks a lot @Danyfirex, and both of upstairs.

I found that there is a problem, I use WINDOWS 64-bit version, but also add a line: # PRE_UseX64 = n

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...