How can i get the real value of it? (The "final pointer chain" value)
I've tried this:
Code: Select all
Procedure.l GlobalOnLoadExternalResourceHandler(lpszURL.l, *pStream.l, hFPC.l, lParam.l)
Debug *pStream ;This Debug prints "1242692"
@*pStream = *pStream
@*pStream = *pStream
;[...] - Gen the lpData, dwSize and the Empty nWrittenBytes, It's all ok here.
CallFunction(0,"FPC_IStream_Write",pStream, lpData, dwSize, @nWrittenBytes) ;<--- This is a generic function to write in the IStream by receiving it's address. It didn't work. The nWrittenBytes still 0 after it.
In the original version the code is this and everything works:
Code: Select all
Public Function GlobalOnLoadExternalResourceHandler(ByVal lpszURL As Long, ByRef pStream As Long, ByVal hFPC As Long, ByVal lParam As Long) As Long
MsgBox(Str(pStream)) 'This MsgBox prints "21222640" (the real "final" value)
;[...] - Gen the lpData, dwSize and the Empty nWrittenBytes, It's all ok here.
FPC_IStream_Write pStream, ByVal lpData, dwSize, nWrittenBytes ;<--- Here it works. I got 139912 in the nWrittenBytes. And the rest of the program works.
Code: Select all
Public Function GlobalOnLoadExternalResourceHandler(ByVal lpszURL As Long,BYVAL pStream As Long, ByVal hFPC As Long, ByVal lParam As Long) As Long
MsgBox(Str(pStream)) 'This MsgBox prints "1242692" the same value I got in PB.
;[...] - Gen the lpData, dwSize and the Empty nWrittenBytes, It's all ok here.
FPC_IStream_Write pStream, ByVal lpData, dwSize, nWrittenBytes ;<--- I got the same problem that i got in PB. Zero in nWrittenBytes and the same problems in the rest of the program.
Please can someone help me? Is possible to get the real value trought In-Line Assembly? How?
PS: Sorry for my bad english