Jump to content

Recommended Posts

Posted

I don't think this is true, however (Page 4):

This is the exact same function that is being called when you write Sleep(100) in AutoIt, it's just that AutoIt acts a layer between you and the function.
As you probably understand it's a generalization :D

Thank you, master monoceres, for my DLL-fu grows stronger! There must be great Chi in sitting around eating cereal in your underwear!

:D

Haha, don't forgot the nazi-hat, it's the most important part ;)

Inside Utility.cpp, the util_sleep() function loops "::sleep(0);" until another counter detects timeout. I assume the double colon "::" makes a library reference to the C++ sleep() function. Is that the same thing as calling the Kernel32.dll version of sleep()?

Not exactly, the '::' detones a static method in a class. The method will then probably make a call to Sleep().

Also, while you're already learning so much, Sleep() is not a C++ function, it's a function that's a part of the winapi which is 3d party library from microsoft that enables you to interact with the windows os.

Broken link? PM me and I'll send you the file!

  • 8 months later...
  • 2 months later...
Posted

Hey guys

Is it possible to get this tutoriel in .doc, .rtf, .odf or something like that ?

I want to translate this amazing tutorial for the french community (http://autoitscript.fr), but if i could have the structure it would be easier.

Thx a lot,

Cheers,

Tim

  • 1 month later...
Posted

Hey guys

Is it possible to get this tutoriel in .doc, .rtf, .odf or something like that ?

I want to translate this amazing tutorial for the french community (http://autoitscript.fr), but if i could have the structure it would be easier.

Thx a lot,

Cheers,

Tim

Not sure about Acrobat Reader, but in Acrobat Pro you can highlight -> copy -> and then -> paste the content into an MS Word document. Shouldn't take to long with just 10 pages. :mellow:

-Mike

  • Moderators
Posted

There are a lot of free converters around.

( I didn't check the data against the pdf )

Dealing_with_Dll.doc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

  • 2 weeks later...
Posted

Thx, i already tried your solution but i have OpenOffice and the file .doc converted isn't good. (Some letters are over others, etc...) However i started translation changing the layout.

I already said it, but Thx a lot for this tutorial.

  • 2 months later...
  • 6 months later...
Posted

How do i convert the dll structs here to autoit, its in vb6 and am finding it difficult

Private Declare Function DeviceCapabilities Lib "winspool.drv" Alias "DeviceCapabilitiesW" ( ByVal lpDeviceName As Long, ByVal lpPort As Long, ByVal iIndex As Long, ByVal lpOutput As Long, ByVal lpDevMode As Long) As Long

Private Sub lstPrinters_Click()
    Dim P As Printer
    Dim lngPapers As Long
    Dim strPaperNames As String
    Dim lngPaper As Long
    Dim strPaperName As String
    Dim lngActualLength As Long

    Set P = Printers(lstPrinters.ListIndex)
    lngPapers = DeviceCapabilities(StrPtr(P.DeviceName),   StrPtr(P.Port), DC_PAPERNAMES, 0, 0)
    strPaperNames = String$(lngPapers * 64, 0)
    lngPapers = DeviceCapabilities(StrPtr(P.DeviceName), StrPtr(P.Port), DC_PAPERNAMES, StrPtr(strPaperNames),  0)
    lstPapers.Clear
    For lngPaper = 0 To lngPapers - 1
        strPaperName = Mid$(strPaperNames, 64 * lngPaper + 1, 64)
        lngActualLength = InStr(strPaperName, vbNullChar) - 1
        If lngActualLength > 1 Then strPaperName = Left$(strPaperName, lngActualLength)
        lstPapers.AddItem strPaperName
    Next
End Sub
Posted

This tutorial is mostly aimed for people who have never used DllCall() before or have very limited knowledge about it. In the future I will update it with more advanced topics so more advanced users can make use of it too.

Nice tutorial! And description above is very me. This will help me a lot with my Thanks! :)

Best,
Euler

  • 10 months later...
Posted (edited)

Ok I'm kinda stuck & hope somebody can help me with this here.

I'm following this tutorial but I can't get stuff to work.

I have a dll & it has like COM Properties or idk like "_class::propperty" but how do I call them?

using DLLCall (like I tried) or do I need the ObjGet function? Or both of them combined?

I haven't used dll's & com stuff before but now I need to and now this tutorial did help me understand DLLCall better.

Anybody can push me in the right direction? Do I need DLLCall or ObjGet or both? And how do I use those things from the dll (those that look like "_class::property") in AutoIt?

Edit: I also found a function called "DllGetClassObject" in the dll, can I use that to create an object and then use that to call the properties? If so how?

When I tried it myself it crashed with exit code -1073741819.

Edit: moved to a seperate topic:

Edited by 1RV34
MsgBox(0x40040, "", "Hello Forum!")
  • 2 years later...
Posted

Please post a little more advanced topic..............thanks for this i shall really like you if you teach us a bit more........ keep it up

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Posted

Please post a little more advanced topic..............thanks for this i shall really like you if you teach us a bit more........ keep it up

 

Look into WinAPI/Ex UDF are Great Examples.

Saludos

  • 1 year later...
  • 3 weeks later...
Posted

@monoceres Thanks for this tutorial. Really helpful for those who don't know a lot about dlls. 

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)

 

  • 1 year later...

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
  • Recently Browsing   0 members

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