Jump to content

Recommended Posts

Posted

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

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...