aeoth1


I'm trying to write a basic WLM Addin, which redirects (well, duplicates) incoming messages to another 'display' (not a physical display, so to speak).
To access this, I have a precompiled library (for arguments sake, let it be foo.dll), which I've included in my addin project.
Having "using foo;" in the code works fine (as in, WLM will load the addin), but when I change my addins code to include call any of the code inside of foo.dll (ie, foo.bar()), WLM is unable to load the addin.

Is this normal behaviour/is there a work around





Re: WLM Addin, using other DLL's

Jeroen Bransen - J-Thread


This is probably a security issue. Have you tried to add your add-in to the GAC (Global Assembly Cache) If not, search this forums for a how-to, if you have, are you sure you are calling the right functions
It should be possible to call external dll's from an Add-In, so there shouldn't be a problem there.





Re: WLM Addin, using other DLL's

David_ES

Create a strong name for your project and register in GAC using vs command promt

gacutil /i name.dll





Re: WLM Addin, using other DLL's

aeoth1

Ah, okay, I'll try those things - thank you both.
The next problem is creating a strong name for the third party DLL I'm referencing! Oh well, I'll soldier on and get there Smile

Again, thanks for the pointers




Re: WLM Addin, using other DLL's

aeoth1

Okay, other DLL in the gac, all good Nope.
I still get the same error when trying to execute any of the functions from the other DLL (I've set it to try and use some in the 'options' panel, so it doesn't instantly fail the plugin)

I attached VS2008's debugger to MSNMGR.exe, and on the error, I get "The type initializer for '<Module>' threw an exception."

The inner exception is
{"Could not load file or assembly 'msvcm90, Version=9.0.20706.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)":"msvcm90, Version=9.0.20706.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}

So it certainly does look like its a security error, but I'm not sure what to do about it (I've tried running WLM as admin).
The DLL works in other applications, so the code isn't 'faulty' (all i'm doing is creating an object from the DLL, not running any of its other operations).

Can a DLL get into the GAC without correct signing Any other clues




Re: WLM Addin, using other DLL's

aeoth1

Additional info, works fine with a managed library, but since the one I'm trying to use is a managed wrapper for an unmanaged library, its having problems - at least thats what I'm guessing.




Re: WLM Addin, using other DLL's

Hannes

Hi there I'm having the same issue. I'm writing an add-in that sends incoming messages from WLM to my Logitech G15 keyboard LCD. My .Net 2.0 C# dll references a .Net 1.1 c++ dll that wraps some unmanaged c++ dll provided by logitech in their sdk. When I run it in debug mode and try to instantiate an object of the wrapper class, I just get an error that the namespace or type isn't valid in that scope. Thinking security issue, as it works fine when not inWLM add-in. So how do I fix this