PC Review


Reply
Thread Tools Rate Thread

How can I know in which format the message is writing, vb6 or c#?

 
 
=?Utf-8?B?TW90aQ==?=
Guest
Posts: n/a
 
      22nd Mar 2005
Hi all

I use C# to read messages from msmq queue.
When I knew that it is writing in c# I can read it.
When I knew that it is writing in VB6 I can read it.
How can I know in which format the message is writing?

Moti.

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      22nd Mar 2005
Moti,

You should only be writing one type of message to the queue. The way
queues are set up, they are pretty much application specific, and the format
of the messages running through them should be well-defined.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Moti" <(E-Mail Removed)> wrote in message
news:4A5B7549-9497-4378-A535-(E-Mail Removed)...
> Hi all
>
> I use C# to read messages from msmq queue.
> When I knew that it is writing in c# I can read it.
> When I knew that it is writing in VB6 I can read it.
> How can I know in which format the message is writing?
>
> Moti.
>



 
Reply With Quote
 
=?Utf-8?B?TW90aQ==?=
Guest
Posts: n/a
 
      22nd Mar 2005
Hi Nicholas

My queue get messages from VB6 and from C#, there are well-defined, but
if you send a message in vb6, you have to Transleate the msg body string to
UTF8.
Can I have a way to know from which type (vb6 or c#) I receive the message?
I try know the by using the mess.Body string format? (how?)
Is that the way? Is there are a better way?

Moti




"Nicholas Paldino [.NET/C# MVP]" wrote:

> Moti,
>
> You should only be writing one type of message to the queue. The way
> queues are set up, they are pretty much application specific, and the format
> of the messages running through them should be well-defined.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Moti" <(E-Mail Removed)> wrote in message
> news:4A5B7549-9497-4378-A535-(E-Mail Removed)...
> > Hi all
> >
> > I use C# to read messages from msmq queue.
> > When I knew that it is writing in c# I can read it.
> > When I knew that it is writing in VB6 I can read it.
> > How can I know in which format the message is writing?
> >
> > Moti.
> >

>
>
>

 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      22nd Mar 2005
Moti,

If the original application is VB, then you should set the Formatter
property on the MessageQueue class to an instance of the
ActiveXMessageFormatter class. This should translate the messages from VB
correctly.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Moti" <(E-Mail Removed)> wrote in message
news:9D001521-94D9-4EC7-B590-(E-Mail Removed)...
> Hi Nicholas
>
> My queue get messages from VB6 and from C#, there are well-defined, but
> if you send a message in vb6, you have to Transleate the msg body string
> to
> UTF8.
> Can I have a way to know from which type (vb6 or c#) I receive the
> message?
> I try know the by using the mess.Body string format? (how?)
> Is that the way? Is there are a better way?
>
> Moti
>
>
>
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
>> Moti,
>>
>> You should only be writing one type of message to the queue. The way
>> queues are set up, they are pretty much application specific, and the
>> format
>> of the messages running through them should be well-defined.
>>
>> Hope this helps.
>>
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]
>> - (E-Mail Removed)
>>
>> "Moti" <(E-Mail Removed)> wrote in message
>> news:4A5B7549-9497-4378-A535-(E-Mail Removed)...
>> > Hi all
>> >
>> > I use C# to read messages from msmq queue.
>> > When I knew that it is writing in c# I can read it.
>> > When I knew that it is writing in VB6 I can read it.
>> > How can I know in which format the message is writing?
>> >
>> > Moti.
>> >

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?TW90aQ==?=
Guest
Posts: n/a
 
      23rd Mar 2005
Hi Nicholas

The application is in c#, but I get messages from c# + vb6 aplication!
If I know which application send it I can read it, but How can i know how
send it?

Moti Saba

"Nicholas Paldino [.NET/C# MVP]" wrote:

> Moti,
>
> If the original application is VB, then you should set the Formatter
> property on the MessageQueue class to an instance of the
> ActiveXMessageFormatter class. This should translate the messages from VB
> correctly.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Moti" <(E-Mail Removed)> wrote in message
> news:9D001521-94D9-4EC7-B590-(E-Mail Removed)...
> > Hi Nicholas
> >
> > My queue get messages from VB6 and from C#, there are well-defined, but
> > if you send a message in vb6, you have to Transleate the msg body string
> > to
> > UTF8.
> > Can I have a way to know from which type (vb6 or c#) I receive the
> > message?
> > I try know the by using the mess.Body string format? (how?)
> > Is that the way? Is there are a better way?
> >
> > Moti
> >
> >
> >
> >
> > "Nicholas Paldino [.NET/C# MVP]" wrote:
> >
> >> Moti,
> >>
> >> You should only be writing one type of message to the queue. The way
> >> queues are set up, they are pretty much application specific, and the
> >> format
> >> of the messages running through them should be well-defined.
> >>
> >> Hope this helps.
> >>
> >>
> >> --
> >> - Nicholas Paldino [.NET/C# MVP]
> >> - (E-Mail Removed)
> >>
> >> "Moti" <(E-Mail Removed)> wrote in message
> >> news:4A5B7549-9497-4378-A535-(E-Mail Removed)...
> >> > Hi all
> >> >
> >> > I use C# to read messages from msmq queue.
> >> > When I knew that it is writing in c# I can read it.
> >> > When I knew that it is writing in VB6 I can read it.
> >> > How can I know in which format the message is writing?
> >> >
> >> > Moti.
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
QWERTY
Guest
Posts: n/a
 
      23rd Mar 2005
You can try reading vb6 format then catch the exception if the message
is not in vb6 format then read it in c# format.


On Tue, 22 Mar 2005 07:41:07 -0800, "Moti"
<(E-Mail Removed)> wrote:

>Hi all
>
>I use C# to read messages from msmq queue.
>When I knew that it is writing in c# I can read it.
>When I knew that it is writing in VB6 I can read it.
>How can I know in which format the message is writing?
>
>Moti.


 
Reply With Quote
 
=?Utf-8?B?TW90aQ==?=
Guest
Posts: n/a
 
      27th Mar 2005
Hi QWERTY

Sorry on the late answer.

I looking for more elegant way…. But so far I think this is the only way….


Thank you

Moti


"QWERTY" wrote:

> You can try reading vb6 format then catch the exception if the message
> is not in vb6 format then read it in c# format.
>
>
> On Tue, 22 Mar 2005 07:41:07 -0800, "Moti"
> <(E-Mail Removed)> wrote:
>
> >Hi all
> >
> >I use C# to read messages from msmq queue.
> >When I knew that it is writing in c# I can read it.
> >When I knew that it is writing in VB6 I can read it.
> >How can I know in which format the message is writing?
> >
> >Moti.

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to DOC and then to PDF format K Viltersten Microsoft C# .NET 4 5th Jun 2008 12:27 PM
XP Pro - Format blue writing Rock Windows XP General 2 16th Dec 2007 02:45 AM
need APA writing format =?Utf-8?B?U2hlcnJ5?= Microsoft Access External Data 1 22nd Apr 2006 07:11 PM
Writing to PocketWord Format Trollpower Microsoft Dot NET Compact Framework 4 21st Apr 2004 11:58 PM
Floppy disks becomes RAW data format when writing on disk (format, saving, etc.) Ely Caballero Windows XP Hardware 1 20th Feb 2004 06:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:55 PM.