Visual Basic - acerca de punteros, el problema esta en ingles.

Life is soft - evento anual de software empresarial
 
Vista:

acerca de punteros, el problema esta en ingles.

Publicado por Rocio Roberts (1 intervención) el 18/08/2004 00:33:24
antes que todo! gracias a quien se toma el tiempo para poder responder, el problema que tiene un amigo es el siguiente lamentablemente esta en ingles y esta web es en español.
consulta:

For 6 hours i've been trying to get the data from a pointer in VB. The 8-byte acii codes that i am trying to dereference are appear to be the pointer value itself and are always numbers that increase with each call (never strange ascii characters, just 0 to 9). I was expecting hex or something for the pointer. Anyway, everytime i try to use copymem, it crashes my VB environment.

Public Declare Function FSOUND Lib "fmod.dll" Alias "Sample_Lock@28" (ByRef ptr As Long, ByRef len As Long) As Byte

result = FSOUND(pr, ln)

CopyMem raw_wav$, pr, 100
' trying to get just the first 100 bytes...always crashes badly..many variations have been tried

Public Declare Sub CopyMem Lib "Kernel32" Alias "RtlMoveMemory" (pTo As Any, pFrom As Any, ByVal lCount As Long)

I am getting an 8-byte number from my pointers declared as Long (which are supposed to be just 4 bytes) and i need VB to get the data located at the pointer

Espero que alguien me pueda ayudar, o que me diga alguna pagina donde pueda encontrar alguna ayuda.

Gracias

Rocio
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:acerca de punteros, el problema esta en ingles.

Publicado por SVENSSON Victoria (322 intervenciones) el 18/08/2004 04:33:55
que pruebe con:
Call CopyMem(raw_wav$, byval pr, 100)
que se asegure que raw_wav$ pueda contener el buffer para que no sobreescriba otra parte d ela memoria.

despues no entendi muy bien, eso de 8-byte (quisas seria 8 bits = 1 byte)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar