Click here to Skip to main content
15,944,136 members
Home / Discussions / COM
   

COM

 
QuestionHow to get flash handle(ocx) in bho Pin
ZEROFIELD19-Jun-10 16:26
ZEROFIELD19-Jun-10 16:26 
AnswerRe: How to get flash handle(ocx) in bho Pin
Richard MacCutchan19-Jun-10 21:30
mveRichard MacCutchan19-Jun-10 21:30 
AnswerRe: How to get flash handle(ocx) in bho Pin
Stephen Hewitt20-Jun-10 16:02
Stephen Hewitt20-Jun-10 16:02 
GeneralRe: How to get flash handle(ocx) in bho Pin
ZEROFIELD20-Jun-10 20:36
ZEROFIELD20-Jun-10 20:36 
GeneralRe: How to get flash handle(ocx) in bho Pin
Stephen Hewitt21-Jun-10 17:30
Stephen Hewitt21-Jun-10 17:30 
GeneralRe: How to get flash handle(ocx) in bho Pin
ZEROFIELD21-Jun-10 17:58
ZEROFIELD21-Jun-10 17:58 
QuestionIssues with MSMQ Events in W2K3 64 bit server Pin
Hariharan.T16-Jun-10 9:08
Hariharan.T16-Jun-10 9:08 
QuestionExposing C# COM server events to delphi client Pin
shilan_hk11-Jun-10 22:10
shilan_hk11-Jun-10 22:10 
Hi everyone,

I have a C# COM dll which I've add to my delphi application . I can access to its methods and properties successfully .but I cannot access to its events .

this is the sample C# code that I found and used:

[ComVisible(false)]
public delegate void CallArrived(object sender, string callData);

/// <summary>
/// Interface to expose SimpleAgent events to COM
/// </summary>
[ComVisible(true)]
[GuidAttribute("1FFBFF09-3AF0-4F06-998D-7F4B6CB978DD")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IAgentEvents
{
///<summary>
/// Handles incoming calls from the predictive manager.
///</summary>
///<param name="sender">The class that initiated this event</param>
///<param name="callData">The data associated with the incoming call.</param>
[DispId(1)]
void OnCallArrived(object sender, string callData);
}

/// <summary>
/// Represents the agent side of the system. This is usually related to UI interactions.
/// </summary>
[ComVisible(true)]
[GuidAttribute("EF00685F-1C14-4D05-9EFA-538B3137D86C")]
[ClassInterface(ClassInterfaceType.None)]
[ComSourceInterfaces(typeof(IAgentEvents))]
public class SimpleAgent
{
/// <summary>
/// Occurs when a call arrives.
/// </summary>
public event CallArrived OnCallArrived;

public SimpleAgent() {}

public string AgentName { get; set; }

public string CurrentPhoneNumber { get; set; }

public void FireOffCall()
{
if (OnCallArrived != null)
{
OnCallArrived(this, "555-123-4567");
}
}
}


and this is the Delphi Sample code which I used :

procedure TForm1.Button1Click(Sender: TObject);

var
intrf : SimpleAgent;

begin

intrf.AgentName ('Name');
end;

I'll appreciate it if anyone could show me the way to access the Event .

Best Regards,
Shialn
Answercross-post Pin
Garth J Lancaster12-Jun-10 0:27
professionalGarth J Lancaster12-Jun-10 0:27 
GeneralRe: cross-post Pin
Stephen Hewitt20-Jun-10 15:30
Stephen Hewitt20-Jun-10 15:30 
Questionregenerate wrappers for ocx library Pin
eusto10-Jun-10 8:43
eusto10-Jun-10 8:43 
AnswerRe: regenerate wrappers for ocx library Pin
Cool_Dev10-Jun-10 19:11
Cool_Dev10-Jun-10 19:11 
AnswerRe: regenerate wrappers for ocx library Pin
«_Superman_»10-Jun-10 19:13
professional«_Superman_»10-Jun-10 19:13 
GeneralRe: regenerate wrappers for ocx library Pin
Stephen Hewitt10-Jun-10 19:45
Stephen Hewitt10-Jun-10 19:45 
GeneralRe: regenerate wrappers for ocx library Pin
eusto10-Jun-10 21:14
eusto10-Jun-10 21:14 
GeneralRe: regenerate wrappers for ocx library Pin
Stephen Hewitt11-Jun-10 18:46
Stephen Hewitt11-Jun-10 18:46 
Questioncom local server Pin
vasuvasanth7-Jun-10 23:06
vasuvasanth7-Jun-10 23:06 
AnswerRe: com local server Pin
Stephen Hewitt8-Jun-10 14:29
Stephen Hewitt8-Jun-10 14:29 
GeneralRe: com local server Pin
vasuvasanth8-Jun-10 21:40
vasuvasanth8-Jun-10 21:40 
GeneralRe: com local server Pin
Stephen Hewitt9-Jun-10 15:21
Stephen Hewitt9-Jun-10 15:21 
Questionwant article for com and dcom Pin
Honeyboy_206-Jun-10 16:35
Honeyboy_206-Jun-10 16:35 
QuestionDirectshow Audio Question Pin
godspeed1233-Jun-10 8:07
godspeed1233-Jun-10 8:07 
QuestionMIDL2020 : error generating type library [modified] Pin
forexsurfr29-May-10 19:09
forexsurfr29-May-10 19:09 
AnswerRe: MIDL2020 : error generating type library Pin
forexsurfr30-May-10 7:29
forexsurfr30-May-10 7:29 
QuestionWindows 7 starting new app instance from Visual Studio 2005 Pin
StevenS_Dev21-May-10 9:42
StevenS_Dev21-May-10 9:42 

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.