Managed code calling into a native DLL requires unmanaged code permission. When an ASP.NET application runs in partial trust, all code in the /bin directory runs in a more restricted trust level which does not include unmanaged code permission. As a result when the managed code attempts to load the Win32 .dll, the load fails because the managed code doesn't have rights to interact with native code.
To fix this the managed code would need to be installed in the GAC, since all assemblies in the GAC are trusted, and hence are allowed to call native code even in partial trust environments. However installing the managed code in the GAC will also require that the managed assembly be APTCA attributed so that partial-trust user code in the ASP.NET application can call into the managed library.