Skip to content
Home > Paltalk > Paltalk Timer

Paltalk Timer

Viewing 15 posts - 61 through 75 (of 143 total)
  • Author
    Posts
  • #186077
    Chike
    Member

    Oh wow return code has meaning, who would have thought.
    To figure it out all you need is to google the function name it the meaning of each return code will be in the documentention.
    Now back to teh code and examine carefullt those return codes.
    And here’s another jint for you” you may need to call GetLastError.

    #186076
    cyberpunk
    Member

    Chike,

    I read up on the CloseHandle function and found out a zero is not a good thing afterall lol. so that is what return codes are for lol.

    I am trying to find out what the error is now, It looks like I need to figure out how to use Err.LastDLLError now.
    even after following examples all i get from Err.LastDLLError is a zero, which doesn’t tell me as much as I was hoping lol

    I just wanted to say all the help is appreciated, I know it is frustrating dealing with someone that should have the basics down before being at this point.

    #186075
    Chike
    Member

    Use a call to windoe’s GetLastError, that will always work.
    What is CloseHandle and VirtualFreeEx functions decleration?
    BTW the value of result is valid after making the call, meaning when the debugger is line after, when the yellow arrow is pointing on the line it has not been excecuted yet.

    #186074
    cyberpunk
    Member

    yeah, it took me a while to figure out it was trigger after it passed the line. I am definately getting a 1 on all CloseHandle runthroughs. The zero is on the VirtualFreeEx, and yes I checked that documentation and low and behold a zero there is not a good thing either. So, clearly this is the problem point, thanks chike for letting see the troubleshooting process play out. I see how these tools play together. At first runthrough in the VirtualFreeEx docs I am wondering if I might want to think about the MEM_DECOMMIT instead? After reading it looks like MEM DECOMMIT would possibly make it worse lol. MEM_RELEASE certainly appears to be the right way to go. I will google some more.

    GetLastError is not declared. I did see on MSDN that VB is suppose to use the Err.LastDLLError property now, but I certainly could be wrong, but they printed it in bold on the CloseHandle Doc page. the example i found used a MessageBox to display the last error code using the Err.LastDLLError property. it returns a zero as well, which doesn’t tell me what the error is. bummer.

    So all I know for certain is the thing is not closing the process. again bummer.

    #186073
    Chike
    Member

    It’s weird CloseHandle returns an error.
    Do I need to beg you for functions declerations?

    Yes you need to declare it dllomport, something like

    Declare Auto Function GetLastError lib "kernel32.dll" () As ULong 

    Here, now GetLastError is declared.

    #186072
    cyberpunk
    Member

    Ah lol
    I did see that request and truly did forget about it, lol

    ANd, No, I edited that out or the original post. It is fine. it is VirtualFreeEx thans returns a zero

    Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As Integer, ByVal flAllocationType As Integer, ByVal flProtect As Integer) As IntPtr
    Declare Function VirtualFreeEx Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As Integer, ByVal dwFreeType As Integer) As Integer
    Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As LV_ITEMA, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As LV_ITEMA, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    #186071
    Chike
    Member

    @ManicMike wrote:

    ANd, No, I edited that out or the original post. It is fine. it is VirtualFreeEx thans returns a zero

    for that I would write code like this


    if VirtualFreeEx(..) = 0 then
    result = GetLastError()
    endif

    That would get you closer to what you are looking for.

    Is all the code originaly from autopilot code, or someone else?

    #186070
    cyberpunk
    Member

    Yeah, it is autopilot’s code originally, but I have messed with it some, but very little. But any obvious errors are certainly my contribution lol
    Working on getting your last suggestion working now, thanks again

    #186069
    Chike
    Member

    No it’s not that of an obviouse error.
    Well it depends who you ask, but it is hidden in a trickt way.

    #186068
    cyberpunk
    Member

    I got some 20digit number as a return value….Not sure I have this working right.
    It consistently returns the same 20 digit value too, i am starting to wonder if this is the starting address of the memory being used, but does that help me? lol

    #186067
    Chike
    Member

    @ManicMike wrote:

    I got some 20digit number as a return value….Not sure I have this working right

    From GetLastError using this code?

    Declare Auto Function GetLastError lib "kernel32.dll" () As ULong 

    You should get onlt 2 digits.
    The return code is only meaningful it there was a call that failed and before making any other call.

    #186066
    Chike
    Member

    @ManicMike wrote:

    i am starting to wonder if this is the starting address of the memory being used, but does that help me? lol

    Of both ponters? And if it is how the @#$% did you build the user name?

    #186065
    cyberpunk
    Member

    Ok, let me explain how I got the GetLastError to work first and how I used it.

    I first started out with your examples, but there were some expected arguments and I ad libbed with help from the IDE. It suggested I import the System.Runtime.interopservices and then it gave an error on the DLLImport itself but led me to suspect i could comment it out and run with your Declare statement and it all seemed error free. So I put the If statement in your final post right after the VirtualFreeEx statement and as I go through and VirtualFreeEx gets its 0 it runs through the If statement and returns this 20 digit number after it processes the GetLastError statement

    #186064
    cyberpunk
    Member

    lol…Chike, it was about three weeks of screwing around with autopilots functions in loco’s adminbot and voila! lol

    #186063
    cyberpunk
    Member

    Let me also add that I am doing my breakpoint using the Status sub assuming both subs have the same issue. just the Status is the first place it hits and seemed like the logical breakpoint. I just set another breakpoint in the other name sub with the same conditional statement and am getting the same 20 digit number

    I forgot to add another ad lib that might explain the 20 digit number. I edited this part of the if statement

    if VirtualFreeEx(..) = 0 then
    result = GetLastError()
    endif

    to

    if result = 0 then
    result = GetLastError()
    endif

    that seemed logical but suddenly is making me wonder if that is why it is acting weirder than you expected

    And yes directly following the VirtualFreeEx statement right before the closeHandle

Viewing 15 posts - 61 through 75 (of 143 total)
  • You must be logged in to reply to this topic.