Click here to Skip to main content
15,899,754 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to get address of a function or method Pin
TnTinMn1-Jul-13 14:28
TnTinMn1-Jul-13 14:28 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 20:43
treddie1-Jul-13 20:43 
GeneralRe: How to get address of a function or method Pin
TnTinMn2-Jul-13 7:32
TnTinMn2-Jul-13 7:32 
GeneralRe: How to get address of a function or method Pin
treddie2-Jul-13 9:35
treddie2-Jul-13 9:35 
AnswerRe: How to get address of a function or method Pin
Bernhard Hiller1-Jul-13 0:57
Bernhard Hiller1-Jul-13 0:57 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 12:18
treddie1-Jul-13 12:18 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 20:30
treddie1-Jul-13 20:30 
AnswerRe: How to get address of a function or method Pin
Richard Deeming1-Jul-13 1:54
mveRichard Deeming1-Jul-13 1:54 
The AddressOf is fine; it's the P/Invoke declaration which is wrong. You're trying to pass a delegate to a parameter which is declared as taking an IntPtr. In unmanaged code, this would be fine, but in managed code, the parameter types need to match.

To call this method, you would need to declare an overload of the SetWindowLong method with the dwNewLong parameter declared as a WndProc delegate.

However, .NET offers much easier ways to accomplish the same thing. For example, in Windows Forms, you just need to override the WndProc method[^].



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 12:20
treddie1-Jul-13 12:20 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 19:29
treddie1-Jul-13 19:29 
GeneralRe: How to get address of a function or method Pin
Richard Deeming2-Jul-13 1:25
mveRichard Deeming2-Jul-13 1:25 
GeneralRe: How to get address of a function or method Pin
treddie2-Jul-13 9:41
treddie2-Jul-13 9:41 
QuestionHow to express this in a Regex? Pin
Sonhospa28-Jun-13 0:50
Sonhospa28-Jun-13 0:50 
AnswerRe: How to express this in a Regex? Pin
thanh_bkhn28-Jun-13 2:50
professionalthanh_bkhn28-Jun-13 2:50 
News[RESOLVED] Re: How to express this in a Regex? Pin
Sonhospa28-Jun-13 2:59
Sonhospa28-Jun-13 2:59 
QuestionMS at it again Pin
treddie26-Jun-13 19:57
treddie26-Jun-13 19:57 
AnswerRe: MS at it again Pin
Eddy Vluggen27-Jun-13 0:23
professionalEddy Vluggen27-Jun-13 0:23 
GeneralRe: MS at it again Pin
treddie28-Jun-13 11:20
treddie28-Jun-13 11:20 
GeneralRe: MS at it again Pin
Eddy Vluggen3-Jul-13 6:56
professionalEddy Vluggen3-Jul-13 6:56 
AnswerRe: MS at it again Pin
Dave Kreskowiak27-Jun-13 1:52
mveDave Kreskowiak27-Jun-13 1:52 
GeneralRe: MS at it again Pin
treddie28-Jun-13 11:21
treddie28-Jun-13 11:21 
QuestionSize of a Structure Pin
Smith00526-Jun-13 18:51
Smith00526-Jun-13 18:51 
AnswerRe: Size of a Structure Pin
Mycroft Holmes26-Jun-13 19:18
professionalMycroft Holmes26-Jun-13 19:18 
GeneralRe: Size of a Structure Pin
Smith00526-Jun-13 19:47
Smith00526-Jun-13 19:47 
GeneralRe: Size of a Structure Pin
Richard Deeming27-Jun-13 3:09
mveRichard Deeming27-Jun-13 3:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.