Click here to Skip to main content
15,908,112 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionCustom user control elements (web control) Pin
Cornelis Kruger4-Jun-08 22:32
Cornelis Kruger4-Jun-08 22:32 
AnswerRe: Custom user control elements (web control) Pin
Ashik Wani5-Jun-08 1:30
Ashik Wani5-Jun-08 1:30 
Questionapplication form size for different OS Pin
sailesh_gupta4-Jun-08 19:41
sailesh_gupta4-Jun-08 19:41 
AnswerRe: application form size for different OS Pin
Ashik Wani5-Jun-08 1:34
Ashik Wani5-Jun-08 1:34 
GeneralRe: application form size for different OS Pin
sailesh_gupta5-Jun-08 2:05
sailesh_gupta5-Jun-08 2:05 
AnswerRe: application form size for different OS Pin
Alan N5-Jun-08 2:27
Alan N5-Jun-08 2:27 
AnswerRe: application form size for different OS Pin
darkelv5-Jun-08 4:46
darkelv5-Jun-08 4:46 
Questiondelegates and effect in c++ com server Pin
dtranter4-Jun-08 3:50
dtranter4-Jun-08 3:50 
Hello

I am using multicast delegate as follows, but the effect in the server is undesirable:

Thing.OnEvent1 += new IThingEvents_OnEvent1EventHandler(OnEvent1);
Thing.OnEvent2 += new IThingEvents_OnEvent2EventHandler(OnEvent2);
Thing.OnEvent3 += new IThingEvents_OnEvent3EventHandler(OnEvent3);

The problem is that the (C++ COM) server it thinks it has all the connections for each event.
So in the below example it trys to send the event 3 times. Apart from the unecessary processing, I am worried it is making the inter-process call each time (the incorrect calls are being thrown away on the client side somewhere).

HRESULT Fire_OnOrderCancel(lots of params)
{
HRESULT hr = S_OK;
T * pThis = static_cast(this);
int cConnections = m_vec.GetSize();

for (int iConnection = 0; iConnection < cConnections; iConnection++)
{
pThis->Lock();
CComPtr punkConnection = m_vec.GetAt(iConnection);
pThis->Unlock();

IDispatch * pConnection = static_cast(punkConnection.p);

if (pConnection)
{
CComVariant avarParams[20];
//set avarParams
CComVariant varResult;

DISPPARAMS params = { avarParams, NULL, 9, 0 };
hr = pConnection->Invoke(1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL);
}
}
return hr;
}

What c#/.net thing do I need to use to get the desired behaviour, namely events to be fired once and the c# client to do the correct delegation?

Many Thanks

deds

QuestionHow can I get the user session ID/Token? Pin
MeNot4-Jun-08 2:39
MeNot4-Jun-08 2:39 
AnswerRe: How can I get the user session ID/Token? Pin
Member 765555715-Feb-11 13:54
Member 765555715-Feb-11 13:54 
GeneralRe: How can I get the user session ID/Token? Pin
Prasanta_Prince14-Apr-11 0:25
Prasanta_Prince14-Apr-11 0:25 
QuestionTrying to access Oracle DB from web service... errors after erros - pls help Pin
dsfdsfsdf3-Jun-08 21:46
dsfdsfsdf3-Jun-08 21:46 
AnswerRe: Trying to access Oracle DB from web service... errors after erros - pls help Pin
dsfdsfsdf4-Jun-08 7:17
dsfdsfsdf4-Jun-08 7:17 
Question.net remoting security problem Pin
Tokes Erno3-Jun-08 20:38
Tokes Erno3-Jun-08 20:38 
AnswerRe: .net remoting security problem Pin
leppie4-Jun-08 2:15
leppie4-Jun-08 2:15 
GeneralRe: .net remoting security problem Pin
Tokes Erno4-Jun-08 2:37
Tokes Erno4-Jun-08 2:37 
GeneralRe: .net remoting security problem Pin
leppie4-Jun-08 4:36
leppie4-Jun-08 4:36 
QuestionCould we have VS.NET 2005 and 2008 onthe same machine (pc or notebook) ? [modified] Pin
bug_aonz3-Jun-08 18:36
bug_aonz3-Jun-08 18:36 
AnswerRe: Could we have VS.NET 2005 and 2008 onthe same machine (pc or notebook) ? Pin
John Ad3-Jun-08 18:57
John Ad3-Jun-08 18:57 
AnswerRe: Could we have VS.NET 2005 and 2008 onthe same machine (pc or notebook) ? Pin
Tariq A Karim9-Jun-08 16:49
Tariq A Karim9-Jun-08 16:49 
QuestionMultiple instances of NTService process [modified] Pin
malharone3-Jun-08 10:36
malharone3-Jun-08 10:36 
AnswerRe: Multiple instances of NTService process Pin
Mike Dimmick3-Jun-08 13:59
Mike Dimmick3-Jun-08 13:59 
GeneralRe: Multiple instances of NTService process Pin
malharone3-Jun-08 21:37
malharone3-Jun-08 21:37 
QuestionRegistering an windows Application to a URL Protocol Pin
asma_panjabi3-Jun-08 3:27
asma_panjabi3-Jun-08 3:27 
QuestionC# Console Program Issue Pin
Verghese2-Jun-08 4:27
Verghese2-Jun-08 4:27 

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.