Jump to content

DllStruct* alternative use


JohnOne
 Share

Recommended Posts

Concerning the discussion in this thread.

I'm curious why some people deem using DllStructs for anything other than arguments for DllCall, wrong.

If there is some technical reason why it's wrong or foolish or something I sure would like to hear it. In that thread it's mentioned that an ex code dev (probably valik) who was well clued up said it's wrong, and also trancexx who is also clued up and also ex dev mentioned it being a "no no".

One thread is linked but no explanation is given, I'd be mighty obliged if anyone has the link to the other discussion.

I'd like to point out also that DllStructs are used other than in DllCalls inside some standard UDF's,

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I believe I found the other thread, but I still think it could do with explaining as it basically just says "don't mess with the heap, stupid!"

It might also be warning only against passing a DllStruct to or returning them from, functions.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • Moderators

JohnOne,

That was indeed the thread to which I referred earlier.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I agree that it's abuse of DllStruct-commands to use them in the way it's done in the threads you are referring to above.

The problem is that the warnings against DllStruct-commands are spread around all over the forum and used in situations that has nothing to do with this abuse, and situations where DllStruct-commands is the only solution. You can find an example here. This seems to be abuse of the warning. What are we going to do then? Use a proper language like C++?

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...