Skip to content

void __stdcall SamIFree_SAMPR_ENUMERATION_BUFFER

( PSAM_ENUMERATION_BUFFER EnumerationBuf ) { if ( NULL != EnumerationBuf ) { _fgs__SAMPR_ENUMERATION_BUFFER( EnumerationBuf ); MIDL_user_free( EnumerationBuf ); } return; } / end of SamIFree_SAMPR_ENUMERATION_BUFFER /

/ * 由主调函数确保形参非NULL / void __stdcall _fgs__SAMPR_ENUMERATION_BUFFER ( PSAM_ENUMERATION_BUFFER EnumerationBuf ) { DWORD count; PSAM_OEM_GROUP_INFORMATION OemGroupInfo;

if ( NULL != EnumerationBuf->OemGroupInfo )
{
    count           = 0;
    OemGroupInfo    = EnumerationBuf->OemGroupInfo;
    while ( count < EnumerationBuf->OemGroupInfoCount )
    {
        SampFreeOemGroupInfo( OemGroupInfo );
        count++;
        /*
         * 动态分配空间的结构数组
         */
        OemGroupInfo++;
    }  /* end of while */
    MIDL_user_free( EnumerationBuf->OemGroupInfo );
}
return;

} / end of _fgs__SAMPR_ENUMERATION_BUFFER /

void __stdcall SampFreeOemGroupInfo ( PSAM_OEM_GROUP_INFORMATION OemGroupInfo ) { _fgs__SAMPR_GET_GROUPS_BUFFER( &OemGroupInfo->GetGroupsBuf ); return; } / end of SampFreeOemGroupInfo /

void __stdcall _fgs__SAMPR_GET_GROUPS_BUFFER ( PSAM_GET_GROUPS_BUFFER GetGroupsBuf ) { if ( NULL != GetGroupsBuf->buffer ) { MIDL_user_free( GetGroupsBuf->buffer ); } return; } / end of _fgs__SAMPR_GET_GROUPS_BUFFER /