Private Declare Sub RtlMoveMemory Lib "kernel32" (ByVal hpvDest As Any, ByVal hpvSource As Any, ByVal nBytes As Long)The parameters passed are setup as:
Dim lngStrAddress As Long Dim bytePhrase(500) As ByteThen lngStrAddress is set to a memory pointer. So far I have all that working as well and I do have the memory pointer in VFP as well. So far, so good. Then the VB code passes this memory pointer to the RtlMoveMemory() function as:
RtlMoveMemory VarPtr(bytePhrase(0)), lngStrAddress, 500
My version of the RtlMoveMemory() declaration gives me an error -5 at this point.ByteToString = StrConv(bytePhrase, vbUnicode)
Thats what the VB code does. I am obviously failing to correctly call the RtlMoveMemory() function. I think because I don't do the VarPtr() function and/or because of incorrect parameter declaration. But the above is the exact commands from the VB code.