genius257 / DllStructEx

Extended DllStruct for AutoIt3
MIT License
2 stars 1 forks source link

Function to replace the data memory pointer #10

Open genius257 opened 3 years ago

genius257 commented 3 years ago

A new function for replacing the DllStruct data memory pointer. This would set the ownPStruct value to 0, free pStruct if ownPStruct is 1 and finally set the pStruct to the new value given. This would be an unsafe function, but important for re-using the same struct for the same struct, like items in a NodeList. A warning should be shown in the comments, and maybe a consolewrite warning if verbosity level is set to write errors.

The name could be: DllStructExSetPtr

Some edge cases to watch out for is child instances (instances where pParent is not zero)