本文整理汇总了C++中OUT_PPVOID函数的典型用法代码示例。如果您正苦于以下问题:C++ OUT_PPVOID函数的具体用法?C++ OUT_PPVOID怎么用?C++ OUT_PPVOID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OUT_PPVOID函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:33,代码来源:lsa_memory.c
示例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;
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:35,代码来源:marshal.c
示例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;
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:29,代码来源:machinepwdinfo-impl.c
示例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;
}
开发者ID:twistround,项目名称:pbis,代码行数:25,代码来源:driver.c
示例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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:33,代码来源:notify.c
示例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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:34,代码来源:api.c
示例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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:31,代码来源:thread.c
示例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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:32,代码来源:client.c
示例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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:32,代码来源:lwldap.c
示例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;
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:29,代码来源:machinepwdinfo-impl.c
示例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;
}
开发者ID:virtual-void,项目名称:pbis,代码行数:34,代码来源:driver.c
示例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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:25,代码来源:wildcard.c
示例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;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:26,代码来源:wildcard.c
示例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;
}
开发者ID:twistround,项目名称:pbis,代码行数:32,代码来源:table.c
示例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;
}
开发者ID:borland667,项目名称:pbis,代码行数:27,代码来源:svcm.c
示例16: PvfsCreateSetEndOfFileContext
static
NTSTATUS
PvfsCreateSetEndOfFileContext(
OUT PPVFS_PENDING_SET_END_OF_FILE *ppSetEndOfFileContext,
IN PPVFS_IRP_CONTEXT pIrpContext,
IN PPVFS_CCB pCcb
)
{
NTSTATUS ntError = STATUS_UNSUCCESSFUL;
PPVFS_PENDING_SET_END_OF_FILE pSetEndOfFileCtx = NULL;
ntError = PvfsAllocateMemory(
OUT_PPVOID(&pSetEndOfFileCtx),
sizeof(PVFS_PENDING_SET_END_OF_FILE),
TRUE);
BAIL_ON_NT_STATUS(ntError);
pSetEndOfFileCtx->pIrpContext = PvfsReferenceIrpContext(pIrpContext);
pSetEndOfFileCtx->pCcb = PvfsReferenceCCB(pCcb);
*ppSetEndOfFileContext = pSetEndOfFileCtx;
ntError = STATUS_SUCCESS;
cleanup:
return ntError;
error:
goto cleanup;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:30,代码来源:fileEndOfFileInfo.c
示例17: AppendStringArray
static
DWORD
AppendStringArray(
PDWORD pdwCount,
PWSTR** pppwszArray,
PWSTR pwszString
)
{
DWORD dwError = 0;
PWSTR* ppwszNewArray = NULL;
dwError = LwReallocMemory(
*pppwszArray,
OUT_PPVOID(&ppwszNewArray),
sizeof(*ppwszNewArray) * (*pdwCount + 1));
BAIL_ON_SRVSVC_ERROR(dwError);
ppwszNewArray[(*pdwCount)++] = pwszString;
*pppwszArray = ppwszNewArray;
error:
return dwError;
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:25,代码来源:main.c
示例18: LsaSrvQueryAccountSecurity
static
NTSTATUS
LsaSrvQueryAccountSecurity(
PLSAR_ACCOUNT_CONTEXT pAccountContext,
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR_RELATIVE *ppSecurityDescRelative,
PDWORD pSecurityDescRelativeSize
)
{
NTSTATUS ntStatus = STATUS_SUCCESS;
DWORD err = ERROR_SUCCESS;
PSECURITY_DESCRIPTOR_RELATIVE pSecDescRelative = NULL;
DWORD secDescRelativeSize = 0;
PSECURITY_DESCRIPTOR_RELATIVE pSecurityDescRelative = NULL;
err = LsaSrvPrivsGetAccountSecurity(
NULL,
pAccountContext->pPolicyCtx->pUserToken,
pAccountContext->pAccountContext,
SecurityInformation,
&pSecDescRelative,
&secDescRelativeSize);
BAIL_ON_LSA_ERROR(err);
ntStatus = LsaSrvAllocateMemory(
OUT_PPVOID(&pSecurityDescRelative),
secDescRelativeSize);
BAIL_ON_NT_STATUS(ntStatus);
memcpy(pSecurityDescRelative,
pSecDescRelative,
secDescRelativeSize);
*ppSecurityDescRelative = pSecurityDescRelative;
*pSecurityDescRelativeSize = secDescRelativeSize;
error:
if (err || ntStatus)
{
if (pSecurityDescRelative)
{
LsaSrvFreeMemory(pSecurityDescRelative);
}
*ppSecurityDescRelative = NULL;
*pSecurityDescRelativeSize = 0;
}
LW_SAFE_FREE_MEMORY(pSecDescRelative);
if (ntStatus == STATUS_SUCCESS &&
err != ERROR_SUCCESS)
{
ntStatus = LwWin32ErrorToNtStatus(err);
}
return ntStatus;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:58,代码来源:lsa_querysecurity.c
示例19: LsaPstorepInitializePlugin
static
DWORD
LsaPstorepInitializePlugin(
OUT PLSA_PSTORE_PLUGIN_INFO PluginInfo,
IN PCSTR PluginName
)
{
DWORD dwError = 0;
int EE = 0;
LSA_PSTORE_PLUGIN_INITIALIZE_FUNCTION initFunction = NULL;
dwError = LwNtStatusToWin32Error(LwRtlCStringDuplicate(&PluginInfo->Name, PluginName));
GOTO_CLEANUP_ON_WINERROR_EE(dwError, EE);
dwError = LsaPstorepGetPluginPath(PluginInfo->Name, &PluginInfo->Path);
GOTO_CLEANUP_ON_WINERROR_EE(dwError, EE);
dwError = LsaPstorepOpenPlugin(
PluginInfo->Path,
LSA_PSTORE_PLUGIN_INITIALIZE_FUNCTION_NAME,
&PluginInfo->LibraryHandle,
OUT_PPVOID(&initFunction));
GOTO_CLEANUP_ON_WINERROR_EE(dwError, EE);
dwError = initFunction(LSA_PSTORE_PLUGIN_VERSION,
PluginInfo->Name,
&PluginInfo->Dispatch,
&PluginInfo->Context);
GOTO_CLEANUP_ON_WINERROR_EE(dwError, EE);
if (!PluginInfo->Dispatch)
{
LW_RTL_LOG_ERROR("LSA pstore plugin %s is missing a dispatch table",
PluginInfo->Name);
dwError = ERROR_DLL_INIT_FAILED;
GOTO_CLEANUP_EE(EE);
}
if (!PluginInfo->Dispatch->Cleanup)
{
LW_RTL_LOG_ERROR("LSA pstore plugin %s is missing the Cleanup function",
PluginInfo->Name);
dwError = ERROR_DLL_INIT_FAILED;
GOTO_CLEANUP_EE(EE);
}
LW_RTL_LOG_VERBOSE("Loaded LSA pstore plugin %s from %s",
PluginInfo->Name, PluginInfo->Path);
cleanup:
if (dwError)
{
LsaPstorepCleanupPlugin(PluginInfo);
}
LSA_PSTORE_LOG_LEAVE_ERROR_EE(dwError, EE);
return dwError;
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:58,代码来源:lsapstore-plugin.c
示例20: PvfsFindParentFCB
static
NTSTATUS
PvfsFindParentFCB(
PPVFS_FCB *ppParentFcb,
PCSTR pszFilename
)
{
NTSTATUS ntError = STATUS_UNSUCCESSFUL;
PPVFS_FCB pFcb = NULL;
PSTR pszDirname = NULL;
PPVFS_CB_TABLE_ENTRY pBucket = NULL;
if (LwRtlCStringIsEqual(pszFilename, "/", TRUE))
{
ntError = STATUS_SUCCESS;
*ppParentFcb = NULL;
goto cleanup;
}
ntError = PvfsFileDirname(&pszDirname, pszFilename);
BAIL_ON_NT_STATUS(ntError);
ntError = PvfsCbTableGetBucket(&pBucket, &gPvfsDriverState.FcbTable, pszDirname);
BAIL_ON_NT_STATUS(ntError);
ntError = PvfsCbTableLookup((PPVFS_CONTROL_BLOCK*)OUT_PPVOID(&pFcb), pBucket, pszDirname);
if (ntError == STATUS_OBJECT_NAME_NOT_FOUND)
{
ntError = PvfsCreateFCB(
&pFcb,
pszDirname,
FALSE,
0,
0);
}
BAIL_ON_NT_STATUS(ntError);
*ppParentFcb = PvfsReferenceFCB(pFcb);
cleanup:
if (pFcb)
{
PvfsReleaseFCB(&pFcb);
}
if (pszDirname)
{
LwRtlCStringFree(&pszDirname);
}
return ntError;
error:
goto cleanup;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:57,代码来源:fcb.c
注:本文中的OUT_PPVOID函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论