Click here to Skip to main content
14,304,074 members
   

Delphi

 
AnswerRe: The Community? Pin
#realJSOP31-Dec-10 4:27
mve#realJSOP31-Dec-10 4:27 
GeneralRe: The Community? Pin
nortee17-Jan-11 23:49
membernortee17-Jan-11 23:49 
QuestionAbout Delphi KeyBoard Hook question,I need your help ! Pin
true_jeamy12-Jun-10 20:36
membertrue_jeamy12-Jun-10 20:36 
AnswerRe: About Delphi KeyBoard Hook question,I need your help ! Pin
dan_fish23-Aug-10 2:52
memberdan_fish23-Aug-10 2:52 
AnswerRe: About Delphi KeyBoard Hook question,I need your help ! Pin
Dr.Walt Fair, PE12-Dec-10 12:36
professionalDr.Walt Fair, PE12-Dec-10 12:36 
AnswerRe: About Delphi KeyBoard Hook question,I need your help ! Pin
nortee12-Dec-10 21:44
membernortee12-Dec-10 21:44 
AnswerRe: About Delphi KeyBoard Hook question,I need your help ! Pin
GAMerritt18-Jan-11 4:52
memberGAMerritt18-Jan-11 4:52 
QuestionExposing C# COM server Events to Delphi client Pin
shilan_hk11-Jun-10 22:08
membershilan_hk11-Jun-10 22:08 
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
AnswerRe: Exposing C# COM server Events to Delphi client Pin
dan_fish23-Aug-10 2:46
memberdan_fish23-Aug-10 2:46 
QuestionDelphi DLL function calling from VB.net and C#.net paramters compatibility Pin
vijay.victory12-Apr-10 0:39
membervijay.victory12-Apr-10 0:39 
AnswerRe: Delphi DLL function calling from VB.net and C#.net paramters compatibility Pin
mobius11100112-Apr-10 2:37
membermobius11100112-Apr-10 2:37 
QuestionUnicode parameter in Select Query Pin
vijay.victory31-Mar-10 19:28
membervijay.victory31-Mar-10 19:28 
AnswerRe: Unicode parameter in Select Query Pin
nortee13-Dec-10 21:34
membernortee13-Dec-10 21:34 
QuestionFreeDOS Scandisk - Compilation Errors for Pascal code Pin
Low_Level14-Mar-10 5:50
memberLow_Level14-Mar-10 5:50 
AnswerRe: FreeDOS Scandisk - Compilation Errors for Pascal code Pin
Richard MacCutchan14-Mar-10 7:13
protectorRichard MacCutchan14-Mar-10 7:13 
GeneralRe: FreeDOS Scandisk - Compilation Errors for Pascal code Pin
Low_Level14-Mar-10 7:31
memberLow_Level14-Mar-10 7:31 
GeneralRe: FreeDOS Scandisk - Compilation Errors for Pascal code Pin
Low_Level14-Mar-10 7:33
memberLow_Level14-Mar-10 7:33 
QuestionSQL Server 2005 Connection Strings.....Some Important Queries Pin
vijay.victory5-Mar-10 21:28
membervijay.victory5-Mar-10 21:28 
AnswerRe: SQL Server 2005 Connection Strings.....Some Important Queries Pin
Eddy Vluggen6-Mar-10 1:11
mveEddy Vluggen6-Mar-10 1:11 
QuestionSlow Performance of SQL Server 2005... Pin
vijay.victory3-Mar-10 2:51
membervijay.victory3-Mar-10 2:51 
AnswerRe: Slow Performance of SQL Server 2005... Pin
Stryder_13-Mar-10 4:36
memberStryder_13-Mar-10 4:36 
GeneralRe: Slow Performance of SQL Server 2005... Pin
vijay.victory4-Mar-10 17:25
membervijay.victory4-Mar-10 17:25 
AnswerRe: Slow Performance of SQL Server 2005... Pin
dan_fish3-Mar-10 5:12
memberdan_fish3-Mar-10 5:12 
GeneralRe: Slow Performance of SQL Server 2005... Pin
vijay.victory4-Mar-10 17:29
membervijay.victory4-Mar-10 17:29 
GeneralRe: Slow Performance of SQL Server 2005... Pin
dan_fish4-Mar-10 23:03
memberdan_fish4-Mar-10 23:03 

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.