|
I already posted this message but I can't see it anywhere. Hope this time will work.
I need to receive a message from a message queue within MSMQ. I open the que
ue with a VBA code and set the "body" of the msgqueue. From a C# i access th
e queue and get the body but an exception occur:
Data at the root level is invalid. Line 1, position 1.
What can I do? Here follows the sw:
vba
Sub write_a_message_()
Dim strFormatName As String
Dim qinfo As New MSMQQueueInfo
Dim qDest As MSMQQueue
Dim msg As New MSMQMessage
strFormatName = ".\private$\test_per_coda_1"
On Error GoTo ErrorHandler
qinfo.PathName = strFormatName
Set qDest = qinfo.Open(MQ_SEND_ACCESS, MQ_DENY_NONE)
msg.Label = "Test Message"
msg.Body = "mickey goofy and donald"
msg.Send DestinationQueue:=qDest
qDest.Close
Exit Sub
ErrorHandler:
MsgBox "Error " + Hex(err.Number) + " was returned." _
+ Chr(13) + err.Description
end subthis works correctly
C# (where the problem occurs)
Message msg;
MessageQueue msgQ = new MessageQueue(@".\private$\test_per_coda_1");
msgQ.Formatter = new XmlMessageFormatter(new Type[] { typeof(string) });
msg = msgQ.Receive();
System.Console.WriteLine("massaggio ricevuto :: {0}", msg.Id);
System.Console.WriteLine("massaggio ricevuto :: " + msg.Body.ToString());
the exception occurring at the very last instruction is ::
Data at the root level is invalid. Line 1, position 1.
Then I have used another VBA code that receive the message, I had no problem
with manipulation of the "body".
Many thanks in advance and best regards
rodrigo
|
|
|
|
|
I have C# Component say "SMSSender" and i setup a job in my sql server which call a DTS say "RecordFetcherAndSMS". This DTS fetch data from tables and create a message and want to call SMSSender.Send(string), a c# component. how i can do this.
Thanks
Zeeshan
|
|
|
|
|
Hello all, I have run into a problem... I am trying to call a method from a thread but it is throwing an exception...
System.NullReferenceException was unhandled<br />
Message="Object reference not set to an instance of an object."<br />
Source="System.Windows.Forms"
Here is the code:
public void zap_publish_listview(zap item)<br />
{<br />
if (listView_main.InvokeRequired)<br />
{<br />
SetZapPublishListview s = new SetZapPublishListview(zap_publish_listview);<br />
Invoke(s, new object[] { item });<br />
}<br />
else<br />
{<br />
int icon = getStatusIconNumber(item.zap_state.ToString());<br />
string name = item.zap_channel.ToString();<br />
string data = item.zap_state.ToString();<br />
<br />
ListViewItem lvItem = new ListViewItem("", icon);<br />
lvItem.SubItems.Add("ZAP: " + name);<br />
lvItem.SubItems.Add(data);<br />
lvItem.ToolTipText = item.ToString();<br />
lvItem.Group = listView_main.Groups[2];
<br />
ListViewItem old_item = listView_main.FindItemWithText("ZAP: " + name, true, 0);<br />
<br />
if (old_item.Index >= 0)<br />
{<br />
listView_main.Items.Insert(old_item.Index, lvItem);<br />
<br />
listView_main.Items.RemoveAt(old_item.Index);<br />
}<br />
else<br />
{<br />
listView_main.Items.AddRange(new ListViewItem[] { lvItem });<br />
}<br />
}<br />
}<br />
I have a similar method that updates a debug window... And that works fine... Can anyone help???
Thanks in advance,
Phil
"Rules are for the obedience of fools and the guidance of wise men"
|
|
|
|
|
Have you set a breakpoint to work out exactly which line throws the error ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I would like to "display" a Word document in a winform.
I can access a word document via Microsoft.Office.Word but I could not find how
to put the word document in a WinForm.
I have managed to do it through IE but is there no way through ActiveX or anything?
What is the right way to do this ?
Thanks for your help
Robert
|
|
|
|
|
Dear friends,
My research is into 'Programmer's mood and their performance'. For my experiment I need your kind help. I need people who know any of the programming languages from C/C++, C#, java and VB.NET. This is an online experiment. The URL of the page is http://uxisfyp1.brunel.ac.uk/cspgiak . This experiment will only take 15 minutes of your precious time. Please also refer to as many people as you can who know computer languages. If you also want to be a part of a lucky draw at the end of experiment please enter you email at the results page. The prize is £20 Amazon vouchers or some programming book within that limit. We will send this book to ur address wherever you are.
Please follow the instructions carefully on the start page so that we can have accurate results. Please see the url again.
http://uxisfyp1.brunel.ac.uk/cspgiak
Copy or paste this URL in your browser address bar or click the link. Please Don't forget to refer it to others.
Thank you in advance.
Regards,
-- modified at 9:42 Friday 13th October, 2006
Iftikhar Ahmed Khan
Researcher,
School of Information Systems, Computing and Mathematics
Brunel University, Uxbridge, Middlesex UB8 3PH, UK
|
|
|
|
|
I was thinking of IP address, but people can change those easily.
What else is there that can't be changed? And where do i access it?
|
|
|
|
|
you should see message board of past two three days this matter is solved nicely by someone
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
I don't see it T_T
I saw something for win xp product key, but i don't think that would be so great.
|
|
|
|
|
you can try this
string s = new managementObject("win32_logicaldisk.deviceID=\"c:\"".Properties["VolumeSerialNumber"].Value.ToString()
need to import system.management class
you can google for better options
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Thanks i'll try that, ahh, life is good.
|
|
|
|
|
Oh yeah? That Volume Serial Number is the same between machines if the machine was cloned. Which is a very common technique of deploying lots of machines in mass quantities. Every machine will have the same VSN as the source machine it was cloned from.
I've even a utility, a while back, that let you set the VSN to any number you wanted. So, even if you reformatted the hard drive and got a different VSN, you could always reset it to something else.
Basically, there is no one piece of information that is guaranteed unique from machine to machine in every environment. Even the Machine SID can be the same as another machine (again, if cloned!), if it's not in a domain environment.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
As Dave already said, the volume serial number can be easily changed by software because it is just a identifier for the partition and not connected to the physical drive.
There is no truly unique ID, but a good starting point is the MAC address of the network adapter - only few network cards support changing it by software, and you cannot have to machines with the same MAC on a network.
|
|
|
|
|
Yeah. What about processor id?
Hmm, infact, if i just use weird stuff to identify the machine, they won't know what to change. Haha.
Oh and this isn't for software activation or anything, its for this online thing, when somebody gets banned, i need them to STAY banned.
|
|
|
|
|
Hmmm, then what about different users utilizing the same computer? And if someone gets banned, can't they simply switch machines to regain access?
Is this per-machine scheme really the best idea?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
i am working with c# 2005 windows application.i referenced COM components and i need to debug the com components with .net
Can u please let me know quickly as i am unable to make a step where ia m getting error.
|
|
|
|
|
You cannot debug COM componenets in .NET. If you really want to debug, then you need to debug it in unmanaged environment. Say by using visual interdev and visual basic IDE.
|
|
|
|
|
The error message is below:
Error 4 The type 'Microsoft.DirectX.Direct3D.Texture' exists in both 'c:\WINDOWS\assembly\GAC\Microsoft.DirectX.Direct3D\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.Direct3D.dll' and 'c:\WINDOWS\assembly\GAC_32\Microsoft.DirectX\2.0.0.0__31bf3856ad364e35\Microsoft.DirectX.dll' E:\CodeProject\SpinningNumbersClock\SpinningNumber.cs 29 18 SpinningNumbersClock
I do not know the reason!
Can you help me ?
Thanks a lot!!
bestyan 2006/10/13 ,from Jiang Su ,China
|
|
|
|
|
in your references add remove microsoft.directx
than add reference of microsoft.directx where version is not 2.0
OR
remove microsoft.directx.direct3d from your references
this error come because directx 2.0 have directx , directx.direct3d, directx.direct3dx, are included in same file
so you have a choice to either remove latest directx or the older other references
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Hi all,
Can anybody help me in creating a setup for my project that i have coded.
Please if there is any replies let it be a full path solution.
Lead me all the way till i see the setup file.
Thanks in advance,
jmail abou khalil
|
|
|
|
|
jamil abou khalil wrote: Lead me all the way till i see the setup file.
What documentation have you read on the subject? and what part did you get stuck on?
|
|
|
|
|
I am reading some documents.
But i didn't figure out how to make the setup file functional.
I am creating a setup file but it seems it is been created in a wronge way cause it is not working
jamil abou khalil
|
|
|
|
|
What exactly doesn't work?
WM.
What about weapons of mass-construction?
|
|
|
|
|
In the solution explorer select your project and than add a new setproject to it.
now u wll see some changes in solution explorer , a set project is attatched wuith your project in the solution explorer ,,,
now right click on setup project and add project primary out put to your project ,,,
now again right click on ur setup project and click on add custom function ,,
add custom function ,,, into your project output,,,now
select your project selct build menu, select configuration manager ,
and select release and check both project and your setup project or build,,,
now build your project ,,,
after builiding if it is compiled successfully ,,
now again right click on ur project and click on install
ok bye
hello
|
|
|
|
|
Hi all,
I'm having a horrible time trying to get text in opengl. I'm using the simpleOpenGlControl that comes with the TAO package and for some reason that means I cannot use the glutBitmapCharacter or glutBitmapString functions. I already posted on this, but I take it no one else has had the same problem as I had no replies.
Does anyone know of a way to eaisily render fonts in opengl? I've scoured the web and cannot find anything that works. There are various pieces of code out there, but none of them actually work. The closest I've come is the NeHe & Redbook tutorials, but I just cannot get my head around them. This is really driving me nuts. Please help.
|
|
|
|