Unmanaged DLL referenced by a Managed DLL error
-
Hi, I've got a real novice question that I can't find the answer to (just started with ASP.NET yesterday). I want to provide a web interface for functionality provided by a large set of unmanaged C++ DLLs. I wrapped up the critical functionality in a managed DLL, then created the managed objects as session objects on my aspx page. Just creating a 'shell' managed object that has stubbed out calls, and does no static linking to my unmanaged DLLs, works fine. When I statically link in my unmanaged DLLs, and fill out the stubbed functions, I get an error: "Parser Error Message: File or assembly name ManagedNLP, or one of its dependencies, was not found." This seems pretty straightforward - stick the required unmanaged DLLs in the right place. But where the hell is that??? Putting them in the web page root or bin directories does nothing... Also, I don't really want to have multiple copies of unmanaged DLLs floating around, so is there any way I can point IIS to the central repository where I currently keep them? Many thanks in advance for any help. Andy.
-
Hi, I've got a real novice question that I can't find the answer to (just started with ASP.NET yesterday). I want to provide a web interface for functionality provided by a large set of unmanaged C++ DLLs. I wrapped up the critical functionality in a managed DLL, then created the managed objects as session objects on my aspx page. Just creating a 'shell' managed object that has stubbed out calls, and does no static linking to my unmanaged DLLs, works fine. When I statically link in my unmanaged DLLs, and fill out the stubbed functions, I get an error: "Parser Error Message: File or assembly name ManagedNLP, or one of its dependencies, was not found." This seems pretty straightforward - stick the required unmanaged DLLs in the right place. But where the hell is that??? Putting them in the web page root or bin directories does nothing... Also, I don't really want to have multiple copies of unmanaged DLLs floating around, so is there any way I can point IIS to the central repository where I currently keep them? Many thanks in advance for any help. Andy.
Well, I still don't know what the problem is. Maybe I could put the unmanaged DLLs in the global assembly repository (apparently a legal operation, not sure if it would work though). Anyhow, I followed the advice of one of my colleaues, who suggested I scrap my managed C++ wrapper class and use [DllImport]-ed functions instead (so I could specify the exact location of the DLL in the attribute parameter). This works just fine. Just to let anyone else with this problem know... Andy.