From: Bob Hanson on
Sorry again for my ignorance. I did google and found the cab file you had
mentioned. This is the new stack trace:

at System.Messaging.Interop.UnsafeNativeMethods.MQCreateQueue()\r\nat
System.Messaging.MessageQueue.Create()\r\nat
System.Messaging.MessageQueue.Create()\r\nat
DemoMSMQ.Common.CommonTools.CreateQueue()\r\nat
DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
System.Windows.Forms.Control.OnClick()\r\nat
System.Windows.Forms.Button.OnClick()\r\nat
System.Windows.Forms.ButtonBase.WnProc()\r\nat
System.Windows.Forms.Control._InternalWnProc()\r\nat
Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
System.Windows.Forms.Application.Run()\r\nat DemoMSMQ.Forms.Program.Main()\r\n

I would like to mention as a side note that I built a matching testForm for
the desktop to test the CreateQueue and it worked without issue.

Thanks in advance for any insight you can provide :)

--
Bob Hanson
Senior Solutions Developer



"Bob Hanson" wrote:

> Hello Chris,
>
> Thanks for the reply. The form button being mentioned is what click event
> started the CreateQueue:
>
> private void buttonSend_Click(object sender, EventArgs e)
> {
> string Result = null;
> Result = CommonTools.CreateQueue();
> this.listBoxResult.Items.Add(Result);
> Result = CommonTools.SendMessageToQueue();
> this.listBoxResult.Items.Add(Result);
> }
>
> This is in a device winforms application.
>
> You had mentioned the following:
>
> "First push the System_SR_ENU assembly down so you can get a useful message"
>
> Please excuse my ignorance on this as I am not sure what is meant.
>
> I appreciate your help and please reply when you get a chance.
>
> --
> Bob Hanson
> Senior Solutions Developer
>
>
>
> "<ctacke/>" wrote:
>
> > First push the System_SR_ENU assembly down so you can get a useful message.
> > Second, the stack trace indicates the error is in
> > System.Messaging.MessageQueue.Send() as a result of a
> > DemoMSMQ.Forms.testForm.buttonSend_Click(). The code doesn't match that at
> > all.
> >
> >
> > --
> > Chris Tacke
> > OpenNETCF Consulting
> > Managed Code in the Embedded World
> > www.opennetcf.com
> > --
> >
> >
> >
> >
> >
> > "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> > news:C67E448B-1D4C-4873-9E95-12A4B098BBFC(a)microsoft.com...
> > > Hello Ilya,
> > >
> > > Sorry I missed the exception. Here it is:
> > >
> > > An error message cannot be displayed because an optional resource assembly
> > > containing it cannot be found
> > >
> > > Thanks in advance for your help :)
> > >
> > > --
> > > Bob Hanson
> > > Senior Solutions Developer
> > >
> > >
> > >
> > > "Ilya Tumanov [MS]" wrote:
> > >
> > >> This path should work.
> > >>
> > >>
> > >>
> > >> By the way, your stack trace indicates exception happens in different
> > >> place.
> > >> Also you forgot to include exception message.
> > >>
> > >>
> > >> --
> > >> Best regards,
> > >>
> > >> Ilya
> > >>
> > >> This posting is provided "AS IS" with no warranties, and confers no
> > >> rights.
> > >>
> > >> *** Want to find answers instantly? Here's how... ***
> > >>
> > >> 1. Go to
> > >> http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
> > >> 2. Type your question in the text box near "Search this group" button.
> > >> 3. Hit "Search this group" button.
> > >> 4. Read answer(s).
> > >>
> > >> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> > >> news:90552DD7-B9AD-44FC-AC18-221C0377C1A2(a)microsoft.com...
> > >> > Hello All,
> > >> >
> > >> > I am getting errors on the MessageQueue.Create statement of:
> > >> >
> > >> > public static class CommonTools
> > >> > {
> > >> > // Since this is a private queue we follow the naming convention
> > >> > // MachineName\Private$\QPath
> > >> > // "." represents the local machine name
> > >> > public const string QPath = @".\Private$\msmqdemo";
> > >> > public static MessageQueue mesSendQ = null;
> > >> > public static MessageQueue mesReceiveQ = null;
> > >> >
> > >> > public static string CreateQueue()
> > >> > {
> > >> > try
> > >> > {
> > >> > mesSendQ = MessageQueue.Create(QPath); << Error occurs
> > >> > here
> > >> > return "CreateQueue Successful";
> > >> > }
> > >> > catch(Exception ex)
> > >> > {
> > >> > return ex.Message;
> > >> > }
> > >> > }
> > >> >
> > >> > This is the stacktrace that I get:
> > >> >
> > >> > at
> > >> >> System.Messaging.Interop.SafeNativeMethods.MQPathNameToFormatName()\r\nat
> > >> >> System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath()\r\nat
> > >> >> System.Messaging.MessageQueue.get_FormatName()\r\nat
> > >> >> System.Messaging.MessageQueue.SendInternal()\r\nat
> > >> >> System.Messaging.MessageQueue.Send()\r\nat
> > >> >> DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
> > >> >> System.Windows.Forms.Control.OnClick()\r\nat
> > >> >> System.Windows.Forms.Button.OnClick()\r\nat
> > >> >> System.Windows.Forms.ButtonBase.WnProc()\r\nat
> > >> >> System.Windows.Forms.Control._InternalWnProc()\r\nat
> > >> >> Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
> > >> >> System.Windows.Forms.Application.Run()\r\nat
> > >> >> DemoMSMQ.Forms.Program.Main()\r\n
> > >> >
> > >> > I tested this same code on the desktop and it worked fine. Is there a
> > >> > problem with my queue path syntax for cf 2.0?
> > >> >
> > >> > Thanks in advance for your help :)
> > >> >
> > >> > --
> > >> > Bob Hanson
> > >> > Senior Solutions Developer
> > >> >
> > >>
> > >>
> > >>
> >
> >
> >
From: " ctacke/>" on
What is the exception message now?

