views:

641

answers:

2

So I'm using an SDK for a hardware random number generator which provides a dll called PsyREG.dll for interacting with it, as well as some c# source for using the methods from the dll.

It has worked in the past, but somehow it has stopped working. My hands are a bit tied as I don't actually have access to the device in question at the moment, so I can't try a lot of things...

However, here's the weird thing. The dll is there, the same place it's always been. Ahd in fact File.Exists("PsyREG.dll") returns true, and I've double checked and that's the exact same way the provided c# source imports it, e.g. [DllImport("PsyREG.dll")].

Any ideas?

+8  A: 

It is probably this dll has some dependencies that they arent registred or arent in the same folder of your application.

Cleiton
Thanks, that was it. There were some other things that were needed, but for a few reasons I didn't think to check that (including the fact that it said it couldn't load PsyREG.dll, not a different file)
Asmor
Times like this are when I break out Reflector. It can show you the dependencies. In particular, it can show you which ones aren't found.
Brad Bruce
Really? Does Reflector find unmanaged dependencies? Where is that option?
erikkallen
A: 

Perhaps you should check to see if you're expecting a specific product version of the dll, and make sure that the product versions still match up correctly.

Joseph