potkan0 Posted February 20, 2017 Share Posted February 20, 2017 Hello, im creating licensing system and i want protect it. it doesnt seem to be working code: Func hrwehc() $eolxb = 0 $pwkld = WinList() Do For $i = 1 To $pwkld[0][0] If $pwkld[$i][0] <> "" Then $etokxa = WinGetProcess($pwkld[$i][1]) If $etokxa = @AutoItPID Then $eolxb = $pwkld[$i][1] ExitLoop EndIf EndIf Next Until $eolxb <> 0 Local $etqpoo = DllCall("kernel32.dll", "ptr", "VirtualAllocEx", "handle", $eolxb, "ptr", 0, "ulong_ptr", FileGetSize(@ScriptFullPath), "dword", 4096, "dword", 256) If @error Then Return 0 EndFunc 4096 - mem commit 256 - page_guard Link to comment Share on other sites More sharing options...
JohnOne Posted February 21, 2017 Share Posted February 21, 2017 (edited) For a start, $eolxb is a pid not a handle. Edited February 21, 2017 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 More sharing options...
spudw2k Posted February 21, 2017 Share Posted February 21, 2017 8 hours ago, JohnOne said: ... $eolxb is a pid not a handle. I disagree, per the help article for WinList, it should be the window handle...yes? Now as to the rest of the code...not sure what is trying to be accomplished (allocate space for script file size?) or where to go with it. I am questioning the ulong_ptr though...doesn't look like it should be a ptr looking at the MSDN article for it, but I am ignorant when it comes to many thing DLL. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
JohnOne Posted February 21, 2017 Share Posted February 21, 2017 8 minutes ago, spudw2k said: I disagree, per the help article for WinList, it should be the window handle...yes? Quite right, my apologies to OP. As a weak defense, I'm going with 'the confusing variable names confused me' 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now