-Chris


"Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
news:42571068-C701-4079-8161-B2EB4B72BCD5(a)microsoft.com...
> Sorry again for my ignorance. I did google and found the cab file you had
> mentioned. This is the new stack trace:
>
> at System.Messaging.Interop.UnsafeNativeMethods.MQCreateQueue()\r\nat
> System.Messaging.MessageQueue.Create()\r\nat
> System.Messaging.MessageQueue.Create()\r\nat
> DemoMSMQ.Common.CommonTools.CreateQueue()\r\nat
> DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
> System.Windows.Forms.Control.OnClick()\r\nat
> System.Windows.Forms.Button.OnClick()\r\nat
> System.Windows.Forms.ButtonBase.WnProc()\r\nat
> System.Windows.Forms.Control._InternalWnProc()\r\nat
> Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
> System.Windows.Forms.Application.Run()\r\nat
> DemoMSMQ.Forms.Program.Main()\r\n
>
> I would like to mention as a side note that I built a matching testForm
> for
> the desktop to test the CreateQueue and it worked without issue.
>
> Thanks in advance for any insight you can provide :)
>
> --
> Bob Hanson
> Senior Solutions Developer
>
>
>
> "Bob Hanson" wrote:
>
>> Hello Chris,
>>
>> Thanks for the reply. The form button being mentioned is what click event
>> started the CreateQueue:
>>
>> private void buttonSend_Click(object sender, EventArgs e)
>> {
>> string Result = null;
>> Result = CommonTools.CreateQueue();
>> this.listBoxResult.Items.Add(Result);
>> Result = CommonTools.SendMessageToQueue();
>> this.listBoxResult.Items.Add(Result);
>> }
>>
>> This is in a device winforms application.
>>
>> You had mentioned the following:
>>
>> "First push the System_SR_ENU assembly down so you can get a useful
>> message"
>>
>> Please excuse my ignorance on this as I am not sure what is meant.
>>
>> I appreciate your help and please reply when you get a chance.
>>
>> --
>> Bob Hanson
>> Senior Solutions Developer
>>
>>
>>
>> "<ctacke/>" wrote:
>>
>> > First push the System_SR_ENU assembly down so you can get a useful
>> > message.
>> > Second, the stack trace indicates the error is in
>> > System.Messaging.MessageQueue.Send() as a result of a
>> > DemoMSMQ.Forms.testForm.buttonSend_Click(). The code doesn't match
>> > that at
>> > all.
>> >
>> >
>> > --
>> > Chris Tacke
>> > OpenNETCF Consulting
>> > Managed Code in the Embedded World
>> > www.opennetcf.com
>> > --
>> >
>> >
>> >
>> >
>> >
>> > "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
>> > news:C67E448B-1D4C-4873-9E95-12A4B098BBFC(a)microsoft.com...
>> > > Hello Ilya,
>> > >
>> > > Sorry I missed the exception. Here it is:
>> > >
>> > > An error message cannot be displayed because an optional resource
>> > > assembly
>> > > containing it cannot be found
>> > >
>> > > Thanks in advance for your help :)
>> > >
>> > > --
>> > > Bob Hanson
>> > > Senior Solutions Developer
>> > >
>> > >
>> > >
>> > > "Ilya Tumanov [MS]" wrote:
>> > >
>> > >> This path should work.
>> > >>
>> > >>
>> > >>
>> > >> By the way, your stack trace indicates exception happens in
>> > >> different
>> > >> place.
>> > >> Also you forgot to include exception message.
>> > >>
>> > >>
>> > >> --
>> > >> Best regards,
>> > >>
>> > >> Ilya
>> > >>
>> > >> This posting is provided "AS IS" with no warranties, and confers no
>> > >> rights.
>> > >>
>> > >> *** Want to find answers instantly? Here's how... ***
>> > >>
>> > >> 1. Go to
>> > >> http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
>> > >> 2. Type your question in the text box near "Search this group"
>> > >> button.
>> > >> 3. Hit "Search this group" button.
>> > >> 4. Read answer(s).
>> > >>
>> > >> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
>> > >> news:90552DD7-B9AD-44FC-AC18-221C0377C1A2(a)microsoft.com...
>> > >> > Hello All,
>> > >> >
>> > >> > I am getting errors on the MessageQueue.Create statement of:
>> > >> >
>> > >> > public static class CommonTools
>> > >> > {
>> > >> > // Since this is a private queue we follow the naming
>> > >> > convention
>> > >> > // MachineName\Private$\QPath
>> > >> > // "." represents the local machine name
>> > >> > public const string QPath = @".\Private$\msmqdemo";
>> > >> > public static MessageQueue mesSendQ = null;
>> > >> > public static MessageQueue mesReceiveQ = null;
>> > >> >
>> > >> > public static string CreateQueue()
>> > >> > {
>> > >> > try
>> > >> > {
>> > >> > mesSendQ = MessageQueue.Create(QPath); << Error
>> > >> > occurs
>> > >> > here
>> > >> > return "CreateQueue Successful";
>> > >> > }
>> > >> > catch(Exception ex)
>> > >> > {
>> > >> > return ex.Message;
>> > >> > }
>> > >> > }
>> > >> >
>> > >> > This is the stacktrace that I get:
>> > >> >
>> > >> > at
>> > >> >> System.Messaging.Interop.SafeNativeMethods.MQPathNameToFormatName()\r\nat
>> > >> >> System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath()\r\nat
>> > >> >> System.Messaging.MessageQueue.get_FormatName()\r\nat
>> > >> >> System.Messaging.MessageQueue.SendInternal()\r\nat
>> > >> >> System.Messaging.MessageQueue.Send()\r\nat
>> > >> >> DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
>> > >> >> System.Windows.Forms.Control.OnClick()\r\nat
>> > >> >> System.Windows.Forms.Button.OnClick()\r\nat
>> > >> >> System.Windows.Forms.ButtonBase.WnProc()\r\nat
>> > >> >> System.Windows.Forms.Control._InternalWnProc()\r\nat
>> > >> >> Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
>> > >> >> System.Windows.Forms.Application.Run()\r\nat
>> > >> >> DemoMSMQ.Forms.Program.Main()\r\n
>> > >> >
>> > >> > I tested this same code on the desktop and it worked fine. Is
>> > >> > there a
>> > >> > problem with my queue path syntax for cf 2.0?
>> > >> >
>> > >> > Thanks in advance for your help :)
>> > >> >
>> > >> > --
>> > >> > Bob Hanson
>> > >> > Senior Solutions Developer
>> > >> >
>> > >>
>> > >>
>> > >>
>> >
>> >
>> >


