Jump to content

Image Search UDF 2.2.1.2 conflict with #include <GuiListView.au3>


 Share

Go to solution Solved by Danp2,

Recommended Posts

Hi, im using #include "_ImageSearch_UDF.au3" this but i have to use;

#include <GuiListView.au3>

this as well, but when i include both in, im getting error as;

C:\Program Files (x86)\AutoIt3\Include\SecurityConstants.au3"(63,30) : error: $TOKENPRIMARY previously declared as a 'Const'

So to be able to run Script i have to delete one of the #include, is there anyway to solve this? i have to include both like;

#RequireAdmin
#include "_ImageSearch_UDF.au3"
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListViewConstants.au3>
#include <MsgBoxConstants.au3>
#include <GuiListView.au3>

<GuiListView.au3> gives this error. thank you.

Edited by tellme
Link to comment
Share on other sites

  • Solution

It appears that these lines are copied from SecurityConstants.au3 --

Global Enum $TOKENPRIMARY = 1, $TOKENIMPERSONATION
Global Enum $SECURITYANONYMOUS = 0, $SECURITYIDENTIFICATION, $SECURITYIMPERSONATION, $SECURITYDELEGATION

You can comment them out in the ImageSearch UDF, but then you will likely need to #include SecurityConstants.au3

Link to comment
Share on other sites

Another option would be to rename the constants within _ImageSearch_UDF.au3

Global Enum $_TOKENIMPERSONATION, $_SECURITYIMPERSONATION

Only these two are used in the #Region  #INTERNAL_USE_ONLY

; #INTERNAL_USE_ONLY#============================================================================================================
#Region  #INTERNAL_USE_ONLY

[...]
Func _CanAccessFolder($sDir, $genericAccessRights = 0x40000000)
    [...]
    Local $hImpersonatedToken = _ImageSearchDLL_DuplicateTokenEx($hToken, 0, $_SECURITYIMPERSONATION, $_TOKENIMPERSONATION)

[...]

It is then no longer a requirement to include the SecurityConstants.au3.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

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