Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <HTML>
  3. <HEAD>
  4. <META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
  5. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  6. <TITLE>MSMQ Asp Sample Open Queue Page</TITLE>
  7. </HEAD>
  8. <BODY>
  9. <H1>MSMQ Asp Sample Open Queue Page</H1>
  10. <H2>Opening Queue : <%= Request.QueryString ( "MachName" ) & "\" & Request.QueryString ( "QName" ) %><br>
  11. <% Set msmqinfo=CreateObject ( "MSMQ.MSMQQueueInfo" )
  12. msmqinfo.PathName=Request.QueryString ( "MachName" ) & "\" & Request.QueryString ( "QName" )
  13. on error resume next
  14. Set Session ( "SendQueue" ) = msmqinfo.Open ( 2, 0 )
  15. if err.number <> 0 then
  16. response.write "<font color=""#FF0000"">Error</font> opening queue for receive access: 0x" & Hex(Err.Number) & " - " & Err.Description & "<br><br>"
  17. else
  18. on error resume next
  19. Set Session ( "RecvQueue" ) = msmqinfo.Open ( 1, 0 )
  20. if err.number <> 0 then
  21. response.write "<font color=""#FF0000"">Error</font> opening queue for send access: 0x" & Hex(Err.Number) & " - " & Err.Description & "<br><br>"
  22. else
  23. response.write "Queue opened.<br><br>"
  24. end if
  25. end if
  26. set msmqinfo=Nothing
  27. Session ( "qname" ) = Request.QueryString ( "QName" )
  28. Session ( "mname" ) = Request.QueryString ( "MachName" )
  29. %>
  30. </H2>
  31. <A HREF="Default.asp">[Home]</A>
  32. </BODY>
  33. </HTML>