Click here to Skip to main content
15,923,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: pdf as BackGroundImage Pin
Heath Stewart19-Jan-05 8:33
protectorHeath Stewart19-Jan-05 8:33 
GeneralWindows Service Pin
DotNetAppDeveloper19-Jan-05 7:39
DotNetAppDeveloper19-Jan-05 7:39 
GeneralRe: Windows Service Pin
Heath Stewart19-Jan-05 8:08
protectorHeath Stewart19-Jan-05 8:08 
GeneralRe: Windows Service Pin
DotNetAppDeveloper19-Jan-05 9:17
DotNetAppDeveloper19-Jan-05 9:17 
GeneralCalling COM interface from C# Pin
shayw19-Jan-05 7:36
shayw19-Jan-05 7:36 
GeneralRe: Calling COM interface from C# Pin
Heath Stewart19-Jan-05 7:56
protectorHeath Stewart19-Jan-05 7:56 
GeneralRe: Calling COM interface from C# Pin
shayw19-Jan-05 8:20
shayw19-Jan-05 8:20 
GeneralRe: Calling COM interface from C# Pin
Heath Stewart19-Jan-05 8:27
protectorHeath Stewart19-Jan-05 8:27 
When asking questions in technical forums don't hold anything relevant back if you expect a decent answer. Holding back what you think to be insignificant facts from your doctor could mean life or death. It's similar for forums such as this.

Sample code for what you propose is all over in the Platform SDK for component development (COM docs). It's not different in managed code (except for language symantics). Implement your ISink on your native (unmanaged) class, and pass an instance to a managed method that takes an ISink. Whenever the managed method needs to callback to the sink, it calls the method of the ISink implementation instance. This is quite a simplified form of events in the managed world, which takes a delegate (a managed callback, or handler) and - often times - stores them in a list. When an event occurs the list is enumerated (when applicable) and each delegate is invoked.

As far as specific examples I know of none, but you should easily be able to figure out how to make it work. You just pass your ISink instance to managed code and when an event occurs your managed code calls methods on the sink.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Calling COM interface from C# Pin
shayw19-Jan-05 8:48
shayw19-Jan-05 8:48 
GeneralRe: Calling COM interface from C# Pin
Heath Stewart19-Jan-05 8:54
protectorHeath Stewart19-Jan-05 8:54 
GeneralRe: Calling COM interface from C# Pin
shayw20-Jan-05 7:36
shayw20-Jan-05 7:36 
GeneralRe: Calling COM interface from C# Pin
Heath Stewart20-Jan-05 9:35
protectorHeath Stewart20-Jan-05 9:35 
GeneralAccess COM Collection using InvokeMethod Pin
dlgussin19-Jan-05 5:19
dlgussin19-Jan-05 5:19 
GeneralRe: Access COM Collection using InvokeMethod Pin
Heath Stewart19-Jan-05 7:45
protectorHeath Stewart19-Jan-05 7:45 
GeneralRe: Access COM Collection using InvokeMethod Pin
dlgussin19-Jan-05 9:05
dlgussin19-Jan-05 9:05 
GeneralRe: Access COM Collection using InvokeMethod Pin
dlgussin19-Jan-05 15:59
dlgussin19-Jan-05 15:59 
GeneralSMTP Question Pin
WDI19-Jan-05 4:01
WDI19-Jan-05 4:01 
GeneralRe: SMTP Question Pin
Judah Gabriel Himango19-Jan-05 4:42
sponsorJudah Gabriel Himango19-Jan-05 4:42 
GeneralRe: SMTP Question Pin
Heath Stewart19-Jan-05 7:35
protectorHeath Stewart19-Jan-05 7:35 
GeneralExtended Context Menu Pin
realmontanakid19-Jan-05 3:37
realmontanakid19-Jan-05 3:37 
GeneralRe: Extended Context Menu Pin
leppie19-Jan-05 6:08
leppie19-Jan-05 6:08 
GeneralRe: Extended Context Menu Pin
Anonymous19-Jan-05 7:11
Anonymous19-Jan-05 7:11 
GeneralRe: Extended Context Menu Pin
leppie19-Jan-05 8:13
leppie19-Jan-05 8:13 
GeneralRe: Extended Context Menu Pin
mav.northwind19-Jan-05 9:10
mav.northwind19-Jan-05 9:10 
GeneralRe: Extended Context Menu Pin
realmontanakid19-Jan-05 19:27
realmontanakid19-Jan-05 19:27 

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.