Jump to content

Search the Community

Showing results for tags 'getfilesize'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Member Title




Found 1 result

  1. Hello Autoit, I'm very new to DllCall function, in fact never used it, but I'm just curious about it. I found @toasterking's awesome beginner friendly dll GUI: I searched for some easier functions (less input / less output parameters), and I found GetFileSize function (I didn't modify his code, just using the GUI): https://learn.microsoft.com/en-gb/windows/win32/api/fileapi/nf-fileapi-getfilesize So, this is what I did: The function itself is executing like this, but the output is 0 and -1 DllCall("kernel32.dll","int","GetFileSize","HANDLE","D:\DllCall GetFileSize Example.au3","DWORD*","$hello") Then, I tried to execute my script (very simple) and put it into D drive: ;DllCall("kernel32.dll", "int", "GetFileSize", "HANDLE", "D:\DllCall GetFileSize Example.au3") $aDllCallReturn = DllCall("kernel32.dll","int","GetFileSize","HANDLE","D:\DllCall GetFileSize Example.au3","DWORD*","$hello") For $i = 0 To UBound($aDllCallReturn) - 1 ConsoleWrite($i & ": " & $aDllCallReturn[$i] & @CRLF) ;MsgBox(0, $i, $aDllCallReturn[$i]) Next ;ConsoleWrite($hello & @CRLF) The result is as the following (same as the screenshot): 0: -1 1: 0x00000000 2: 0 This file size is 403 bytes in my computer, it's very small, I expected to see 403 somewhere, but I don't know where I made it wrong. So, now I have some questions: 1. Do I really need to use lpFileSizeHigh or can I use "hello"? 2. Do I always have to put $ in the beginning of the parameter? I tried without $ in his GUI, I got an error. So, I think $ is a must. 3. But if I write as $hello (expecting this will store the file size), when I ConsoleWrite it, Autoit becomes angry because "undeclared global variable". 4. If somehow $hello will be the output to my file size, why do I need to return an array $aDllCallReturn which contains 3 elements? So, I have one $hello + 3 items from the array = I have 4 outputs total. But Microsoft says this function has only one return "[out, optional] LPDWORD lpFileSizeHigh ". I'm confused. Please note that; the goal for me is to use the DllCall function, not to get the file size by using FileGetSize() or some other existing functions.
  • Create New...