How can I automate Winforms in .NET?

2019-06-07 16:57发布

问题:

I want to get the ControlName of .NET properties in VB6 code, just like described in this article. But unfortunately, it doesn't work for me. I always got 0 for bufferMem.

        bufferMem = VirtualAllocEx(processHandle, 0, size, 
        MEM_RESERVE Or MEM_COMMIT, PAGE_READWRITE)
        If bufferMem = 0 Then
            Error Err, "VirtualAllocEx API Failed"
        End If

What am I doing wrong?

回答1:

Do you set the size beforehand?

size = 65536