|
-
Mar 8th, 2001, 05:19 AM
#1
Thread Starter
Fanatic Member
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 )
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Mar 9th, 2001, 01:13 PM
#2
Hyperactive Member
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)
buzzwords are the language of fools
-
Mar 9th, 2001, 10:11 PM
#3
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.
-
Mar 12th, 2001, 08:03 AM
#4
Thread Starter
Fanatic Member
Lord Orwell
Thats why I put the post out, If I get it working i'll post a new thread for ya!
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|