User Profile
Collapse
-
It has nothing to do with WebCalcInfo: I even tried without passing the struct, but same behaviour... -
ASP.NET Web API calling unmanaged Dll hanging
Hi all,
I'm trying to dynamically call unmanaged C++ Dll from within my Web API. For this reason, I created 2 Controller Action:
(1) One is starting the dll: It uses the LoadLibrary to load the dll, and call an init-method in the dll, initializing some parameters for calculation.
(2) Here's is were I need the calculation result from my Dll (using the handle from LoadLibrary in Action 1, I use GetProcAdress... -
Thanks for your suggestion. I found the problem: in my c++ DLL I was calling MessageBoxes, which seems to represent a problem on production.
MessageBox from user32.dll and the Beep from kernel32.dll might not be loaded beacuse of permission set to the IIS running on session 0.Leave a comment:
-
Thanks for your reply!
I don't think it's because of permissions regarding DLL_PATH.
I tried if I'm able to access any other function in "kernel32.d ll" or even "user32.dll ".
...Code:[DllImport("kernel32.dll")] public static extern bool Beep(int frequency, int duration); [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int MessageBox(IntPtrLeave a comment:
-
ASP.NET Web Api DllImport (LoadLibrary) fails on IIS
Hi,
I'm developping a Web API that needs to call an unmanaged DLL written in C++.
In debugging (IIS Express), I'm able to call the function within the DLL and LoadLibrary is loaded correctly with a Handle.
Problem comes when I deploy my Web Api to my local machine (IIS 8): It recognizes the path of the DLL, permissions are also set properly, but LoadLibrary fails bacause I get a IntPtr.Zero.
I used Marshal.GetLast Win32Error()...Last edited by Rabbit; Nov 26 '15, 06:43 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Leave a comment: