dcsimg
Results 1 to 2 of 2

Thread: WinpkFilter VB6 Samples

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2012
    Posts
    760

    WinpkFilter VB6 Samples

    The WinpkFilter development kit no longer includes VB6 samples. Version 3.2.3 has added support for IPv6, resulting in a number of changes to the data formats. I have taken the liberty to update the older samples to support the newer formats, and with permission, I am posting them here.

    Unfortunately I still have not got the low level filter table to load, but I will post the results upon completion.

    J.A. Coutts
    Attached Files Attached Files

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2012
    Posts
    760

    Re: WinpkFilter VB6 Samples

    The problem with the low level filter turned out to be 2 fold. The first problem was that when I upgraded from NDISRD V3.0.7 to V3.2.3, the library file that acts as a buffer between the application and the driver (NDISapi.dll) did not get upgraded. Part of the job of that library file is to check the size of the filter table before passing it on to the driver. The filter table is composed of a variety of individual static filters, each one 181 bytes in length. The older helper file was based on a static filter size of 116 bytes. Library files can be located in the application directory, or as I have done in the System32 (SysWow64 for 64 bit systems) directory. This why it did not get upgraded.

    The second problem is also related to filter size. The original Static Filter used 3 byte padding when a single byte was allocated to a variable. That meant that each filter size was always divisible by 4. In this newer version, the Static Filter (181 bytes) is not divisible by 4. Visual Basic appears to assign memory to variables based on a word (4 byte) boundary. Even though the individual filters were the correct length, there were 3 extra bytes between the first and second filters. This anomaly has been corrected by copying the filters to a single byte array, and then copying it back to the table. It's a kludge, but it works.

    The filter example is basically the PassThru example, but with only the DNS packets being processed. Unlike the original samples, this sample combines the 3 ".bas" modules into a single module, and adds the filter definitions.

    J.A. Coutts
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width