From: Bob Hanson on
Hello Chris,

I am still getting the following:

An error message cannot be displayed because an optional resource assembly
containing it cannot be found


--
Bob Hanson
Senior Solutions Developer



"<ctacke/>" wrote:

> What is the exception message now?
>
> -Chris
>
>
> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> news:42571068-C701-4079-8161-B2EB4B72BCD5(a)microsoft.com...
> > Sorry again for my ignorance. I did google and found the cab file you had
> > mentioned. This is the new stack trace:
> >
> > at System.Messaging.Interop.UnsafeNativeMethods.MQCreateQueue()\r\nat
> > System.Messaging.MessageQueue.Create()\r\nat
> > System.Messaging.MessageQueue.Create()\r\nat
> > DemoMSMQ.Common.CommonTools.CreateQueue()\r\nat
> > DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
> > System.Windows.Forms.Control.OnClick()\r\nat
> > System.Windows.Forms.Button.OnClick()\r\nat
> > System.Windows.Forms.ButtonBase.WnProc()\r\nat
> > System.Windows.Forms.Control._InternalWnProc()\r\nat
> > Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
> > System.Windows.Forms.Application.Run()\r\nat
> > DemoMSMQ.Forms.Program.Main()\r\n
> >
> > I would like to mention as a side note that I built a matching testForm
> > for
> > the desktop to test the CreateQueue and it worked without issue.
> >
> > Thanks in advance for any insight you can provide :)
> >
> > --
> > Bob Hanson
> > Senior Solutions Developer
> >
> >
> >
> > "Bob Hanson" wrote:
> >
> >> Hello Chris,
> >>
> >> Thanks for the reply. The form button being mentioned is what click event
> >> started the CreateQueue:
> >>
> >> private void buttonSend_Click(object sender, EventArgs e)
> >> {
> >> string Result = null;
> >> Result = CommonTools.CreateQueue();
> >> this.listBoxResult.Items.Add(Result);
> >> Result = CommonTools.SendMessageToQueue();
> >> this.listBoxResult.Items.Add(Result);
> >> }
> >>
> >> This is in a device winforms application.
> >>
> >> You had mentioned the following:
> >>
> >> "First push the System_SR_ENU assembly down so you can get a useful
> >> message"
> >>
> >> Please excuse my ignorance on this as I am not sure what is meant.
> >>
> >> I appreciate your help and please reply when you get a chance.
> >>
> >> --
> >> Bob Hanson
> >> Senior Solutions Developer
> >>
> >>
> >>
> >> "<ctacke/>" wrote:
> >>
> >> > First push the System_SR_ENU assembly down so you can get a useful
> >> > message.
> >> > Second, the stack trace indicates the error is in
> >> > System.Messaging.MessageQueue.Send() as a result of a
> >> > DemoMSMQ.Forms.testForm.buttonSend_Click(). The code doesn't match
> >> > that at
> >> > all.
> >> >
> >> >
> >> > --
> >> > Chris Tacke
> >> > OpenNETCF Consulting
> >> > Managed Code in the Embedded World
> >> > www.opennetcf.com
> >> > --
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> >> > news:C67E448B-1D4C-4873-9E95-12A4B098BBFC(a)microsoft.com...
> >> > > Hello Ilya,
> >> > >
> >> > > Sorry I missed the exception. Here it is:
> >> > >
> >> > > An error message cannot be displayed because an optional resource
> >> > > assembly
> >> > > containing it cannot be found
> >> > >
> >> > > Thanks in advance for your help :)
> >> > >
> >> > > --
> >> > > Bob Hanson
> >> > > Senior Solutions Developer
> >> > >
> >> > >
> >> > >
> >> > > "Ilya Tumanov [MS]" wrote:
> >> > >
> >> > >> This path should work.
> >> > >>
> >> > >>
> >> > >>
> >> > >> By the way, your stack trace indicates exception happens in
> >> > >> different
> >> > >> place.
> >> > >> Also you forgot to include exception message.
> >> > >>
> >> > >>
> >> > >> --
> >> > >> Best regards,
> >> > >>
> >> > >> Ilya
> >> > >>
> >> > >> This posting is provided "AS IS" with no warranties, and confers no
> >> > >> rights.
> >> > >>
> >> > >> *** Want to find answers instantly? Here's how... ***
> >> > >>
> >> > >> 1. Go to
> >> > >> http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
> >> > >> 2. Type your question in the text box near "Search this group"
> >> > >> button.
> >> > >> 3. Hit "Search this group" button.
> >> > >> 4. Read answer(s).
> >> > >>
> >> > >> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> >> > >> news:90552DD7-B9AD-44FC-AC18-221C0377C1A2(a)microsoft.com...
> >> > >> > Hello All,
> >> > >> >
> >> > >> > I am getting errors on the MessageQueue.Create statement of:
> >> > >> >
> >> > >> > public static class CommonTools
> >> > >> > {
> >> > >> > // Since this is a private queue we follow the naming
> >> > >> > convention
> >> > >> > // MachineName\Private$\QPath
> >> > >> > // "." represents the local machine name
> >> > >> > public const string QPath = @".\Private$\msmqdemo";
> >> > >> > public static MessageQueue mesSendQ = null;
> >> > >> > public static MessageQueue mesReceiveQ = null;
> >> > >> >
> >> > >> > public static string CreateQueue()
> >> > >> > {
> >> > >> > try
> >> > >> > {
> >> > >> > mesSendQ = MessageQueue.Create(QPath); << Error
> >> > >> > occurs
> >> > >> > here
> >> > >> > return "CreateQueue Successful";
> >> > >> > }
> >> > >> > catch(Exception ex)
> >> > >> > {
> >> > >> > return ex.Message;
> >> > >> > }
> >> > >> > }
> >> > >> >
> >> > >> > This is the stacktrace that I get:
> >> > >> >
> >> > >> > at
> >> > >> >> System.Messaging.Interop.SafeNativeMethods.MQPathNameToFormatName()\r\nat
> >> > >> >> System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath()\r\nat
> >> > >> >> System.Messaging.MessageQueue.get_FormatName()\r\nat
> >> > >> >> System.Messaging.MessageQueue.SendInternal()\r\nat
> >> > >> >> System.Messaging.MessageQueue.Send()\r\nat
> >> > >> >> DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
> >> > >> >> System.Windows.Forms.Control.OnClick()\r\nat
> >> > >> >> System.Windows.Forms.Button.OnClick()\r\nat
> >> > >> >> System.Windows.Forms.ButtonBase.WnProc()\r\nat
> >> > >> >> System.Windows.Forms.Control._InternalWnProc()\r\nat
> >> > >> >> Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\n
From: " ctacke/>" on
2 things - first, you did install the System_SR_ENU.CAB file? Second, you
have installed MSMQ on the device, right 9it's not there by default)?

http://www.microsoft.com/downloads/details.aspx?FamilyID=cdfd2bb2-fa13-4062-b8d1-4406ccddb5fd&DisplayLang=en


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--




"Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
news:92510A00-6C93-4415-803A-C6E1FC6B17F1(a)microsoft.com...
> Hello Chris,
>
> I am still getting the following:
>
> An error message cannot be displayed because an optional resource assembly
> containing it cannot be found
>
>
> --
> Bob Hanson
> Senior Solutions Developer
>
>
>
> "<ctacke/>" wrote:
>
>> What is the exception message now?
>>
>> -Chris
>>
>>
>> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
>> news:42571068-C701-4079-8161-B2EB4B72BCD5(a)microsoft.com...
>> > Sorry again for my ignorance. I did google and found the cab file you
>> > had
>> > mentioned. This is the new stack trace:
>> >
>> > at System.Messaging.Interop.UnsafeNativeMethods.MQCreateQueue()\r\nat
>> > System.Messaging.MessageQueue.Create()\r\nat
>> > System.Messaging.MessageQueue.Create()\r\nat
>> > DemoMSMQ.Common.CommonTools.CreateQueue()\r\nat
>> > DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
>> > System.Windows.Forms.Control.OnClick()\r\nat
>> > System.Windows.Forms.Button.OnClick()\r\nat
>> > System.Windows.Forms.ButtonBase.WnProc()\r\nat
>> > System.Windows.Forms.Control._InternalWnProc()\r\nat
>> > Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
>> > System.Windows.Forms.Application.Run()\r\nat
>> > DemoMSMQ.Forms.Program.Main()\r\n
>> >
>> > I would like to mention as a side note that I built a matching testForm
>> > for
>> > the desktop to test the CreateQueue and it worked without issue.
>> >
>> > Thanks in advance for any insight you can provide :)
>> >
>> > --
>> > Bob Hanson
>> > Senior Solutions Developer
>> >
>> >
>> >
>> > "Bob Hanson" wrote:
>> >
>> >> Hello Chris,
>> >>
>> >> Thanks for the reply. The form button being mentioned is what click
>> >> event
>> >> started the CreateQueue:
>> >>
>> >> private void buttonSend_Click(object sender, EventArgs e)
>> >> {
>> >> string Result = null;
>> >> Result = CommonTools.CreateQueue();
>> >> this.listBoxResult.Items.Add(Result);
>> >> Result = CommonTools.SendMessageToQueue();
>> >> this.listBoxResult.Items.Add(Result);
>> >> }
>> >>
>> >> This is in a device winforms application.
>> >>
>> >> You had mentioned the following:
>> >>
>> >> "First push the System_SR_ENU assembly down so you can get a useful
>> >> message"
>> >>
>> >> Please excuse my ignorance on this as I am not sure what is meant.
>> >>
>> >> I appreciate your help and please reply when you get a chance.
>> >>
>> >> --
>> >> Bob Hanson
>> >> Senior Solutions Developer
>> >>
>> >>
>> >>
>> >> "<ctacke/>" wrote:
>> >>
>> >> > First push the System_SR_ENU assembly down so you can get a useful
>> >> > message.
>> >> > Second, the stack trace indicates the error is in
>> >> > System.Messaging.MessageQueue.Send() as a result of a
>> >> > DemoMSMQ.Forms.testForm.buttonSend_Click(). The code doesn't match
>> >> > that at
>> >> > all.
>> >> >
>> >> >
>> >> > --
>> >> > Chris Tacke
>> >> > OpenNETCF Consulting
>> >> > Managed Code in the Embedded World
>> >> > www.opennetcf.com
>> >> > --
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
>> >> > news:C67E448B-1D4C-4873-9E95-12A4B098BBFC(a)microsoft.com...
>> >> > > Hello Ilya,
>> >> > >
>> >> > > Sorry I missed the exception. Here it is:
>> >> > >
>> >> > > An error message cannot be displayed because an optional resource
>> >> > > assembly
>> >> > > containing it cannot be found
>> >> > >
>> >> > > Thanks in advance for your help :)
>> >> > >
>> >> > > --
>> >> > > Bob Hanson
>> >> > > Senior Solutions Developer
>> >> > >
>> >> > >
>> >> > >
>> >> > > "Ilya Tumanov [MS]" wrote:
>> >> > >
>> >> > >> This path should work.
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >> By the way, your stack trace indicates exception happens in
>> >> > >> different
>> >> > >> place.
>> >> > >> Also you forgot to include exception message.
>> >> > >>
>> >> > >>
>> >> > >> --
>> >> > >> Best regards,
>> >> > >>
>> >> > >> Ilya
>> >> > >>
>> >> > >> This posting is provided "AS IS" with no warranties, and confers
>> >> > >> no
>> >> > >> rights.
>> >> > >>
>> >> > >> *** Want to find answers instantly? Here's how... ***
>> >> > >>
>> >> > >> 1. Go to
>> >> > >> http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
>> >> > >> 2. Type your question in the text box near "Search this group"
>> >> > >> button.
>> >> > >> 3. Hit "Search this group" button.
>> >> > >> 4. Read answer(s).
>> >> > >>
>> >> > >> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in
>> >> > >> message
>> >> > >> news:90552DD7-B9AD-44FC-AC18-221C0377C1A2(a)microsoft.com...
>> >> > >> > Hello All,
>> >> > >> >
>> >> > >> > I am getting errors on the MessageQueue.Create statement of:
>> >> > >> >
>> >> > >> > public static class CommonTools
>> >> > >> > {
>> >> > >> > // Since this is a private queue we follow the naming
>> >> > >> > convention
>> >> > >> > // MachineName\Private$\QPath
>> >> > >> > // "." represents the local machine name
>> >> > >> > public const string QPath = @".\Private$\msmqdemo";
>> >> > >> > public static MessageQueue mesSendQ = null;
>> >> > >> > public static MessageQueue mesReceiveQ = null;
>> >> > >> >
>> >> > >> > public static string CreateQueue()
>> >> > >> > {
>> >> > >> > try
>> >> > >> > {
>> >> > >> > mesSendQ = MessageQueue.Create(QPath); << Error
>> >> > >> > occurs
>> >> > >> > here
>> >> > >> > return "CreateQueue Successful";
>> >> > >> > }
>> >> > >> > catch(Exception ex)
>> >> > >> > {
>> >> > >> > return ex.Message;
>> >> > >> > }
>> >> > >> > }
>> >> > >> >
>> >> > >> > This is the stacktrace that I get:
>> >> > >> >
>> >> > >> > at
>>
From: Bob Hanson on
Yes, I did install the System_SR_ENU.CAB file. The link and files you had
mentioned are for the Windows Mobile 5 and we are running the Win CE 5.0. The
other item I noticed on the link you had given me is this is for the VS 2005
Beta 2 and we are running the VS2005 VSTS released version. I did try to
install the msmq cab on the emulator and I received an error message "Not a
valid Windows CE setup file".

I did add the MSMQ component in Platform Builder for the emulator before
trying this test code.

Againg, thanks for your help :)

