-
guys, consider the following:
Code:
Public Type editstream
dwCookie As Long
dwError As Long
pfnCallback As Long
End Type
the pfnCallback has to be the address of an application defined callback function, how do I go about pushing this in, this is how far I got....
Code:
Dim iResult&
eStream.dwCookie = 9
eStream.dwError = 0&
eStream.pfnCallback = AddressOf EditStreamCallback
I know this is incorrect - I just need some pointers here (scuse the pun :) )
-
yeah, addressof only is valid as a parameter to a function unfortunately :(
so you can't put Addressof Myfunc directly into the type
but there's a simple workaround:
Function ReturnAddress(Byval FuncPtr as long) as long
ReturnAddress = FuncPtr
End function
so:
Dim iResult&
eStream.dwCookie = 9
eStream.dwError = 0&
eStream.pfnCallback = ReturnAddress(AddressOf EditStreamCallback)
-
if you get this to work, can you email me? Im currently trying to get the em_streamout and em_streamin messages to work also. They both use that type declaration.
-
Lord Orwell
Thats why I put the post out, If I get it working i'll post a new thread for ya!