Re: VB 6 app calling C# windows service by KevinAnthony
KevinAnthony
Tue Jun 07 11:19:05 CDT 2005
Yes, I have. As a communication mechanism, I have used sockets to send the
commands to the C# service and then to receive the results back. All of my
command data structure is in XML along with the return data for this process
which makes it flexible. I have used a similar mechanism with Java also.
This is a syncronous method. If you want an asyncronous format then look at
MSMQ to be your communication bridge. As Lloyd noted, you must be careful
about concurrency when using multiple threads in C#. Make sure to lock
objects that might need to be shared between threads unless you can deal with
dirty reads.
"Lloyd Dupont" wrote:
> No, I haven't ;)
>
> But I think you should be more specific, such as: how do you communicate?
> What kind of problem do you expect?
>
> Reading you I guess you simply have multithreading error, that's nasty one
> and hard to debug.
> Remember very few classes of .NET are thread safe by default (except the
> client/server, IO one), it's up to you to provide the safety otherwise.
>
> "cyberstrike" <cyberstrike@discussions.microsoft.com> wrote in message
> news:1015F8AC-1A80-4F57-BECA-6282EBB75059@microsoft.com...
> > Hi Guys,
> >
> > Has anyone written a windows service in C# that used multiple threads,
> > then
> > wrote a VB 6 application that called the various methods on the C#
> > Service?
> > Any problems with it?
> >
> > Thanks
>
>
>