Sign in to follow this  
Followers 0
archrival

_Singleton crash on x64 with flag 2

7 posts in this topic

The simple script below causes an app crash. Should this be supported or am I missing something obvious?

#include <Misc.au3>
#AutoIt3Wrapper_UseX64=y
If _Singleton("Global\testapp", 2) = 0 Then
Exit
EndIf

Share this post


Link to post
Share on other sites



FYI, I've determined it is this call:

Local $aRet = DllCall("advapi32.dll", "bool", "InitializeSecurityDescriptor", _
"ptr", $pSecurityDescriptor, "dword", $SECURITY_DESCRIPTOR_REVISION)

Share this post


Link to post
Share on other sites

It's a bug. Will be fixed.

Thanks.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Is it a bug in the UDF or the AutoIt code? If it is in the UDF I'd love to know what the fix is.

Share this post


Link to post
Share on other sites

Ditto here.. having saving issue and would love to either hotfix it myself in the UDF. If its not in the UDF, then at least know when it is expected to be fixed in a release.

Thanks!

Share this post


Link to post
Share on other sites

The bug was inside UDF. This was wrong:

; The size of SECURITY_DESCRIPTOR is 20 bytes.  We just
; need a block of memory the right size, we aren't going to
; access any members directly so it's not important what
; the members are, just that the total size is correct.
Local $tSecurityDescriptor = DllStructCreate("dword[5]")

It should be:

Local $tSecurityDescriptor = DllStructCreate("byte;byte;word;ptr[4]")

That's all.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

That works. Thank you.

Share this post


Link to post
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
Sign in to follow this  
Followers 0