service.cpp revision 3fb3de312d1ff675e0f7cc62a7d46cbb1d5d9353
/* $Id$ */
/** @file
* Guest Control Service: Controlling the guest.
*/
/*
* Copyright (C) 2011-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/** @page pg_svc_guest_control Guest Control HGCM Service
*
* This service acts as a proxy for handling and buffering host command requests
* and clients on the guest. It tries to be as transparent as possible to let
* the guest (client) and host side do their protocol handling as desired.
*
* The following terms are used:
* - Host: A host process (e.g. VBoxManage or another tool utilizing the Main API)
* which wants to control something on the guest.
* - Client: A client (e.g. VBoxService) running inside the guest OS waiting for
* new host commands to perform. There can be multiple clients connected
* to this service. A client is represented by its unique HGCM client ID.
* - Context ID: An (almost) unique ID automatically generated on the host (Main API)
* to not only distinguish clients but individual requests. Because
* the host does not know anything about connected clients it needs
* an indicator which it can refer to later. This context ID gets
* internally bound by the service to a client which actually processes
* the command in order to have a relationship between client<->context ID(s).
*
* The host can trigger commands which get buffered by the service (with full HGCM
* parameter info). As soon as a client connects (or is ready to do some new work)
* it gets a buffered host command to process it. This command then will be immediately
* removed from the command list. If there are ready clients but no new commands to be
* processed, these clients will be set into a deferred state (that is being blocked
* to return until a new command is available).
*
* If a client needs to inform the host that something happened, it can send a
* message to a low level HGCM callback registered in Main. This callback contains
* the actual data as well as the context ID to let the host do the next necessary
* steps for this context. This context ID makes it possible to wait for an event
* inside the host's Main API function (like starting a process on the guest and
* wait for getting its PID returned by the client) as well as cancelling blocking
* host calls in order the client terminated/crashed (HGCM detects disconnected
* clients and reports it to this service's callback).
*
* Starting at VBox 4.2 the context ID itself consists of a session ID, an object
* ID (for example a process or file ID) and a count. This is necessary to not break
* compatibility between older hosts and to manage guest session on the host.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_HGCM
#include <map>
#include <memory> /* for auto_ptr */
#include <string>
#include <list>
#include "gctrl.h"
namespace guestControl {
/** Flag for indicating that the client only is interested in
* messages for specific contexts. */
#define CLIENTSTATE_FLAG_CONTEXTFILTER RT_BIT(0)
/**
* Structure for maintaining a pending (that is, a deferred and not yet completed)
* client command.
*/
typedef struct ClientConnection
{
/** The call handle */
/** Number of parameters */
/** The call parameters */
/** The standard constructor. */
/**
* Structure for holding a buffered host command which has
* not been processed yet.
*/
typedef struct HostCommand
{
{
return ++mRefCount;
}
{
LogFlowFunc(("Releasing CID=%RU32, refCount=%RU32\n",
mContextID, mRefCount));
/* Release reference for current command. */
if (--mRefCount == 0)
Free();
return mRefCount;
}
/**
* Allocates the command with an HGCM request. Needs to be free'd using Free().
*
* @return IPRT status code.
* @param uMsg Message type.
* @param cParms Number of parameters of HGCM request.
* @param paParms Array of parameters of HGCM request.
*/
{
LogFlowFunc(("Allocating uMsg=%RU32, cParms=%RU32, paParms=%p\n",
if (!cParms) /* At least one parameter (context ID) must be present. */
return VERR_INVALID_PARAMETER;
/* Paranoia. */
if (cParms > 256)
cParms = 256;
int rc = VINF_SUCCESS;
/*
* Don't verify anything here (yet), because this function only buffers
* the HGCM data into an internal structure and reaches it back to the guest (client)
* in an unmodified state.
*/
mParmCount = cParms;
if (mParmCount)
{
rc = VERR_NO_MEMORY;
}
if (RT_SUCCESS(rc))
{
for (uint32_t i = 0; i < mParmCount; i++)
{
{
case VBOX_HGCM_SVC_PARM_32BIT:
break;
case VBOX_HGCM_SVC_PARM_64BIT:
/* Not supported yet. */
break;
case VBOX_HGCM_SVC_PARM_PTR:
{
{
rc = VERR_NO_MEMORY;
break;
}
else
}
else
{
/* Size is 0 -- make sure we don't have any pointer. */
}
break;
default:
break;
}
if (RT_FAILURE(rc))
break;
}
}
if (RT_SUCCESS(rc))
{
/*
* Assume that the context ID *always* is the first parameter,
* assign the context ID to the command.
*/
}
return rc;
}
/**
* Frees the buffered HGCM request.
*
* @return IPRT status code.
*/
void Free(void)
{
AssertMsg(mRefCount == 0, ("Command CID=%RU32 still being used by a client (%RU32 refs), cannot free yet\n",
mContextID, mRefCount));
LogFlowFunc(("Freeing host command CID=%RU32, mMsgType=%RU32, mParmCount=%RU32, mpParms=%p\n",
for (uint32_t i = 0; i < mParmCount; i++)
{
{
case VBOX_HGCM_SVC_PARM_PTR:
break;
default:
break;
}
}
if (mpParms)
{
}
mParmCount = 0;
/* Removes the command from its list */
}
/**
* Copies data from the buffered HGCM request to the current HGCM request.
*
* @return IPRT status code.
* @param paDstParms Array of parameters of HGCM request to fill the data into.
* @param cPDstarms Number of parameters the HGCM request can handle.
* @param pSrcBuf Parameter buffer to assign.
*/
{
int rc = VINF_SUCCESS;
if (cDstParms != mParmCount)
{
LogFlowFunc(("Parameter count does not match (got %RU32, expected %RU32)\n",
cDstParms, mParmCount));
}
if (RT_SUCCESS(rc))
{
for (uint32_t i = 0; i < mParmCount; i++)
{
{
LogFlowFunc(("Parameter %RU32 type mismatch (got %RU32, expected %RU32)\n",
}
else
{
#ifdef DEBUG_andy
LogFlowFunc(("\tmpParms[%RU32] type = %RU32\n",
#endif
{
case VBOX_HGCM_SVC_PARM_32BIT:
#ifdef DEBUG_andy
LogFlowFunc(("\tmpParms[%RU32] = %RU32 (uint32_t)\n",
#endif
break;
case VBOX_HGCM_SVC_PARM_PTR:
{
#ifdef DEBUG_andy
LogFlowFunc(("\tmpParms[%RU32] = %p (ptr), size = %RU32\n",
#endif
continue; /* Only copy buffer if there actually is something to copy. */
if (RT_SUCCESS(rc))
{
}
break;
}
case VBOX_HGCM_SVC_PARM_64BIT:
/* Fall through is intentional. */
default:
LogFlowFunc(("Parameter %RU32 of type %RU32 is not supported yet\n",
break;
}
}
if (RT_FAILURE(rc))
{
LogFlowFunc(("Parameter %RU32 invalid (%Rrc), refusing\n",
i, rc));
break;
}
}
}
return rc;
}
{
int rc;
LogFlowFunc(("mMsgType=%RU32, mParmCount=%RU32, mpParms=%p\n",
/* Does the current host command need more parameter space which
* the client does not provide yet? */
{
/*
* So this call apparently failed because the guest wanted to peek
* how much parameters it has to supply in order to successfully retrieve
* this command. Let's tell him so!
*/
}
else
{
/*
* Has there been enough parameter space but the wrong parameter types
* were submitted -- maybe the client was just asking for the next upcoming
* host message?
*
* Note: To keep this compatible to older clients we return VERR_TOO_MUCH_DATA
* in every case.
*/
if (RT_FAILURE(rc))
}
return rc;
}
{
LogFlowFunc(("mMsgType=%RU32, mParmCount=%RU32, mpParms=%p\n",
LogFlowFunc(("Telling client the next upcoming message type=%RU32, count=%RU32\n",
mMsgType, mParmCount));
{
}
else
LogFlowFunc(("Client has not (yet) submitted enough parameters (%RU32) to at least peak for the next message\n",
pConnection->mNumParms));
/*
* Always return VERR_TOO_MUCH_DATA data here to
* keep it compatible with older clients and to
* have correct accounting (mHostRc + mHostCmdTries).
*/
return VERR_TOO_MUCH_DATA;
}
/** Reference count for keeping track how many connected
* clients still need to process this command until it can
* be removed. */
/** The context ID this command belongs to. Will be extracted
* *always* from HGCM parameter [0]. */
/** Dynamic structure for holding the HGCM parms */
} HostCommand;
/**
* certain host command.
*/
typedef struct ClientContext
{
/* Pointer to list node of this command. */
/** The standard constructor. */
/** Internal constrcutor. */
/**
* Structure for holding a connected guest client
* state.
*/
typedef struct ClientState
{
ClientState(void)
: mSvcHelpers(NULL),
mFlags(0), mContextFilter(0),
mIsPending(false) {}
mFlags(0), mContextFilter(0),
mIsPending(false) {}
{
AssertPtrReturn(pHostCmd, false);
/*
* If a sesseion filter is set, only obey those sessions we're interested in.
*/
{
return true;
}
else /* Client is interested in all commands. */
return true;
return false;
}
{
LogFlowFunc(("mIsPending=%RTbool, mpHostCmd=%p, CID=%RU32, type=%RU32\n",
if (mIsPending)
{
LogFlowFunc(("Client already is in pending mode\n"));
/*
* Signal that we don't and can't return yet.
*/
return VINF_HGCM_ASYNC_EXECUTE;
}
{
AssertMsg(mIsPending == false,
("Client %p already is pending but tried to receive a new host command\n", this));
mIsPending = true;
LogFlowFunc(("Client now is in pending mode\n"));
/*
* Signal that we don't and can't return yet.
*/
return VINF_HGCM_ASYNC_EXECUTE;
}
/*
* Signal that there already is a connection pending.
* Shouldn't happen in daily usage.
*/
AssertMsgFailed(("Client already has a connection pending\n"));
return VERR_SIGNAL_PENDING;
}
{
/* Create a command context to keep track of client-specific
* information about a certain command. */
/** @todo Exception handling! */
LogFlowFunc(("Assigning next host comamnd CID=%RU32, cmdType=%RU32, cmdParms=%RU32, new refCount=%RU32\n",
return VINF_SUCCESS;
}
const RTLISTANCHOR *pHostCmdList)
{
int rc = VINF_SUCCESS;
LogFlowFunc(("Client pConnection=%p, pHostCmdList=%p\n",
LogFlowFunc(("Client hostCmd=%p, mHostCmdRc=%Rrc, mHostCmdTries=%RU32\n",
/* No current command? Try getting a new one to process now. */
{
/* Get the next host command the clienet is interested in. */
bool fFoundCmd = false;
{
if (fFoundCmd)
{
if (RT_SUCCESS(rc2))
break;
}
}
LogFlowFunc(("Client %s new command\n",
/* If no new command was found, set client into pending state. */
if (!fFoundCmd)
}
if (mpHostCmd)
{
LogFlowFunc(("Processing command CID=%RU32 ended with rc=%Rrc\n",
bool fRemove = false;
if (RT_FAILURE(mHostCmdRc))
{
/*
* If the client understood the message but supplied too little buffer space
* don't send this message again and drop it after 3 unsuccessful attempts.
* The host then should take care of next actions (maybe retry it with a smaller buffer).
*/
if ( mHostCmdRc == VERR_TOO_MUCH_DATA
&& mHostCmdTries >= 3)
{
fRemove = true;
}
/* Client did not understand the message or something else weird happened. Try again one
* more time and drop it if it didn't get handled then. */
else if (mHostCmdTries > 1)
fRemove = true;
}
else
fRemove = true; /* Everything went fine, remove it. */
LogFlowFunc(("Client tried CID=%RU32 for %RU32 times, (last result=%Rrc, fRemove=%RTbool)\n",
if (fRemove)
{
/* Try fetching next command. */
LogFlowFunc(("Client removes itself from command CID=%RU32 (next command: %p, CID=%RU32)\n",
/* Remove command from context map. */
/** @todo Exception handling! */
/* Release reference for current command. */
{
LogFlowFunc(("Destroying command CID=%RU32\n",
mpHostCmd->mContextID));
}
/* Assign next command (if any) to this client. */
if (pCmdNext)
{
}
else
/* Reset everything else. */
mHostCmdTries = 0;
}
if (RT_SUCCESS(rc))
rc = mHostCmdRc;
}
return rc;
}
const PRTLISTANCHOR pHostCmdList)
{
AssertMsgReturn(!mIsPending, ("Can't use another connection when client still is in pending mode\n"),
LogFlowFunc(("Returned with rc=%Rrc\n"));
return rc;
}
{
/* Reset pending state. */
mIsPending = false;
LogFlowFunc(("Returned with rc=%Rrc\n"));
return rc;
}
int CancelWaiting(int rcPending)
{
LogFlowFunc(("Cancelling waiting with %Rrc, isPending=%RTbool, pendingNumParms=%RU32, flags=%x\n",
if ( mIsPending
{
mIsPending = false;
}
return VINF_SUCCESS;
}
{
int rc;
if (mIsPending)
{
/* If the client is in pending mode, always send back
* the peek result first. */
}
else
{
/* Try assigning the host command to the client and store the
* result code for later use. */
}
/* In any case the client did something, so complete
* the pending call with the result we just got. */
LogFlowFunc(("pConnection=%p, pHostCmd=%p, rc=%Rrc\n",
return rc;
}
/** Client flags. @sa CLIENTSTATE_FLAG_ flags. */
/** The context ID filter, based on the flags set. */
/** Pointer to current host command to process. */
/** Last (most recent) rc after handling the
* host command. */
int mHostCmdRc;
/** How many times the host service has tried to deliver this
* command to the according client. */
/** Map containing all context IDs a client is assigned to. */
/** Flag indicating whether the client currently is pending. */
bool mIsPending;
/** The client's pending connection. */
} ClientState;
/**
* Class containing the shared information service functionality.
*/
class Service : public RTCNonCopyable
{
private:
/** Type definition for use in callback functions. */
/** HGCM helper functions. */
/**
* Callback function supplied by the host for notification of updates
* to properties.
*/
/** User data pointer to be supplied to the host callback function. */
void *mpvHostData;
/** List containing all buffered host commands. */
/** Map containing all connected clients. The primary key contains
* the HGCM client ID to identify the client. */
public:
, mpvHostData(NULL)
{
}
/**
* @copydoc VBOXHGCMSVCHELPERS::pfnUnload
* Simply deletes the service object
*/
{
if (RT_SUCCESS(rc))
delete pSelf;
return rc;
}
/**
* @copydoc VBOXHGCMSVCHELPERS::pfnConnect
* Stub implementation of pfnConnect and pfnDisconnect.
*/
void *pvClient)
{
}
/**
* @copydoc VBOXHGCMSVCHELPERS::pfnConnect
* Stub implementation of pfnConnect and pfnDisconnect.
*/
void *pvClient)
{
}
/**
* @copydoc VBOXHGCMSVCHELPERS::pfnCall
* Wraps to the call member function
*/
void *pvClient,
{
LogFlowFunc (("pvService=%p, callHandle=%p, u32ClientID=%u, pvClient=%p, u32Function=%u, cParms=%u, paParms=%p\n",
}
/**
* @copydoc VBOXHGCMSVCHELPERS::pfnHostCall
* Wraps to the hostCall member function
*/
{
LogFlowFunc (("pvService=%p, u32Function=%u, cParms=%u, paParms=%p\n", pvService, u32Function, cParms, paParms));
}
/**
* @copydoc VBOXHGCMSVCHELPERS::pfnRegisterExtension
* Installs a host callback for notifications of property changes.
*/
void *pvExtension)
{
return VINF_SUCCESS;
}
private:
int clientGetCommand(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
int clientSetMsgFilter(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
void call(VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
int uninit(void);
};
/**
* Handles a client which just connected.
*
* @return IPRT status code.
* @param u32ClientID
* @param pvClient
*/
{
#ifdef VBOX_STRICT
{
AssertMsgFailed(("Client with ID=%RU32 already connected when it should not\n",
u32ClientID));
return VERR_ALREADY_EXISTS;
}
#endif
/** @todo Exception handling! */
return VINF_SUCCESS;
}
/**
* Handles a client which disconnected. This functiond does some
* internal cleanup as well as sends notifications to the host so
* that the host can do the same (if required).
*
* @return IPRT status code.
* @param u32ClientID The client's ID of which disconnected.
* @param pvClient User data, not used at the moment.
*/
{
LogFlowFunc(("Client with ID=%RU32 (%zu clients total) disconnected\n",
/* If this was the last connected (guest) client we need to
* unblock all eventually queued up (waiting) host calls. */
LogFlowFunc(("No connected clients left, notifying all queued up host callbacks\n"));
/*
* Throw out all stale clients.
*/
int rc = VINF_SUCCESS;
&& RT_SUCCESS(rc))
{
/*
* or for all items in case there is no waiting client around
* anymore.
*/
{
LogFlowFunc(("Cancelling %RU32 context(s) of client ID=%RU32\n",
{
/*
* Notify the host that clients with u32ClientID are no longer
* around and need to be cleaned up (canceling waits etc).
*/
if (RT_FAILURE(rc2))
{
LogFlowFunc(("Cancelling host command with CID=%RU32 failed with rc=%Rrc\n",
uContextID, rc2));
/* Keep going. */
}
itContext++;
}
/** @todo Exception handling! */
}
else
}
{
/*
* If all clients disconnected we also need to make sure that all buffered
* host commands need to be notified, because Main is waiting a notification
* via a (multi stage) progress object.
*/
while (pCurCmd)
{
if (RT_FAILURE(rc2))
{
LogFlowFunc(("Cancelling host command with CID=%u (refCount=%RU32) failed with rc=%Rrc\n",
/* Keep going. */
}
if (fLast)
break;
}
}
return rc;
}
/**
* Either fills in parameters from a pending host command into our guest context or
* defer the guest call until we have something from the host.
*
* @return IPRT status code.
* @param u32ClientID The client's ID.
* @param callHandle The client's call handle.
* @param cParms Number of parameters.
* @param paParms Array of parameters.
*/
{
/*
* Lookup client in our list so that we can assign the context ID of
* a command to that client.
*/
AssertMsg(itClientState != mClientStateMap.end(), ("Client with ID=%RU32 not found when it should be present\n",
u32ClientID));
return VERR_NOT_FOUND; /* Should never happen. */
/* Use the current (inbound) connection. */
/*
* If host command list is empty (nothing to do right now) just
* defer the call until we got something to do (makes the client
* wait).
*/
int rc;
if (RTListIsEmpty(&mHostCmdList))
{
}
else
{
}
return rc;
}
{
/*
* Lookup client in our list so that we can assign the context ID of
* a command to that client.
*/
AssertMsg(itClientState != mClientStateMap.end(), ("Client with ID=%RU32 not found when it should be present\n",
u32ClientID));
return VERR_NOT_FOUND; /* Should never happen. */
if (cParms != 2)
return VERR_INVALID_PARAMETER;
if (RT_SUCCESS(rc))
{
/* paParms[1] unused yet. */
LogFlowFunc(("Client ID=%RU32 now has filter=%x enabled (flags=%x)\n",
}
return rc;
}
/**
* Cancels a buffered host command to unblock waiting on Main side
* via callbacks.
*
* @return IPRT status code.
* @param u32ContextID Context ID of host command to cancel.
*/
{
}
/**
* Client asks itself (in another thread) to cancel all pending waits which are blocking the client
* from shutting down / doing something else.
*
* @return IPRT status code.
* @param u32ClientID The client's ID.
* @param rcPending Result code for completing pending operation.
*/
{
return VINF_SUCCESS;
}
/**
* Notifies the host (using low-level HGCM callbacks) about an event
* which was sent from the client.
*
* @return IPRT status code.
* @param eFunction Function (event) that occured.
* @param cParms Number of parameters.
* @param paParms Array of parameters.
*/
{
LogFlowFunc(("eFunction=%ld, cParms=%ld, paParms=%p\n",
int rc;
if (mpfnHostCallback)
{
}
else
return rc;
}
/**
* Processes a command receiveed from the host side and re-routes it to
* a connect client on the guest.
*
* @return IPRT status code.
* @param eFunction Function code to process.
* @param cParms Number of parameters.
* @param paParms Array of parameters.
*/
{
/*
* If no client is connected at all we don't buffer any host commands
* and immediately return an error to the host. This avoids the host
* waiting for a response from the guest side in case VBoxService on
*/
if (mClientStateMap.size() == 0)
return VERR_NOT_FOUND;
int rc;
if (pHostCmd)
{
if (RT_SUCCESS(rc))
}
else
rc = VERR_NO_MEMORY;
if (RT_SUCCESS(rc))
{
LogFlowFunc(("Handling host command CID=%RU32, numClients=%zu\n",
/*
* Wake up all pending clients which are interested in this
* host command.
*/
#ifdef DEBUG
uint32_t uClientsWokenUp = 0;
#endif
AssertMsg(itClientState != mClientStateMap.end(), ("Client state map is empty when it should not\n"));
{
{
LogFlowFunc(("Waking up client ID=%RU32 (isPending=%RTbool) ...\n",
LogFlowFunc(("Client ID=%RU32 wakeup ended with rc=%Rrc\n",
#ifdef DEBUG
#endif
}
else
LogFlowFunc(("Client ID=%RU32 is not in pending state\n",
itClientState->first));
}
#ifdef DEBUG
LogFlowFunc(("%RU32 clients have been succcessfully woken up\n",
#endif
}
return rc;
}
/**
* Handle an HGCM service call.
* @copydoc VBOXHGCMSVCFNTABLE::pfnCall
* @note All functions which do not involve an unreasonable delay will be
* handled synchronously. If needed, we will add a request handler
* thread in future for those which do.
*
* @thread HGCM
*/
{
int rc = VINF_SUCCESS;
LogFlowFunc(("u32ClientID=%RU32, fn=%RU32, cParms=%RU32, paParms=0x%p\n",
try
{
/*
* The guest asks the host for the next message to process.
*/
if (eFunction == GUEST_MSG_WAIT)
{
LogFlowFunc(("GUEST_MSG_GET\n"));
}
else
{
switch (eFunction)
{
/*
* A client wants to shut down and asks us (this service) to cancel
* client can gracefully shut down.
*/
LogFlowFunc(("GUEST_CANCEL_PENDING_WAITS\n"));
break;
/*
* The guest only wants certain messages set by the filter mask(s).
* Since VBox 4.3+.
*/
case GUEST_MSG_FILTER:
LogFlowFunc(("GUEST_MSG_FILTER\n"));
break;
/*
* For all other regular commands we call our hostCallback
* function. If the current command does not support notifications,
* notifyHost will return VERR_NOT_SUPPORTED.
*/
default:
break;
}
if (rc != VINF_HGCM_ASYNC_EXECUTE)
{
/* Tell the client that the call is complete (unblocks waiting). */
}
}
}
{
rc = VERR_NO_MEMORY;
}
}
/**
* Service call handler for the host.
* @copydoc VBOXHGCMSVCFNTABLE::pfnHostCall
* @thread hgcm
*/
{
int rc = VERR_NOT_SUPPORTED;
LogFlowFunc(("fn=%RU32, cParms=%RU32, paParms=0x%p\n",
try
{
switch (eFunction)
{
/**
* Host
*/
{
LogFlowFunc(("HOST_CANCEL_PENDING_WAITS\n"));
{
if (RT_FAILURE(rc2))
LogFlowFunc(("Cancelling waiting for client ID=%RU32 failed with rc=%Rrc",
}
rc = VINF_SUCCESS;
break;
}
default:
break;
}
}
{
rc = VERR_NO_MEMORY;
}
return rc;
}
{
return VINF_SUCCESS;
}
} /* namespace guestControl */
using guestControl::Service;
/**
* @copydoc VBOXHGCMSVCLOAD
*/
{
int rc = VINF_SUCCESS;
{
}
else
{
LogFlowFunc(("ptable->cbSize = %d, ptable->u32Version = 0x%08X\n", ptable->cbSize, ptable->u32Version));
{
}
else
{
/* No exceptions may propagate outside. */
try {
} catch (int rcThrown) {
} catch (...) {
}
if (RT_SUCCESS(rc))
{
/*
* We don't need an additional client data area on the host,
* because we're a class which can have members for that :-).
*/
/* Register functions. */
/* Service specific initialization. */
}
}
}
return rc;
}