--
Bob Hanson
Senior Solutions Developer



"<ctacke/>" wrote:

> 2 things - first, you did install the System_SR_ENU.CAB file? Second, you
> have installed MSMQ on the device, right 9it's not there by default)?
>
> http://www.microsoft.com/downloads/details.aspx?FamilyID=cdfd2bb2-fa13-4062-b8d1-4406ccddb5fd&DisplayLang=en
>
>
> --
> Chris Tacke
> OpenNETCF Consulting
> Managed Code in the Embedded World
> www.opennetcf.com
> --
>
>
>
>
> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> news:92510A00-6C93-4415-803A-C6E1FC6B17F1(a)microsoft.com...
> > Hello Chris,
> >
> > I am still getting the following:
> >
> > An error message cannot be displayed because an optional resource assembly
> > containing it cannot be found
> >
> >
> > --
> > Bob Hanson
> > Senior Solutions Developer
> >
> >
> >
> > "<ctacke/>" wrote:
> >
> >> What is the exception message now?
> >>
> >> -Chris
> >>
> >>
> >> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> >> news:42571068-C701-4079-8161-B2EB4B72BCD5(a)microsoft.com...
> >> > Sorry again for my ignorance. I did google and found the cab file you
> >> > had
> >> > mentioned. This is the new stack trace:
> >> >
> >> > at System.Messaging.Interop.UnsafeNativeMethods.MQCreateQueue()\r\nat
> >> > System.Messaging.MessageQueue.Create()\r\nat
> >> > System.Messaging.MessageQueue.Create()\r\nat
> >> > DemoMSMQ.Common.CommonTools.CreateQueue()\r\nat
> >> > DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
> >> > System.Windows.Forms.Control.OnClick()\r\nat
> >> > System.Windows.Forms.Button.OnClick()\r\nat
> >> > System.Windows.Forms.ButtonBase.WnProc()\r\nat
> >> > System.Windows.Forms.Control._InternalWnProc()\r\nat
> >> > Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
> >> > System.Windows.Forms.Application.Run()\r\nat
> >> > DemoMSMQ.Forms.Program.Main()\r\n
> >> >
> >> > I would like to mention as a side note that I built a matching testForm
> >> > for
> >> > the desktop to test the CreateQueue and it worked without issue.
> >> >
> >> > Thanks in advance for any insight you can provide :)
> >> >
> >> > --
> >> > Bob Hanson
> >> > Senior Solutions Developer
> >> >
> >> >
> >> >
> >> > "Bob Hanson" wrote:
> >> >
> >> >> Hello Chris,
> >> >>
> >> >> Thanks for the reply. The form button being mentioned is what click
> >> >> event
> >> >> started the CreateQueue:
> >> >>
> >> >> private void buttonSend_Click(object sender, EventArgs e)
> >> >> {
> >> >> string Result = null;
> >> >> Result = CommonTools.CreateQueue();
> >> >> this.listBoxResult.Items.Add(Result);
> >> >> Result = CommonTools.SendMessageToQueue();
> >> >> this.listBoxResult.Items.Add(Result);
> >> >> }
> >> >>
> >> >> This is in a device winforms application.
> >> >>
> >> >> You had mentioned the following:
> >> >>
> >> >> "First push the System_SR_ENU assembly down so you can get a useful
> >> >> message"
> >> >>
> >> >> Please excuse my ignorance on this as I am not sure what is meant.
> >> >>
> >> >> I appreciate your help and please reply when you get a chance.
> >> >>
> >> >> --
> >> >> Bob Hanson
> >> >> Senior Solutions Developer
> >> >>
> >> >>
> >> >>
> >> >> "<ctacke/>" wrote:
> >> >>
> >> >> > First push the System_SR_ENU assembly down so you can get a useful
> >> >> > message.
> >> >> > Second, the stack trace indicates the error is in
> >> >> > System.Messaging.MessageQueue.Send() as a result of a
> >> >> > DemoMSMQ.Forms.testForm.buttonSend_Click(). The code doesn't match
> >> >> > that at
> >> >> > all.
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Chris Tacke
> >> >> > OpenNETCF Consulting
> >> >> > Managed Code in the Embedded World
> >> >> > www.opennetcf.com
> >> >> > --
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in message
> >> >> > news:C67E448B-1D4C-4873-9E95-12A4B098BBFC(a)microsoft.com...
> >> >> > > Hello Ilya,
> >> >> > >
> >> >> > > Sorry I missed the exception. Here it is:
> >> >> > >
> >> >> > > An error message cannot be displayed because an optional resource
> >> >> > > assembly
> >> >> > > containing it cannot be found
> >> >> > >
> >> >> > > Thanks in advance for your help :)
> >> >> > >
> >> >> > > --
> >> >> > > Bob Hanson
> >> >> > > Senior Solutions Developer
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > > "Ilya Tumanov [MS]" wrote:
> >> >> > >
> >> >> > >> This path should work.
> >> >> > >>
> >> >> > >>
> >> >> > >>
> >> >> > >> By the way, your stack trace indicates exception happens in
> >> >> > >> different
> >> >> > >> place.
> >> >> > >> Also you forgot to include exception message.
> >> >> > >>
> >> >> > >>
> >> >> > >> --
> >> >> > >> Best regards,
> >> >> > >>
> >> >> > >> Ilya
> >> >> > >>
> >> >> > >> This posting is provided "AS IS" with no warranties, and confers
> >> >> > >> no
> >> >> > >> rights.
> >> >> > >>
> >> >> > >> *** Want to find answers instantly? Here's how... ***
> >> >> > >>
> >> >> > >> 1. Go to
> >> >> > >> http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
> >> >> > >> 2. Type your question in the text box near "Search this group"
> >> >> > >> button.
> >> >> > >> 3. Hit "Search this group" button.
> >> >> > >> 4. Read answer(s).
> >> >> > >>
> >> >> > >> "Bob Hanson" <BobHanson(a)discussions.microsoft.com> wrote in
> >> >> > >> message
> >> >> > >> news:90552DD7-B9AD-44FC-AC18-221C0377C1A2(a)microsoft.com...
> >> >> > >> > Hello All,
> >> >> > >> >
> >> >> > >> > I am getting errors on the MessageQueue.Create statement of:
> >> >> > >> >
> >> >> > >> > public static class CommonTools
> >> >> > >> > {
> >> >> > >> > // Since this is a priv