views:

228

answers:

1

am doing a dll in vc++ for blocking ports(like tcp sniffer).while blocking udp port in local machine its works fine.while am taking remote computer from my my system its raises on exception

      "system.NullReferenceException'occurred in system.windows.forms.dll"

i incorporated the dll in c# application.please give your suggestion

A: 

With very limited information, The most probable cause that I can think of is:

Your C# application is trying to create an instance of the C++ dll's class and most probably that fails resulting in a NULL pointer. The later call of a method through that instance is resulting in this exception.

To resolve this, you should check first whether instance was created successfully or not.

Aamir