- Joined
- 12/10/09
- Messages
- 7
- Points
- 11
Hello guys
Im trying to make a system, in C# .NET, that distribute market data to Excel sheets using RTD function.
But Im having performance problems to fire events to RTD.
When i fire about 900 events per second, the processor usage go to 100%, and this is very strange
This the COM Interop Interface code:
This is the method that I use the COM Interop Interface:
And this is the DataObject class:
And I make an VB6 to consume this events, it could be a RTD
Im stuck in this performance problem. Does anybody already see this problem before ?
Thanks Guys
Im trying to make a system, in C# .NET, that distribute market data to Excel sheets using RTD function.
But Im having performance problems to fire events to RTD.
When i fire about 900 events per second, the processor usage go to 100%, and this is very strange
This the COM Interop Interface code:
C++:
[Guid("6027F32B-9360-4615-9EFC-A6043806E64A")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface BovespaEvents
{
void UpdateNotify(string strategyname, string symbolname, string fieldname, float fieldvalue);
}
This is the method that I use the COM Interop Interface:
C++:
public void UpdateEvent(DataObject sender)
{
try
{
UpdateNotify(sender.strategy, sender.symbol, sender.field, sender.value);
}
catch (Exception err)
{
LogError("UpdateEvent", err.Message);
if (err.InnerException != null)
{
LogError("UpdateEvent", err.InnerException.Message);
}
}
}
C++:
public class DataObject
{
public string strategy;
public string symbol;
public string field;
public float value;
~DataObject()
{
}
}
C++:
Private Sub myInteropClient_UpdateNotify(ByVal strategyname As String, ByVal symbolname As String, ByVal fieldname As String, ByVal fieldvalue As Single)
'
' code here
'
End Sub
Thanks Guys