Forum Discussion
HKosova
Alumni
14 years agoHi Shawn,
I'd recommend using MSMQ scripting API instead. You can find a sample script that demonstrates how to send and receive MSMQ messages here. It's a VBScript script, but it should help you get the idea.
But if you want to use .NET classes for this purpose, you can access them via the dotNET object. To make MSMQ .NET classes available for scripting, you'll need to add the System.Messaging.dll assembly to Tools > Current Project Properties > CLR Bridge. After that, you can write code like this:
I'd recommend using MSMQ scripting API instead. You can find a sample script that demonstrates how to send and receive MSMQ messages here. It's a VBScript script, but it should help you get the idea.
But if you want to use .NET classes for this purpose, you can access them via the dotNET object. To make MSMQ .NET classes available for scripting, you'll need to add the System.Messaging.dll assembly to Tools > Current Project Properties > CLR Bridge. After that, you can write code like this:
(".\\Private$\\MyPrivateQueue");
queue["Send"]("Hello, world");
// and so on