• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ MIDL_user_free函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MIDL_user_free函数的典型用法代码示例。如果您正苦于以下问题:C++ MIDL_user_free函数的具体用法?C++ MIDL_user_free怎么用?C++ MIDL_user_free使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MIDL_user_free函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: kull_m_rpc_drsr_free_DRS_MSG_CRACKREPLY_data

void kull_m_rpc_drsr_free_DRS_MSG_CRACKREPLY_data(DWORD nameCrackOutVersion, DRS_MSG_CRACKREPLY * reply)
{
	DWORD i;
	if(reply)
	{
		switch (nameCrackOutVersion)
		{
		case 1:
			if(reply->V1.pResult)
			{
				for(i = 0; i < reply->V1.pResult->cItems; i++)
				{
					if(reply->V1.pResult->rItems[i].pDomain)
						MIDL_user_free(reply->V1.pResult->rItems[i].pDomain);
					if(reply->V1.pResult->rItems[i].pName)
						MIDL_user_free(reply->V1.pResult->rItems[i].pName);
				}
				if(reply->V1.pResult->rItems)
					MIDL_user_free(reply->V1.pResult->rItems);
				MIDL_user_free(reply->V1.pResult);
			}
			break;
		default:
			PRINT_ERROR(L"nameCrackOutVersion not valid (0x%08x - %u)\n", nameCrackOutVersion, nameCrackOutVersion);
			break;
		}
	}
}
开发者ID:0x4e38,项目名称:mimikatz,代码行数:28,代码来源:kull_m_rpc_drsr.c


示例2: free_list

static void free_list(LPWSTR *list, DWORD count)
{
    LONG i;

    for (i = 0; i < count; i++)
        MIDL_user_free(list[i]);

    MIDL_user_free(list);
}
开发者ID:AndreRH,项目名称:wine,代码行数:9,代码来源:folder_collection.c


示例3: SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR

VOID
NTAPI
SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR(PSAMPR_SR_SECURITY_DESCRIPTOR Ptr)
{
    if (Ptr != NULL)
    {
        if (Ptr->SecurityDescriptor != NULL)
            MIDL_user_free(Ptr->SecurityDescriptor);

        MIDL_user_free(Ptr);
    }
}
开发者ID:RareHare,项目名称:reactos,代码行数:12,代码来源:samsrv.c


示例4: SamIFree_SAMPR_GET_GROUPS_BUFFER

VOID
NTAPI
SamIFree_SAMPR_GET_GROUPS_BUFFER(PSAMPR_GET_GROUPS_BUFFER Ptr)
{
    if (Ptr != NULL)
    {
        if (Ptr->Groups != NULL)
            MIDL_user_free(Ptr->Groups);

        MIDL_user_free(Ptr);
    }
}
开发者ID:RareHare,项目名称:reactos,代码行数:12,代码来源:samsrv.c


示例5: LsapMmFreeLastEntry

VOID
LsapMmFreeLastEntry(
    IN PLSAP_MM_FREE_LIST FreeList
    )

/*++

Routine Description:

    This function frees the last buffer appeended to the Free List.

Arguments:

    FreeList - Pointer to Free List.

--*/

