Click here to Skip to main content
15,905,071 members
Home / Discussions / C#
   

C#

 
GeneralRe: key logger for windows -sorry i didn't explain my self! Pin
Paul Conrad23-Dec-07 6:02
professionalPaul Conrad23-Dec-07 6:02 
GeneralRe: key logger for windows -sorry i didn't explain my self! Pin
GuyThiebaut23-Dec-07 3:08
professionalGuyThiebaut23-Dec-07 3:08 
GeneralRe: key logger for windows -sorry i didn't explain my self! Pin
eleateam23-Dec-07 3:12
eleateam23-Dec-07 3:12 
GeneralRe: key logger for windows -sorry i didn't explain my self! Pin
Dave Kreskowiak23-Dec-07 4:38
mveDave Kreskowiak23-Dec-07 4:38 
GeneralRe: key logger for windows -sorry i didn't explain my self! Pin
eleateam23-Dec-07 9:23
eleateam23-Dec-07 9:23 
QuestionVC# - Draw Image a GIF animation using code Pin
Shailesh Appukuttan22-Dec-07 17:24
Shailesh Appukuttan22-Dec-07 17:24 
GeneralRe: VC# - Draw Image a GIF animation using code Pin
Christian Graus22-Dec-07 18:44
protectorChristian Graus22-Dec-07 18:44 
GeneralRe: VC# - Draw Image a GIF animation using code Pin
Anthony Mushrow23-Dec-07 0:13
professionalAnthony Mushrow23-Dec-07 0:13 
GeneralRe: VC# - Draw Image a GIF animation using code Pin
Anthony Mushrow23-Dec-07 0:18
professionalAnthony Mushrow23-Dec-07 0:18 
GeneralRe: VC# - Draw Image a GIF animation using code Pin
electriac23-Dec-07 3:43
electriac23-Dec-07 3:43 
GeneralRe: VC# - Draw Image a GIF animation using code Pin
jaiswalrahul15-Dec-08 23:16
jaiswalrahul15-Dec-08 23:16 
GeneralRe: VC# - Draw Image a GIF animation using code Pin
electriac16-Dec-08 0:28
electriac16-Dec-08 0:28 
GeneralRe: VC# - Draw Image a GIF animation using code Pin
tarasn23-Dec-07 4:22
tarasn23-Dec-07 4:22 
QuestionIs there any reason to implement a collection now that we have generics? Pin
JoeRip22-Dec-07 9:27
JoeRip22-Dec-07 9:27 
AnswerRe: Is there any reason to implement a collection now that we have generics? Pin
Christian Graus22-Dec-07 10:00
protectorChristian Graus22-Dec-07 10:00 
AnswerRe: Is there any reason to implement a collection now that we have generics? Pin
PIEBALDconsult22-Dec-07 17:02
mvePIEBALDconsult22-Dec-07 17:02 
AnswerRe: Is there any reason to implement a collection now that we have generics? Pin
darkelv22-Dec-07 17:15
darkelv22-Dec-07 17:15 
GeneralRe: Is there any reason to implement a collection now that we have generics? Pin
JoeRip22-Dec-07 19:56
JoeRip22-Dec-07 19:56 
GeneralRe: Is there any reason to implement a collection now that we have generics? Pin
JoeRip22-Dec-07 20:01
JoeRip22-Dec-07 20:01 
GeneralRe: Is there any reason to implement a collection now that we have generics? Pin
JoeRip22-Dec-07 20:05
JoeRip22-Dec-07 20:05 
GeneralRe: Is there any reason to implement a collection now that we have generics? Pin
PIEBALDconsult23-Dec-07 3:22
mvePIEBALDconsult23-Dec-07 3:22 
AnswerRe: Is there any reason to implement a collection now that we have generics? Pin
Scott Dorman23-Dec-07 1:43
professionalScott Dorman23-Dec-07 1:43 
QuestionC# Managed Event Not Fired In VB6 Event Sink [modified] Pin
wentz22-Dec-07 8:16
wentz22-Dec-07 8:16 
I have a C# class, say PhoneControlX, which is compiled into one DLL and referenced by both managed .NET and Unmanaged COM client (C# Window form and VB6 respectively). Via COM Interop, PhoneControlX implements IPhoneControlX and IPhoneControlXEvents to expose a couple of methods and one event, CauseCallOffered, to VB6 event sink. The C# Window form invokes methods and receive the event without any problem, while the VB6 works fine on method invocation only but fails on event sinking.

Specifically, PhoneControlX registers itself to PhoneControlServer, a remote object gotten via Activator. When a call comes in, PhoneControlServer will invoke CauseCallback to fire the event, PhoneControlCallback and hence PhoneControlCallbackEventHandler. However, when the client is VB6, PhoneControlCallbackEventHandler is never invoked.

Part of the code is as follows:
===============================
[ClassInterface(ClassInterfaceType.None)]
[ComSourceInterfaces( typeof(IPhoneControlXEvents) )]
public class PhoneControlX : MarshalByRefObject, IPhoneControlX
{
  public event PhoneControlXEventHandler OnCallOffered;
  ...
  public bool Connect()
  {
    BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();   
    BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();   
    serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
    IDictionary props = new Hashtable();     
    props["name"] = "RemotingClient";   
    props["port"] = 0;   
    _HttpChannel = new HttpChannel(props, clientProvider, serverProvider);   
    ChannelServices.RegisterChannel(_HttpChannel);

    _PhoneControlServer = (IPhoneControlServer) Activator.GetObject(typeof IPhoneControlServer),remotingURI);
    
    _PhoneControlServer.RegisterCallback(this);
  }

  public void PhoneControlCallbackEventHandler(object sender, IPhoneControlEventArgs e)
  {
    //this event handler is never invoked when PhoneControlX is instantiated by VB6 client.
    PhoneControlXEventHandler xe = new PhoneControlXEventHandler(CauseCallOffered);
    AsyncCallback acbCauseCallOfferedComplete = new AsyncCallback(CauseCallOfferedComplete);
    xe.BeginInvoke(e,acbCauseCallOfferedComplete,PhoneControlOperation.CallOffered);
  }
}

public class PhoneControlServer : MarshalByRefObject, IPhoneControlServer
{
  public event PhoneControlEventHandler PhoneControlCallback;
  ...
  public void RegisterCallback(IPhoneControlX x)
  {
    this.PhoneControlCallback += new PhoneControlEventHandler(x.PhoneControlCallbackEventHandler);
  }
  ...
  public void CauseCallback(IPhoneControlEventArgs e)
  {
    if(this.PhoneControlCallback != null)
      PhoneControlCallback(this,e);
  }
}

I've worked on this problem for almost one week.
Any hints, directions or help is highly appreciated.
modified on Saturday, December 22, 2007 3:13:18 PM

Generalquestions about properties Pin
Xmen Real 22-Dec-07 3:56
professional Xmen Real 22-Dec-07 3:56 
GeneralRe: questions about properties Pin
Christian Graus22-Dec-07 9:18
protectorChristian Graus22-Dec-07 9:18 

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.