Click here to Skip to main content
16,008,719 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
igor19609-Jul-03 5:18
igor19609-Jul-03 5:18 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
popopo9-Jul-03 9:26
popopo9-Jul-03 9:26 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
Heath Stewart11-Jul-03 8:14
protectorHeath Stewart11-Jul-03 8:14 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
igor196011-Jul-03 9:00
igor196011-Jul-03 9:00 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
Heath Stewart11-Jul-03 9:11
protectorHeath Stewart11-Jul-03 9:11 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
igor196011-Jul-03 9:28
igor196011-Jul-03 9:28 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
Heath Stewart11-Jul-03 9:43
protectorHeath Stewart11-Jul-03 9:43 
GeneralRe: How to make callback from hosted managed component to unmanaged host? Pin
igor196011-Jul-03 10:40
igor196011-Jul-03 10:40 
No question, I absolutely agree with you that the right and reusable way to do this would be to pass IDispatch supported object created in unmanaged part and put logical part of callback into it's Invoke method.
However, I thought, that original poster looks for "simple" and not bnecessarily reusable ways of achieving result. Said that: My feeling is that even with IDispatch solution: at some point you have the same P/Invoke, just implemented by RCW, isn't it? Yes, it would be dynamic, and yes you don't have to implement it. However, you have to inmplement COM objects on unmanaged site.
The only soultion I could think of that doesn't require P/Invoke at some point, would be probably: Creating WinSock port and start listening on it...hehehe
What is better and faster -- I don't know: depends on the project. I don't think that there is better/simplier soultion then just be able to callback as we were always doing in C, but unfortunately that's CLR restrictions.

About your point of making "code versatile" -- that is nice.
QuestionHow to make callback from hosted managed component to unmanaged host? Pin
popopo8-Jul-03 16:17
popopo8-Jul-03 16:17 
AnswerRe: How to make callback from hosted managed component to unmanaged host? Pin
igor19608-Jul-03 21:15
igor19608-Jul-03 21:15 
AnswerRe: How to make callback from hosted managed component to unmanaged host? Pin
leppie9-Jul-03 7:25
leppie9-Jul-03 7:25 
QuestionMath Namespace? Pin
igor19608-Jul-03 14:52
igor19608-Jul-03 14:52 
AnswerRe: Math Namespace? Pin
J. Dunlap8-Jul-03 17:41
J. Dunlap8-Jul-03 17:41 
AnswerRe: Math Namespace? Pin
leppie8-Jul-03 18:26
leppie8-Jul-03 18:26 
GeneralRe: Math Namespace? Pin
igor19608-Jul-03 19:55
igor19608-Jul-03 19:55 
AnswerRe: Math Namespace? Pin
James T. Johnson9-Jul-03 6:12
James T. Johnson9-Jul-03 6:12 
GeneralRe: Math Namespace? Pin
leppie9-Jul-03 7:17
leppie9-Jul-03 7:17 
GeneralRe: Math Namespace? Pin
Not Active9-Jul-03 8:14
mentorNot Active9-Jul-03 8:14 
GeneralRe: Math Namespace? Pin
leppie9-Jul-03 8:28
leppie9-Jul-03 8:28 
GeneralRe: Math Namespace? Pin
Not Active9-Jul-03 9:08
mentorNot Active9-Jul-03 9:08 
GeneralRe: Math Namespace? Pin
igor19609-Jul-03 7:21
igor19609-Jul-03 7:21 
GeneralRandom Number generation PROBLEM Pin
Member 4648617-Jul-03 9:49
Member 4648617-Jul-03 9:49 
GeneralRe: Random Number generation PROBLEM Pin
leppie7-Jul-03 10:08
leppie7-Jul-03 10:08 
GeneralRe: Random Number generation PROBLEM Pin
chris lasater7-Jul-03 10:29
susschris lasater7-Jul-03 10:29 
GeneralRe: Random Number generation PROBLEM Pin
leppie7-Jul-03 10:50
leppie7-Jul-03 10:50 

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.