I have managed VirtualAllocEx. Before I declared this function as Private. Then when I moved it to Module file and changed it to Public, I don't get 0 anymore for bufferMem. Also I need to set lpAddress as ByVal. Otherwise, the length of controlName that given is twice than correct length (I don't know exactly how this happens).
Code:
Declare Function VirtualAllocEx Lib "kernel32" _
Leave a comment: