Help using Addressof operator

O

owais

I have one vb6 application in which it uses one variable

Private m_wndprcNext&

and uses in

SetWindowLong hWndCur, GWL_WNDPROC, m_wndprcNext

one other calling of method is in same class

Sub SubClass(hwnd&)
m_wndprcNext = SetWindowLong(hwnd, GWL_WNDPROC, AddressOf CtlProc)
End Sub

when i convert it into VB.NET the error is for Addressof CtlProc which was resolved

I can declare it with delegate

like this

Delegate Function SubClassProcDelegate(ByVal hwnd As Integer, ByVal msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Declare Function SetWindowLong Lib "USER32.DLL" Alias "SetWindowLongA" (ByVal hwnd As Integer, ByVal attr As Integer, ByVal lVal As SubClassProcDelegate) As Integer


please give me the solution what about the declration of below method calling?

SetWindowLong hWndCur, GWL_WNDPROC, m_wndprcNext

m_wndprcNext is the pointer variable as mention above.

Please help me in this regard. its an urgent

Thanks
owais
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top