Home > Software engineering >  Consult, how to read and write memory data in VB6.0 by use environment?
Consult, how to read and write memory data in VB6.0 by use environment?

Time:10-19

As title, in the process of programming to read values specify the location of the memory, I don't know what to do? Address 0 x42340000.

CodePudding user response:

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any Source, As Any, ByVal Length As Long)


Dim aBuffer (31) as byte
Call CopyMemory (abuffer (0), byval & amp; H42340000, 27) 'starting address 0 x42340000 place, 27 byte read content in aBuffer


But I think you 0 x42340000 seem to say is "third party" program?
If it is, use the ReadProcessMemory () and so on several other across processes read API,

CodePudding user response:

In A program called Declare Function YaLiOne Lib "RBIC1_VB. DLL" Alias "OutLin" (ByVal Zp1m As Single, ByVal Zp2m As Single, ByVal As A Single, ByVal B As Single, c0 As Long, c1 As Long) As Boolean;
C prototype for DLLDIR BOOL OutLin (float Zp1m, float Zp2m, float A, float B, float * C0, C1 float *); In the event of known c0 under the premise of AD=1110704128, get the value of c0? Thank you master!

CodePudding user response:

reference 1st floor Chen8013 response:
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any Source, As Any, ByVal Length As Long)


Dim aBuffer (31) as byte
Call CopyMemory (abuffer (0), byval & amp; H42340000, 27) 'starting address 0 x42340000 place, 27 byte read content in aBuffer


But I think you 0 x42340000 seem to say is "third party" program?
If it is, use the ReadProcessMemory () and so on several other across processes read API,

+ 1

CodePudding user response:

refer to the second floor sxfxmjw001 response:
in A program called Declare Function YaLiOne Lib "RBIC1_VB. DLL" Alias "OutLin" (ByVal Zp1m As Single, ByVal Zp2m As Single, ByVal As A Single, ByVal B As Single, c0 As Long, c1) As Long As Boolean;
C prototype for DLLDIR BOOL OutLin (float Zp1m, float Zp2m, float A, float B, float * C0, C1 float *); In the event of known c0 under the premise of AD=1110704128, get the value of c0? Thank you master!

Float in C/C + +, Java and other languages, is a Single type of VB, and the Single precision floating point number, length is 4 bytes,

Should do as you say like this, is to "process" memory address, CopyMemory will be used to solve the ah,

API as I wrote in 1 f, read as follows:
 Dim vC0 As Single,'s vC1 As Single 

CopyMemory vC0, ByVal 1110704128, 4
'writing is the same: 1110704128=0 x42340000
'CopyMemory vC0, ByVal & amp; H42340000, 4

'if * C1 value in Long variable XXX, read * C1 value:
CopyMemory's vC1, ByVal XXX, 4

CodePudding user response:

Help me top, turning point