Click here to Skip to main content
15,902,275 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pixel Color Pin
Philip Fitzsimons22-Aug-02 0:31
Philip Fitzsimons22-Aug-02 0:31 
GeneralSizing of controls in a status bar Pin
Nnamdi Onyeyiri21-Aug-02 6:36
Nnamdi Onyeyiri21-Aug-02 6:36 
GeneralRe: Sizing of controls in a status bar Pin
leppie21-Aug-02 8:20
leppie21-Aug-02 8:20 
GeneralTypeConverter Attribute and DataSource property Pin
Shaun Wilde21-Aug-02 6:14
Shaun Wilde21-Aug-02 6:14 
GeneralRe: TypeConverter Attribute and DataSource property Pin
Shaun Wilde21-Aug-02 6:53
Shaun Wilde21-Aug-02 6:53 
GeneralC++ CALLBACK to Managed Event Pin
leppie21-Aug-02 5:31
leppie21-Aug-02 5:31 
GeneralRe: C++ CALLBACK to Managed Event Pin
Stephane Rodriguez.21-Aug-02 7:36
Stephane Rodriguez.21-Aug-02 7:36 
GeneralRe: C++ CALLBACK to Managed Event Pin
leppie21-Aug-02 8:00
leppie21-Aug-02 8:00 
Thx Stephane,

That part I think I have understood. The problem is with (un)registering the event from within C# then from within my class I need to activate the unmanaged callback to return to my delegate where some processing gets done, and lastly passing it to C# as an event. Hope it makes sense Smile | :) . Read C# as the class implementing my class.

This is what i have so far, well my logic, but compiler complains Frown | :(

delegate void GetSyncCallBack(IntPtr handle, int channel, int data, int user); //internal

void OnGetSyncCallBack(IntPtr handle, int channel, int data, int user) //internal
{
  //here we trigger the event, this is only a test to trigger
  OnStreamEnd();
}

IntPtr HSYNC;
GetSyncCallBack getSync;

public event EventHandler StreamEnd 
{
  add 
  {
     getSync += new GetSyncCallBack( OnGetSyncCallBack );
     HSYNC = _SetSync(base.Handle, 0, 0, getSync , 0); //platform invoke
  }
  remove
  {
     getSync -= new GetSyncCallBack(OnGetSyncCallBack);
     _RemoveSync(base.Handle, HSYNC); //platform invoke
  }
}

protected virtual void OnStreamEnd()
{
   if (StreamEnd != null) //this is not allowed, why? we do events like this...
   {
      StreamEnd(this, null); //this is not allowed, why?
   }
}


MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc
for more info. Big Grin | :-D
GeneralEUREKA - I have found it :) Pin
leppie21-Aug-02 11:34
leppie21-Aug-02 11:34 
GeneralRe: EUREKA - I have found it :) Pin
Stephane Rodriguez.21-Aug-02 21:31
Stephane Rodriguez.21-Aug-02 21:31 
GeneralRe: EUREKA - I have found it :) Pin
leppie21-Aug-02 21:53
leppie21-Aug-02 21:53 
GeneralRe: EUREKA - I have found it :) Pin
imran_rafique22-Aug-02 0:52
imran_rafique22-Aug-02 0:52 
GeneralRe: EUREKA - I have found it :) Pin
leppie22-Aug-02 1:12
leppie22-Aug-02 1:12 
GeneralRe: EUREKA - I have found it :) Pin
Stephane Rodriguez.22-Aug-02 1:35
Stephane Rodriguez.22-Aug-02 1:35 
QuestionAnyone has any library for lan communication written in c#?? Pin
Wang Kaiming21-Aug-02 5:07
Wang Kaiming21-Aug-02 5:07 
AnswerRe: Anyone has any library for lan communication written in c#?? Pin
Philip Fitzsimons22-Aug-02 0:35
Philip Fitzsimons22-Aug-02 0:35 
GeneralDeriving with "heavy" constructors Pin
EdgarBM21-Aug-02 0:56
EdgarBM21-Aug-02 0:56 
GeneralRe: Deriving with "heavy" constructors Pin
leppie21-Aug-02 1:08
leppie21-Aug-02 1:08 
GeneralRe: Deriving with "heavy" constructors Pin
Ryan Cromwell21-Aug-02 2:48
Ryan Cromwell21-Aug-02 2:48 
GeneralSignature of an object. Pin
4space21-Aug-02 0:54
4space21-Aug-02 0:54 
GeneralComponent from different Forms and DataBinding Pin
Zombies with Coffee, LLC20-Aug-02 11:31
professionalZombies with Coffee, LLC20-Aug-02 11:31 
GeneralRe: Component from different Forms and DataBinding Pin
jparsons20-Aug-02 15:37
jparsons20-Aug-02 15:37 
GeneralQuestion about global common areas Pin
tmagoo20-Aug-02 11:28
tmagoo20-Aug-02 11:28 
GeneralRe: Question about global common areas Pin
Michael Mac20-Aug-02 21:20
Michael Mac20-Aug-02 21:20 
GeneralRe: Question about global common areas Pin
tmagoo21-Aug-02 2:48
tmagoo21-Aug-02 2:48 

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.