Re: CLR Stored Procedure "Failed to get permission to execute"



Hello Eric,

The consensus is (I think), that you can use pInvoke to call an unmanaged DLL from a managed stored procedure. However, it looks like calling a MIXED (ie managed and unmanaged) DLL is not going to work. You can look at the thread I started on the sqlserver.programming group for more information.

It seems that mixed and/or managed DLLs need to be added to SQL with CREATE ASSEMBLY, and this fails on a mixed dll, even if set it as UNSAFE. I'd like to establish if that is expected to work, but I suspect it is failing for good reason.

/john



"Eric" wrote in message news:200762618736eric_hackett@xxxxxxxxxxxxxxxxxxx
Did you find any satisfaction for this? I have a nearly identical problem. Using a third party dll, wrapping it with my own dll, and then writing CLR stored proc to use wrapped function. Other functions in the stored proc dll work. Only the ones that need external resources are choking.

Please reply here if you get this working.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

.



Relevant Pages

  • Re: using unmanaged dlls from managed dll wrappers.
    ... manuall copy the unmanaged DLL in the same directory as your managed ... In the C# project I add a reference to the managed ... ManagedConverterWrapper is the managed C++ wrapper I wrote. ...
    (microsoft.public.dotnet.framework)
  • Re: using unmanaged dlls from managed dll wrappers.
    ... "Add the unmanaged DLL project in your solution and reference it" ... File or assembly name ManagedConverterWrapper, ...
    (microsoft.public.dotnet.framework)
  • Re: using unmanaged dlls from managed dll wrappers.
    ... I'm afraid I still cannot get it to work by copying the dll. ... In the C# project I add a reference to the managed ... I have copied the unmanaged dll to ... File or assembly name ManagedConverterWrapper, ...
    (microsoft.public.dotnet.framework)
  • Re: I have a managed DLL code written in C#
    ... unmanaged DLL code into a managed code. ... DLL code into my own test application I get an error message saying the ... There is no way this code can compile, as dllName doesn't exist in your ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: using unmanaged dlls from managed dll wrappers.
    ... This is just a DLL mumbob-jumbo!! ... I was surprised when you said you a reference to the unmanaged DLL to your ... But in fact you probably add a PROJECT reference. ... File or assembly name ManagedConverterWrapper, ...
    (microsoft.public.dotnet.framework)