本文整理汇总了C++中OUT_PPVOID函数的典型用法代码示例。如果您正苦于以下问题:C++ OUT_PPVOID函数的具体用法?C++ OUT_PPVOID怎么用?C++ OUT_PPVOID使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OUT_PPVOID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LsaAllocateSecurityDescriptor
NTSTATUS
LsaAllocateSecurityDescriptor(
OUT PSECURITY_DESCRIPTOR_RELATIVE *ppOut,
IN PLSA_SECURITY_DESCRIPTOR_BUFFER pIn
)
{
NTSTATUS ntStatus = STATUS_SUCCESS;
PSECURITY_DESCRIPTOR_RELATIVE pSecDesc = NULL;
BAIL_ON_INVALID_PTR(ppOut, ntStatus);
BAIL_ON_INVALID_PTR(pIn, ntStatus);
ntStatus = LsaRpcAllocateMemory(OUT_PPVOID(&pSecDesc),
pIn->BufferLen);
BAIL_ON_NT_STATUS(ntStatus);
memcpy(pSecDesc, pIn->pBuffer, pIn->BufferLen);
*ppOut = pSecDesc;
cleanup:
return ntStatus;
error:
if (pSecDesc)
{
LsaRpcFreeMemory(pSecDesc);
}
*ppOut = NULL;
goto cleanup;
}
示例2: LsaMarshalGroupInfo0ToGroupAddInfo
DWORD
LsaMarshalGroupInfo0ToGroupAddInfo(
HANDLE hLsa,
PLSA_GROUP_INFO_0 pGroupInfo,
PLSA_GROUP_ADD_INFO* ppAddInfo
)
{
DWORD dwError = 0;
PLSA_GROUP_ADD_INFO pAddInfo = NULL;
dwError = LwAllocateMemory(sizeof(*pAddInfo), OUT_PPVOID(&pAddInfo));
BAIL_ON_LSA_ERROR(dwError);
pAddInfo->gid = pGroupInfo->gid;
dwError = LwStrDupOrNull(pGroupInfo->pszName, &pAddInfo->pszName);
BAIL_ON_LSA_ERROR(dwError);
*ppAddInfo = pAddInfo;
cleanup:
return dwError;
error:
*ppAddInfo = NULL;
if (pAddInfo)
{
LsaFreeGroupAddInfo(pAddInfo);
}
goto cleanup;
}
示例3: LsaImplConvertMachinePasswordInfoWideToMultiByte
DWORD
LsaImplConvertMachinePasswordInfoWideToMultiByte(
IN PLSA_MACHINE_PASSWORD_INFO_W pPasswordInfo,
OUT PLSA_MACHINE_PASSWORD_INFO_A* ppNewPasswordInfo
)
{
DWORD dwError = 0;
PLSA_MACHINE_PASSWORD_INFO_A pNewPasswordInfo = NULL;
dwError = LwAllocateMemory(sizeof(*pNewPasswordInfo), OUT_PPVOID(&pNewPasswordInfo));
BAIL_ON_LSA_ERROR(dwError);
dwError = LsaImplFillMachinePasswordInfoWideToMultiByte(pPasswordInfo, pNewPasswordInfo);
BAIL_ON_LSA_ERROR(dwError);
error:
if (dwError)
{
if (pNewPasswordInfo)
{
LsaImplFreeMachinePasswordInfoA(pNewPasswordInfo);
pNewPasswordInfo = NULL;
}
}
*ppNewPasswordInfo = pNewPasswordInfo;
return dwError;
}
示例4: LwSmDriverConstruct
static
DWORD
LwSmDriverConstruct(
PLW_SERVICE_OBJECT pObject,
PCLW_SERVICE_INFO pInfo,
PVOID* ppData
)
{
DWORD dwError = 0;
PDRIVER_STATE pState = NULL;
dwError = LwAllocateMemory(sizeof(*pState), OUT_PPVOID(&pState));
BAIL_ON_ERROR(dwError);
dwError = LwSmCopyString(pInfo->pwszName, &pState->pName);
BAIL_ON_ERROR(dwError);
pState->State = LW_SERVICE_STATE_STOPPED;
*ppData = pState;
error:
return dwError;
}
示例5: PvfsNotifyAllocateFilter
static
NTSTATUS
PvfsNotifyAllocateFilter(
PPVFS_NOTIFY_FILTER_RECORD *ppNotifyRecord,
PPVFS_IRP_CONTEXT pIrpContext,
PPVFS_CCB pCcb,
FILE_NOTIFY_CHANGE NotifyFilter,
BOOLEAN bWatchTree
)
{
NTSTATUS ntError = STATUS_UNSUCCESSFUL;
PPVFS_NOTIFY_FILTER_RECORD pFilter = NULL;
ntError = PvfsAllocateMemory(
OUT_PPVOID(&pFilter),
sizeof(PVFS_NOTIFY_FILTER_RECORD),
TRUE);
BAIL_ON_NT_STATUS(ntError);
pFilter->pIrpContext = PvfsReferenceIrpContext(pIrpContext);
pFilter->pCcb = PvfsReferenceCCB(pCcb);
pFilter->NotifyFilter = NotifyFilter;
pFilter->bWatchTree = bWatchTree;
*ppNotifyRecord = pFilter;
pFilter = NULL;
cleanup:
return ntError;
error:
goto cleanup;
}
示例6: LwSmSrvAcquireServiceHandle
DWORD
LwSmSrvAcquireServiceHandle(
PCWSTR pwszName,
PLW_SERVICE_HANDLE phHandle
)
{
DWORD dwError = 0;
PSM_TABLE_ENTRY pEntry = NULL;
LW_SERVICE_HANDLE hHandle = NULL;
dwError = LwSmTableGetEntry(pwszName, &pEntry);
BAIL_ON_ERROR(dwError);
dwError = LwAllocateMemory(sizeof(*hHandle), OUT_PPVOID(&hHandle));
BAIL_ON_ERROR(dwError);
hHandle->pEntry = pEntry;
*phHandle = hHandle;
cleanup:
return dwError;
error:
*phHandle = NULL;
if (pEntry)
{
LwSmTableReleaseEntry(pEntry);
}
goto cleanup;
}
示例7: LwIoGetThreadState
NTSTATUS
LwIoGetThreadState(
OUT PIO_THREAD_STATE* ppState
)
{
NTSTATUS Status = STATUS_SUCCESS;
PIO_THREAD_STATE pState = NULL;
Status = LwIoThreadInit();
BAIL_ON_NT_STATUS(Status);
pState = pthread_getspecific(gStateKey);
if (!pState)
{
Status = LwIoAllocateMemory(sizeof(*pState), OUT_PPVOID(&pState));
BAIL_ON_NT_STATUS(Status);
if (pthread_setspecific(gStateKey, pState))
{
Status = STATUS_INSUFFICIENT_RESOURCES;
BAIL_ON_NT_STATUS(Status);
}
}
*ppState = pState;
error:
return Status;
}
示例8: LwSmQueryServiceDependencyClosure
DWORD
LwSmQueryServiceDependencyClosure(
LW_SERVICE_HANDLE hHandle,
PWSTR** pppwszServiceList
)
{
DWORD dwError = 0;
PWSTR* ppwszServiceList = NULL;
dwError = LwAllocateMemory(sizeof(*ppwszServiceList) * 1, OUT_PPVOID(&ppwszServiceList));
BAIL_ON_ERROR(dwError);
dwError = LwSmQueryServiceDependencyClosureHelper(hHandle, &ppwszServiceList);
BAIL_ON_ERROR(dwError);
*pppwszServiceList = ppwszServiceList;
cleanup:
return dwError;
error:
*pppwszServiceList = NULL;
if (ppwszServiceList)
{
LwSmFreeStringList(ppwszServiceList);
}
goto cleanup;
}
示例9: LwLdapEnablePageControlOption
DWORD
LwLdapEnablePageControlOption(
HANDLE hDirectory
)
{
DWORD dwError = LW_ERROR_SUCCESS;
PLW_LDAP_DIRECTORY_CONTEXT pDirectory = NULL;
LDAPControl serverControl = {0};
LDAPControl *ppServerPageCtrls[2] = {NULL, NULL};
serverControl.ldctl_value.bv_val = NULL;
serverControl.ldctl_value.bv_len = 0;
serverControl.ldctl_oid = LDAP_CONTROL_PAGEDRESULTS;
serverControl.ldctl_iscritical = 'T';
ppServerPageCtrls[0] = &serverControl;
pDirectory = (PLW_LDAP_DIRECTORY_CONTEXT)hDirectory;
dwError = ldap_set_option(pDirectory->ld,
LDAP_OPT_SERVER_CONTROLS,
OUT_PPVOID(&ppServerPageCtrls));
BAIL_ON_LDAP_ERROR(dwError);
cleanup:
return dwError;
error:
goto cleanup;
}
示例10: LsaImplDuplicateMachineAccountInfoW
DWORD
LsaImplDuplicateMachineAccountInfoW(
IN PLSA_MACHINE_ACCOUNT_INFO_W pAccountInfo,
OUT PLSA_MACHINE_ACCOUNT_INFO_W* ppNewAccountInfo
)
{
DWORD dwError = 0;
PLSA_MACHINE_ACCOUNT_INFO_W pNewAccountInfo = NULL;
dwError = LwAllocateMemory(sizeof(*pNewAccountInfo), OUT_PPVOID(&pNewAccountInfo));
BAIL_ON_LSA_ERROR(dwError);
dwError = LsaImplFillMachineAccountInfoW(pAccountInfo, pNewAccountInfo);
BAIL_ON_LSA_ERROR(dwError);
error:
if (dwError)
{
if (pNewAccountInfo)
{
LsaImplFreeMachineAccountInfoW(pNewAccountInfo);
pNewAccountInfo = NULL;
}
}
*ppNewAccountInfo = pNewAccountInfo;
return dwError;
}
示例11: RdrResolveToDomain
NTSTATUS
RdrResolveToDomain(
PCWSTR pwszHostname,
PWSTR* ppwszDomain
)
{
NTSTATUS status = STATUS_SUCCESS;
BOOLEAN bLocked = FALSE;
PWSTR pwszDomain = NULL;
LWIO_LOCK_MUTEX(bLocked, &gRdrRuntime.Lock);
if (!gRdrRuntime.pDomainHints)
{
status = STATUS_NOT_FOUND;
}
else
{
status = LwRtlHashMapFindKey(
gRdrRuntime.pDomainHints,
OUT_PPVOID(&pwszDomain),
pwszHostname);
}
BAIL_ON_NT_STATUS(status);
status = LwRtlWC16StringDuplicate(ppwszDomain, pwszDomain);
BAIL_ON_NT_STATUS(status);
error:
LWIO_UNLOCK_MUTEX(bLocked, &gRdrRuntime.Lock);
return status;
}
示例12: PvfsWildcardStackPush
static
NTSTATUS
PvfsWildcardStackPush(
IN OUT PLW_LIST_LINKS pStack,
IN PSTR pszInputString,
IN PSTR pszPattern
)
{
NTSTATUS ntError = STATUS_SUCCESS;
PPVFS_WILDCARD_STATE_ENTRY pState = NULL;
ntError = PvfsAllocateMemory(OUT_PPVOID(&pState), sizeof(*pState), TRUE);
BAIL_ON_NT_STATUS(ntError);
pState->pszInputString = pszInputString;
pState->pszPattern = pszPattern;
LwListInsertAfter(pStack, &pState->StackLinks);
cleanup:
return ntError;
error:
goto cleanup;
}
示例13: PvfsWildcardStackPop
static
NTSTATUS
PvfsWildcardStackPop(
IN OUT PLW_LIST_LINKS pStack,
OUT PSTR *ppszInputString,
OUT PSTR *ppszPattern
)
{
NTSTATUS ntError = STATUS_SUCCESS;
PLW_LIST_LINKS pStateLink = NULL;
PPVFS_WILDCARD_STATE_ENTRY pState = NULL;
pStateLink = LwListRemoveAfter(pStack);
pState = LW_STRUCT_FROM_FIELD(
pStateLink,
PVFS_WILDCARD_STATE_ENTRY,
StackLinks);
*ppszInputString = pState->pszInputString;
*ppszPattern = pState->pszPattern;
PvfsFreeMemory(OUT_PPVOID(&pState));
return ntError;
}
示例14: LwSmTableGetEntryDependencyClosure
DWORD
LwSmTableGetEntryDependencyClosure(
PSM_TABLE_ENTRY pEntry,
PWSTR** pppwszServiceList
)
{
DWORD dwError = 0;
PWSTR* ppwszServiceList = NULL;
dwError = LwAllocateMemory(sizeof(*ppwszServiceList) * 1, OUT_PPVOID(&ppwszServiceList));
BAIL_ON_ERROR(dwError);
dwError = LwSmTableGetEntryDependencyClosureHelper(pEntry, &ppwszServiceList);
BAIL_ON_ERROR(dwError);
*pppwszServiceList = ppwszServiceList;
cleanup:
return dwError;
error:
*pppwszServiceList = NULL;
if (ppwszServiceList)
{
LwSmFreeStringList(ppwszServiceList);
}
goto cleanup;
}
示例15: InitPool
static
NTSTATUS
InitPool(
VOID
)
{
NTSTATUS status = STATUS_SUCCESS;
PLW_THREAD_POOL pNewPool = NULL;
if (!gSvcmState.pPool)
{
status = LwRtlCreateThreadPool(&pNewPool, NULL);
GCOS(status);
if (InterlockedCompareExchangePointer(
OUT_PPVOID(&gSvcmState.pPool),
pNewPool,
NULL) != NULL)
{
LwRtlFreeThreadPool(&pNewPool);
}
}
cleanup:
return status;
}