in src/fc_activation_context.c [250:290]
HRESULT GetServiceEndpointResource(FC_ACTIVATION_CONTEXT_HANDLE fc_activation_context_handle,
/* [in] */ LPCWSTR serviceEndpointResourceName,
/* [retval][out] */ const FABRIC_ENDPOINT_RESOURCE_DESCRIPTION** bufferedValue)
{
HRESULT result;
if (
(fc_activation_context_handle == NULL) ||
(serviceEndpointResourceName == NULL) ||
(bufferedValue == NULL)
)
{
LogError("invalid argument FC_ACTIVATION_CONTEXT_HANDLE fc_activation_context_handle=%p, LPCWSTR serviceEndpointResourceName=%ls, const FABRIC_ENDPOINT_RESOURCE_DESCRIPTION * *bufferedValue=%p",
fc_activation_context_handle,
MU_WP_OR_NULL(serviceEndpointResourceName),
bufferedValue);
result = E_INVALIDARG;
}
else
{
ULONG i;
for (i = 0; i < fc_activation_context_handle->fabric_endpoint_resource_description_list.Count; i++)
{
if (wcscmp(fc_activation_context_handle->fabric_endpoint_resource_description_list.Items[i].Name, serviceEndpointResourceName) == 0)
{
*bufferedValue = fc_activation_context_handle->fabric_endpoint_resource_description_list.Items + i;
break;
}
}
if (i == fc_activation_context_handle->fabric_endpoint_resource_description_list.Count)
{
result = E_NOT_SET;
}
else
{
result = S_OK;
}
}
return result;
}