You are currently offline, waiting for your internet to reconnect

0x000006ba error if you open an existing queue on a Virtual Server

This article was previously published under Q305794
SYMPTOMS
If you open an existing queue on a virtual server, you receive a
0x000006ba
error.
CAUSE
A cluster resource DLL runs in the context of the local node. However, if you spawn a new process from the resource DLL, the new process runs in the context of the cluster. Message Queuing (also known as MSMQ) calls are made from the new process.
WORKAROUND
To work around this issue, follow these steps:
  1. Create a custom resource DLL in Microsoft Visual Studio 6.0.
  2. Add the following code to the do...while() loop in the xxxOnlineThread() call (error detection is removed from the code sample):
    RESOURCE_STATUS      resourceStatus;DWORD                nStatus;STARTUPINFO         StartupInfo;PROCESS_INFORMATION Process;LPWSTR              pszNameOfPropInError;LPWSTR              pszExpandedDir = NULL;LPWSTR              pszExpandedCommand = NULL;// Create Process parametersLPVOID   Environment = NULL;HANDLE processToken;HANDLE currentProcess;HANDLE hEventLog;DWORD nStatus = ResUtilGetPropertiesToParameterBlock(               pResourceEntry->hkeyParameters,               GenAppResourcePrivateProperties,               reinterpret_cast<LPBYTE>( &pResourceEntry->props ),               TRUE, // CheckForRequiredProperties               &pszNameOfPropInError               );// Perform resource-specific initialization before starting the app.if ( pResourceEntry->props.nUseNetworkName ) {// Create the new environment with the simulated net name.LPVOID   Environment = NULL;Environment = ResUtilGetEnvironmentWithNetName(pResourceEntry->hResource);} else {// get the current process token. If it fails, revert to using just the// system environment areacurrentProcess = GetCurrentProcess();OpenProcessToken(currentProcess, MAXIMUM_ALLOWED, &processToken);// Clone the current environment, picking up any changes that might have// been made after resmon startedCreateEnvironmentBlock(&Environment, processToken, FALSE);// Expand the current directory parameterif (pResourceEntry->props.pszCurrentDirectory) {pszExpandedDir = xxxExpandEnvironmentStrings(pResourceEntry->props.pszCurrentDirectory);} // Try to start the new process				CreateProcess(<Enter Executable Name Here>, NULL, NULL, NULL, FALSE,				CREATE_UNICODE_ENVIRONMENT, Environment, pszExpandedDir, &StartupInfo,				&Process);
Note The "
xxx
" in the function call (
pszExpandedDir = xxxExpandEnvironmentStrings(pResourceEntry->props.pszCurrentDirectory
) corresponds to the name of the resource DLL.

This code does the following things:
  • The code sets up the environment block with the UseNetnameAsComputerName property (
    ResUtilGetEnvironmentWithNetName(...)
    ).
  • The code saves this information to the environment block for the process (
    CreateEnvironmentBlock(...)
    ).
  • The code creates a new process that runs in the context of the virtual server (
    CreateProcess(...)
    ).

Make your Message Queuing calls in this new process.
STATUS
This behavior is by design.
Properties

Article ID: 305794 - Last Review: 02/23/2007 06:08:34 - Revision: 2.1

Microsoft Message Queuing 2.0

  • kbprb KB305794
Feedback
merTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" uage);" class="ng-binding" id="language-es-py">Paraguay - Español
Venezuela - Español
/html>mp;t=">="https://c1.microsoft.com/c.gif?DI=4050&did=1&t="> var Route = "76500"; var Ctrl = ""; document.write(" ')[0].appendChild(m);" onload="var m=document.createElement('meta');m.name='ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src="http://c1.microsoft.com/c.gif?"> y>