{
    ULONG LastIndex = FreeList->UsedCount - 1;

    if (FreeList->Buffers[LastIndex].Options & LSAP_MM_MIDL) {

        MIDL_user_free( FreeList->Buffers[LastIndex].Buffer );

    } else {

        LsapFreeLsaHeap( FreeList->Buffers[LastIndex].Buffer );
    }

    FreeList->Buffers[LastIndex].Buffer = NULL;
    FreeList->UsedCount--;
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:32,代码来源:lsasrvmm.c


示例6: LsaQueryInformationPolicy

/*
 * @implemented
 */
NTSTATUS
WINAPI
LsaQueryInformationPolicy(IN LSA_HANDLE PolicyHandle,
                          IN POLICY_INFORMATION_CLASS InformationClass,
                          OUT PVOID *Buffer)
{
    PLSAPR_POLICY_INFORMATION PolicyInformation = NULL;
    NTSTATUS Status;

    TRACE("(%p,0x%08x,%p)\n", PolicyHandle, InformationClass, Buffer);

    RpcTryExcept
    {
        Status = LsarQueryInformationPolicy((LSAPR_HANDLE)PolicyHandle,
                                            InformationClass,
                                            &PolicyInformation);
        *Buffer = PolicyInformation;
    }
    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
    {
        if (PolicyInformation != NULL)
            MIDL_user_free(PolicyInformation);

        Status = I_RpcMapWin32Status(RpcExceptionCode());
    }
    RpcEndExcept;

    TRACE("Done (Status: 0x%08x)\n", Status);

    return Status;
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:34,代码来源:lsa.c


示例7: LsaLookupPrivilegeName

/*
 * @implemented
 */
NTSTATUS
WINAPI
LsaLookupPrivilegeName(IN LSA_HANDLE PolicyHandle,
                       IN PLUID Value,
                       OUT PUNICODE_STRING *Name)
{
    PRPC_UNICODE_STRING NameBuffer = NULL;
    NTSTATUS Status;

    TRACE("(%p,%p,%p)\n", PolicyHandle, Value, Name);

    RpcTryExcept
    {
        Status = LsarLookupPrivilegeName(PolicyHandle,
                                         Value,
                                         &NameBuffer);

        *Name = (PUNICODE_STRING)NameBuffer;
    }
    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
    {
        if (NameBuffer != NULL)
            MIDL_user_free(NameBuffer);

        Status = I_RpcMapWin32Status(RpcExceptionCode());
    }
    RpcEndExcept;

    return Status;
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:33,代码来源:lsa.c


示例8: LsarQueryModification

NTSTATUS
LsarQueryModification(PLSA_DB_OBJECT PolicyObject,
                      PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
    PPOLICY_MODIFICATION_INFO Info = NULL;
    ULONG AttributeSize;
    NTSTATUS Status;

    *PolicyInformation = NULL;

    AttributeSize = sizeof(POLICY_MODIFICATION_INFO);
    Info = MIDL_user_allocate(AttributeSize);
    if (Info == NULL)
        return STATUS_INSUFFICIENT_RESOURCES;

    Status = LsapGetObjectAttribute(PolicyObject,
                                    L"PolMod",
                                    Info,
                                    &AttributeSize);
    if (!NT_SUCCESS(Status))
    {
        MIDL_user_free(Info);
    }
    else
    {
        *PolicyInformation = (PLSAPR_POLICY_INFORMATION)Info;
    }

    return Status;
}
开发者ID:GYGit,项目名称:reactos,代码行数:30,代码来源:policy.c


示例9: _fgs__LSAPR_UNICODE_STRING

  /* routine that frees graph for struct _LSAPR_UNICODE_STRING */
void _fgs__LSAPR_UNICODE_STRING (LSAPR_UNICODE_STRING  * _source)
  {
  if (_source->Buffer !=0)
    {
    MIDL_user_free((void  *)(_source->Buffer));
    }
  }
开发者ID:mingpen,项目名称:OpenNT,代码行数:8,代码来源:oldstub.c


示例10: _fgs__LSAPR_ACCOUNT_INFORMATION

  /* routine that frees graph for struct _LSAPR_ACCOUNT_INFORMATION */
void _fgs__LSAPR_ACCOUNT_INFORMATION (LSAPR_ACCOUNT_INFORMATION  * _source)
  {
  if (_source->Sid !=0)
    {
    MIDL_user_free((void  *)(_source->Sid));
    }
  }
开发者ID:mingpen,项目名称:OpenNT,代码行数:8,代码来源:oldstub.c


示例11: _fgs__STRING

/* routine that frees graph for struct _STRING */
void _fgs__STRING (STRING  * _source)
  {
  if (_source->Buffer !=0)
    {
    MIDL_user_free((void  *)(_source->Buffer));
    }
  }
开发者ID:mingpen,项目名称:OpenNT,代码行数:8,代码来源:oldstub.c


示例12: _fgs__LSAPR_POLICY_AUDIT_EVENTS_INFO

  /* routine that frees graph for struct _LSAPR_POLICY_AUDIT_EVENTS_INFO */
void _fgs__LSAPR_POLICY_AUDIT_EVENTS_INFO (LSAPR_POLICY_AUDIT_EVENTS_INFO  * _source)
  {
  if (_source->EventAuditingOptions !=0)
    {
    MIDL_user_free((void  *)(_source->EventAuditingOptions));
    }
  }
开发者ID:mingpen,项目名称:OpenNT,代码行数:8,代码来源:oldstub.c


示例13: _fgs__LSAPR_TRANSLATED_SIDS

  /* routine that frees graph for struct _LSAPR_TRANSLATED_SIDS */
void _fgs__LSAPR_TRANSLATED_SIDS (LSAPR_TRANSLATED_SIDS  * _source)
  {
  if (_source->Sids !=0)
    {
    MIDL_user_free((void  *)(_source->Sids));
    }
  }
开发者ID:mingpen,项目名称:OpenNT,代码行数:8,代码来源:oldstub.c


示例14: _fgs__LSAPR_CR_CIPHER_VALUE

  /* routine that frees graph for struct _LSAPR_CR_CIPHER_VALUE */
void _fgs__LSAPR_CR_CIPHER_VALUE (LSAPR_CR_CIPHER_VALUE  * _source)
  {
  if (_source->Buffer !=0)
    {
    MIDL_user_free((void  *)(_source->Buffer));
    }
  }
开发者ID:mingpen,项目名称:OpenNT,代码行数:8,代码来源:oldstub.c


示例15: _fgs__LSAPR_SR_SECURITY_DESCRIPTOR

  /* routine that frees graph for struct _LSAPR_SR_SECURITY_DESCRIPTOR */
void _fgs__LSAPR_SR_SECURITY_DESCRIPTOR (LSAPR_SR_SECURITY_DESCRIPTOR  * _source)
  {
  if (_source->SecurityDescriptor !=0)
    {
    MIDL_user_free((void  *)(_source->SecurityDescriptor));
    }
  }
开发者ID:mingpen,项目名称:OpenNT,代码行数:8,代码来源:oldstub.c


示例16: LsarQueryAuditFull

NTSTATUS
LsarQueryAuditFull(PLSA_DB_OBJECT PolicyObject,
                   PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
    PPOLICY_AUDIT_FULL_QUERY_INFO AuditFullInfo = NULL;
    ULONG AttributeSize;
    NTSTATUS Status;

    *PolicyInformation = NULL;

    AttributeSize = sizeof(POLICY_AUDIT_FULL_QUERY_INFO);
    AuditFullInfo = MIDL_user_allocate(AttributeSize);
    if (AuditFullInfo == NULL)
        return STATUS_INSUFFICIENT_RESOURCES;

    Status = LsapGetObjectAttribute(PolicyObject,
                                    L"PolAdtFl",
                                    AuditFullInfo,
                                    &AttributeSize);
    if (!NT_SUCCESS(Status))
    {
        MIDL_user_free(AuditFullInfo);
    }
    else
    {
        *PolicyInformation = (PLSAPR_POLICY_INFORMATION)AuditFullInfo;
    }

    return Status;
}
开发者ID:GYGit,项目名称:reactos,代码行数:30,代码来源:policy.c


示例17: LsarSetAuditFull

NTSTATUS
LsarSetAuditFull(PLSA_DB_OBJECT PolicyObject,
                 PPOLICY_AUDIT_FULL_QUERY_INFO Info)
{
    PPOLICY_AUDIT_FULL_QUERY_INFO AuditFullInfo = NULL;
    ULONG AttributeSize;
    NTSTATUS Status;

    TRACE("(%p %p)\n", PolicyObject, Info);

    AttributeSize = sizeof(POLICY_AUDIT_FULL_QUERY_INFO);
    AuditFullInfo = MIDL_user_allocate(AttributeSize);
    if (AuditFullInfo == NULL)
        return STATUS_INSUFFICIENT_RESOURCES;

    Status = LsapGetObjectAttribute(PolicyObject,
                                    L"PolAdtFl",
                                    AuditFullInfo,
                                    &AttributeSize);
    if (!NT_SUCCESS(Status))
        goto done;

    AuditFullInfo->ShutDownOnFull = Info->ShutDownOnFull;

    Status = LsapSetObjectAttribute(PolicyObject,
                                    L"PolAdtFl",
                                    AuditFullInfo,
                                    AttributeSize);

done:
    if (AuditFullInfo != NULL)
        MIDL_user_free(AuditFullInfo);

    return Status;
}
开发者ID:GYGit,项目名称:reactos,代码行数:35,代码来源:policy.c


示例18: LsarQueryDefaultQuota

NTSTATUS
LsarQueryDefaultQuota(PLSA_DB_OBJECT PolicyObject,
                      PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
    PPOLICY_DEFAULT_QUOTA_INFO QuotaInfo = NULL;
    ULONG AttributeSize;
    NTSTATUS Status;

    *PolicyInformation = NULL;

    AttributeSize = sizeof(POLICY_DEFAULT_QUOTA_INFO);
    QuotaInfo = MIDL_user_allocate(AttributeSize);
    if (QuotaInfo == NULL)
        return STATUS_INSUFFICIENT_RESOURCES;

    Status = LsapGetObjectAttribute(PolicyObject,
                                    L"DefQuota",
                                    QuotaInfo,
                                    &AttributeSize);
    if (!NT_SUCCESS(Status))
    {
        MIDL_user_free(QuotaInfo);
    }
    else
    {
        *PolicyInformation = (PLSAPR_POLICY_INFORMATION)QuotaInfo;
    }

    return Status;
}
开发者ID:GYGit,项目名称:reactos,代码行数:30,代码来源:policy.c


示例19: kull_m_rpc_drsr_getDCBind

BOOL kull_m_rpc_drsr_getDCBind(RPC_BINDING_HANDLE *hBinding, GUID *NtdsDsaObjectGuid, DRS_HANDLE *hDrs)
{
	BOOL status = FALSE;
	ULONG drsStatus;
	DRS_EXTENSIONS_INT DrsExtensionsInt;// = {0};
	DRS_EXTENSIONS *pDrsExtensionsOutput = NULL;

	DrsExtensionsInt.cb = sizeof(DRS_EXTENSIONS_INT) - sizeof(DWORD);
	DrsExtensionsInt.dwFlags = DRS_EXT_GETCHGREPLY_V6 | DRS_EXT_STRONG_ENCRYPTION;

	RpcTryExcept
	{
		drsStatus = IDL_DRSBind(*hBinding, NtdsDsaObjectGuid, (DRS_EXTENSIONS *) &DrsExtensionsInt, &pDrsExtensionsOutput, hDrs); // to free ?
		if(drsStatus == 0)
		{
			if(pDrsExtensionsOutput)
			{
				if(((DRS_EXTENSIONS_INT *) pDrsExtensionsOutput)->dwFlags & (DRS_EXT_GETCHGREQ_V8 | DRS_EXT_STRONG_ENCRYPTION))
					status = TRUE;
				else PRINT_ERROR(L"Incorrect DRS Extensions Output (%08x)\n", ((DRS_EXTENSIONS_INT *) pDrsExtensionsOutput)->dwFlags);
				MIDL_user_free(pDrsExtensionsOutput);
			}
			else PRINT_ERROR(L"No DRS Extensions Output\n");
		
			if(!status)
				IDL_DRSUnbind(hDrs);
		}
		else PRINT_ERROR(L"IDL_DRSBind: %u\n", drsStatus);
	}
	RpcExcept(DRS_EXCEPTION)
		PRINT_ERROR(L"RPC Exception 0x%08x (%u)\n", RpcExceptionCode(), RpcExceptionCode());
	RpcEndExcept
		return status;
}
开发者ID:0x4e38,项目名称:mimikatz,代码行数:34,代码来源:kull_m_rpc_drsr.c


示例20: kull_m_rpc_bkrp_generic

BOOL kull_m_rpc_bkrp_generic(LPCWSTR NetworkAddr, const GUID * pGuid, PVOID DataIn, DWORD dwDataIn, PVOID *pDataOut, DWORD *pdwDataOut)
{
	BOOL status = FALSE;
	RPC_BINDING_HANDLE hBinding;
	NET_API_STATUS netStatus;
	PBYTE out = NULL;
	*pDataOut = NULL;
	*pdwDataOut = 0;
	if(kull_m_rpc_bkrp_createBinding(NetworkAddr, &hBinding))
	{
		RpcTryExcept
		{
			netStatus = BackuprKey(hBinding, (GUID *) pGuid, (PBYTE) DataIn, dwDataIn, &out, pdwDataOut, 0);
			if(status = (netStatus == 0))
			{
				if(*pDataOut = LocalAlloc(LPTR, *pdwDataOut))
					RtlCopyMemory(*pDataOut, out, *pdwDataOut);
				MIDL_user_free(out);
			}
			else PRINT_ERROR(L"BackuprKey: 0x%08x (%u)\n", netStatus, netStatus);
		}
		RpcExcept(RPC_EXCEPTION)
			PRINT_ERROR(L"RPC Exception: 0x%08x (%u)\n", RpcExceptionCode(), RpcExceptionCode());
		RpcEndExcept
			kull_m_rpc_deleteBinding(&hBinding);
	}
开发者ID:BlueSkeye,项目名称:mimikatz,代码行数:26,代码来源:kull_m_rpc_bkrp.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MII_PHY_DESC函数代码示例发布时间:2022-05-30
下一篇:
C++ MID函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap