Use the debugger.
Set a breakpoint at the line:
myMib.loadDirectoryMib(Environment.GetFolderPath(Environment.SpecialFolder.System ));
And step into your method.
Follow the code through step by step, and see what it is doing.
The most likely thing is that it's trying to recursively load files, and that the recursion isn't being terminated - which blow out the stack, and you get the exception.
We can't do that for you: we don't have your
Mib
class or your Windows folder: heck we don't even know what version of Windows you are running!
So give it a try, and see where your
loadDirectoryMib
method starts to recurse.