для каждого сет.адаптера вызывается FilterAttach/FilterDetach два раза. получается два контекста, ... всего по два короче говоря. где искать ошибку в коде или *.inf файле? ...или в голове? )
...очень прошу посмотреть... ведь не должно же такого быть!? ;----------------------------------------------------------------------- Attach: ;arg_0:FilterHandle, arg_1riverContext, arg_2:AttachParameters ;----------------------------------------------------------------------- push ebx esi edi invoke ExAllocatePoolWithTag, NonPagedPool, szFilterContext, 0 test eax,eax mov esi,eax jz a0 mov edi,esi xor eax,eax mov ecx,szFilterContext/4 rep stosd mov ecx,[arg_0+3*4] mov edx,[arg_2+3*4] mov [esi+FILTER_CONTEXT.FilterHandle],ecx mov [esi+FILTER_CONTEXT.AttachParams],edx ;я знаю ,что ошибка! lea edi,[FilterContextList] @@: cmp [edi+FILTER_CONTEXT.Next],eax cmovne edi,[edi+FILTER_CONTEXT.Next] jnz @b sub esp,szNetBufferListPoolParameters mov [esp+NET_BUFFER_LIST_POOL_PARAMETERS.Type],80h ;NDIS_OBJECT_TYPE_DEFAULT mov [esp+NET_BUFFER_LIST_POOL_PARAMETERS.Revision],1 ;NET_BUFFER_LIST_POOL_PARAMETERS_REVISION_1 mov [esp+NET_BUFFER_LIST_POOL_PARAMETERS.Size],szNetBufferListPoolParameters and [esp+NET_BUFFER_LIST_POOL_PARAMETERS.ProtocolId],al ;eax=0 mov [esp+NET_BUFFER_LIST_POOL_PARAMETERS.fAllocateNetBuffer],1 mov [esp+NET_BUFFER_LIST_POOL_PARAMETERS.ContextSize],10h mov [esp+NET_BUFFER_LIST_POOL_PARAMETERS.PoolTag], eax and [esp+NET_BUFFER_LIST_POOL_PARAMETERS.DataSize],eax invoke NdisAllocateNetBufferListPool, ecx, esp test eax,eax mov [esi+FILTER_CONTEXT.NblPool],eax lea esp,[esp+szNetBufferListPoolParameters] jz a1 sub esp,szNetBufferPoolParameters mov ecx,[arg_0+3*4] mov [esp+NET_BUFFER_POOL_PARAMETERS.Type],80h ;NDIS_OBJECT_TYPE_DEFAULT mov [esp+NET_BUFFER_POOL_PARAMETERS.Revision],1 ;NET_BUFFER_POOL_PARAMETERS_REVISION_1 mov [esp+NET_BUFFER_POOL_PARAMETERS.Size],szNetBufferPoolParameters mov [esp+NET_BUFFER_POOL_PARAMETERS.PoolTag],0 and [esp+NET_BUFFER_POOL_PARAMETERS.DataSize],0 invoke NdisAllocateNetBufferPool, ecx, esp test eax,eax mov [esi+FILTER_CONTEXT.NbPool],eax lea esp,[esp+szNetBufferPoolParameters] jz a2 invoke ExAllocatePoolWithTag, NonPagedPool, szWorkItem*20h, 0 test eax,eax mov [esi+FILTER_CONTEXT.WorkItemFlags],0ffffffffh mov [esi+FILTER_CONTEXT.WorkItemList],eax jz a3 lea eax,[esi+FILTER_CONTEXT.Event] invoke NdisInitializeEvent, eax sub esp,szNdisFilterAttributes mov [esp+NDIS_FILTER_ATTRIBUTES.Type],8Dh ;NDIS_OBJECT_TYPE_FILTER_ATTRIBUTES mov [esp+NDIS_FILTER_ATTRIBUTES.Revision],1 ;NDIS_FILTER_ATTRIBUTES_REVISION_1 mov [esp+NDIS_FILTER_ATTRIBUTES.Size],szNdisFilterAttributes and [esp+NDIS_FILTER_ATTRIBUTES.Flags],0 invoke NdisFSetAttributes, [esi+FILTER_CONTEXT.FilterHandle], esi, esp test eax,eax lea esp,[esp+szNdisFilterAttributes] jz @f invoke ExFreePoolWithTag, [esi+FILTER_CONTEXT.WorkItemList], 0 a3: invoke NdisFreeNetBufferPool, [esi+FILTER_CONTEXT.NbPool] a2: invoke NdisFreeNetBufferListPool, [esi+FILTER_CONTEXT.NblPool] a1: invoke ExFreePoolWithTag, esi, 0 a0: pop edi esi ebx ret 0Ch @@: mov [edi],esi pop edi esi ebx ret 0Ch