当前位置: 首页>>代码示例>>C++>>正文


C++ OUT_PPVOID函数代码示例

本文整理汇总了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;
}
开发者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


注:本文中的OUT_PPVOID函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。