 |
| General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 10th, 2005, 06:55 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Communication between two dllâs via events
I have two dll assemblies, one is an c# and the otherone an c++ dll.
The c++ dl is firing an event to the c# which is listeningâ¦
So far, if i build an standard application (exe) everything works fine, if try to acces the dllâs via control (in internet explorer hosted by IIS) , that doesânt work!!!!
I think I have no bug in my code , otherwise it wouldnât work as an application (exe)â¦
Notice: there is no error message, simply no event receiving!!!
HELP!!!
|
|

May 10th, 2005, 03:30 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Can you provide the relevant lines of code that show how you are wiring up the events?
Is it possible that the way the events work that you are expecting something to happen that cannot happen because of the context of a web application?
What type of event does the C++ assembly fire? What's actually happening that you are trying to watch?
- Peter
|
|

May 12th, 2005, 03:07 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by planoie
Can you provide the relevant lines of code that show how you are wiring up the events?
... the code ...
public __delegate void IaxLevelEventHandler(int, int);
public __delegate void IaxTextEventHandler(int , int , System::String* );
public __delegate void IaxStateEventHandler(int , int , int , System::String* , System::String* , System::String* , System::String* );
public __delegate void IaxRegEventHandler(System::String* , int );
...
__event IaxLevelEventHandler* incomingLevel;
__event IaxTextEventHandler* incomingText;
__event IaxStateEventHandler* incomingState;
__event IaxRegEventHandler* incomingReg;
void IncomingLevel(int ilevel, int olevel)
{
incomingLevel(ilevel, olevel);
}
void IncomingText(int type, int callNo, __wchar_t* msg)
{
incomingText(type, callNo, msg );
}
... and so on !!!
I am sure that the events are fired because i call (for testing) the functions like "incomingTect(...)" manually, so they defintively are called!!!
Is it possible that the way the events work that you are expecting something to happen that cannot happen because of the context of a web application?
No, because i fire them manually as i wrote above... :-(
What type of event does the C++ assembly fire? What's actually happening that you are trying to watch?
what wo you mean by "type of event" ??
-Peter
|
|
|

May 12th, 2005, 09:30 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Can you explain in non technical terms what you are trying to accomplish?
(i.e. I have this textbox here, and I'm trying to get some method in this other assembly to run when the textbox change event happens...) This might help us understand what the problem might be.
- Peter
|
|

May 13th, 2005, 02:17 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by planoie
Can you explain in non technical terms what you are trying to accomplish?
ok, i can ;)
well, i have an win32 dll which is an api for Voice over IP (http://iaxclient.sourceforge.net/) this api includes everything for VoIP phoning.
My goal was to build an VoIP Client which is webintegrated, means that it runs in Internet Explorer.
To access this dll with .NET i build a C++ Wrapper Class. I can easily
call Methods from this api and should receive the accordant events. (events are for exampl: incoming call, succesfull registred ...)
this works proper when i build an application (exe) but not in the internet explorer. especially the events do not work in browser, calling the methods works.
hope this makes it clearer to you! ;)
-Peter
|
|
|

May 13th, 2005, 10:33 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
This is what I understand from what you explained:
You are attempting to build a VoIP web based client. So the user will sit on some web page, then when these events occur (i.e. a call comes in) the web client will tell them about it.
You can't do this with an HTML only application. You'll need to write some kind of applet that runs at the browser. There isn't a way to have the server tell the client when something happens because of the disconnected nature of web applications.
Plus, how are you planning on getting the VoIP data to the client? I assume that the goal is to have it so the user can make and receive phone calls thru this client. Is this right? That's going to be pretty darn difficult with a web based client and really isn't the best use of a web application.
- Peter
|
|

August 17th, 2006, 04:40 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Thomas,
can you explain me how are you are sending events between C# dll and C++ dll?
In my case, both dlls are used by same binary (exe). I want to send events (messages) from C# to C++ and vice-versa. If I uses multiple instances of same exe (which uses both above dlls), will it create any problem or what care one has to take? I hope this communication will happen with in process, not across.
Thanks & Regards,
Abhay
|
|
 |