Passing events form dll to c#

M

Maarten

Hi,

My C# program calls, trough some sort of wrapper, DLL functions of a text to
speech engine. This (dll)wrapper also provides information about the state of
the engine (start event, word event, stop event).
Is it possible to route these events directly to my program, so I do not
have to poll them frequently? The wrapper code can be modified without any
problem

Thanks in advance.
 
M

Mansi Shah

Hi,

I think you have to manually convert the dll classes to your site's
app_code directory, from where you can access them and modify them..

Hope this helps..

Regards,
Mansi Shah
 
P

Peter Duniho

Maarten said:
Hi,

My C# program calls, trough some sort of wrapper, DLL functions of a text to
speech engine.

I assume the TTS DLL is unmanaged code?
This (dll)wrapper also provides information about the state of
the engine (start event, word event, stop event).

What, exactly, is the TTS DLL's API for the "start event, word event,
stop event"?
Is it possible to route these events directly to my program, so I do not
have to poll them frequently? The wrapper code can be modified without any
problem

If the "events" as known by your DLL do in fact have some kind of
interrupt- or signal-style data flow, then sure...you can present those
to your managed code as a C# event.

For more specific information, you need to ask a more specific question.
Include specific details about the API of the TTS DLL that you're
wrapping, for example.

Pete
 
M

Matt Houser

You can pass a function delegate from your c# code to your DLL. Then the
DLL can call the delegate as if it were a normal function pointer. This
lets the DLL callback to the C# portion.
 
P

Peter Duniho

Maarten said:
Hi,

My C# program calls, trough some sort of wrapper, DLL functions of a text to
speech engine. [...]

Oh, and one other things: I suppose there's probably some reason you
specifically want to use this particular TTS DLL. But just in case you
weren't aware, .NET has TTS support, via the System.Speech.Synthesis
namespace classes.

So, if you wind up having too much difficulty connecting this unmanaged
DLL to your .NET code, you might try using the .NET API instead.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top