Cannot access dll's after upgrading to 6.4
Author: Ben_Zurich
Creation Date: 10/26/2012 3:00 AM
profile picture

Ben_Zurich

#1
I'm using WL6 together with Microsoft Visual C# 2010 Express for debugging.

I have upgraded to 6.4 this morning.

When I open Visual C# and run WL6 from there, I'm getting many error messages like

QUOTE:
The type or namespace name 'WealthScript' could not be found ...


However, all necessary using directives are there and all dll's are at the right place and correctly referenced.

When I remove a reference like 'TASCIndicators.dll' and adding it again, I'm getting a message saying that the dll requires a later version of the .NET of that specified in the project, which cannot be true as it's still the same library.

When I first installed Visual C# I remember that version 2.0 of the .NET is required when combining it with WL6. Do I have to change it to a later version?

By the way, WL6.4, when started on its own, works as expected.

I really don't know what to do now.
profile picture

Eugene

#2
Wealth-Lab 6.4 requires that you select .NET 4.0 in solution's properties and recompile the project.
profile picture

Eugene

#3
P.S. Added to and updated the FAQ, since it's going to be asked frequently: Can not compile my library after installing Wealth-Lab 6.4. What's wrong?
profile picture

Ben_Zurich

#4
This worked. Thank you for your fast answer!

However I'm getting a window with another message after starting WL6 from Visual C#:

QUOTE:
PInvokeStackImbalance was detected:
A call to PInvoke function 'WealthLab.IndexDefinitions.MS123!????????::????????' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.


This appears 4 times (with different functions) and when I am clicking them away with 'continue' then WL6 eventually opens and displays the strategy, but after several seconds the same window appears again.

Was there a change in the calling convention with WL6.4?.

profile picture

Eugene

#5
This could be a protector (obfuscator) issue with the MS123 IndexDefinitions library. Issues like this sometimes may be machine-specific. I have never seen this.
profile picture

Ben_Zurich

#6
The 3 other messages that come up contain the same issue for

'WealthLab.ChartStyles.Community'
'WealthLab.DataProviders.CBOE'
'WealthLab.DataProviders.COTFree'

This might help you identify the problem.
profile picture

Eugene

#7
It's pretty clear that the already identified problem may be raised by an `outdated obfuscator build used to protect all these assemblies. Again, it's a machine specific issue that I never noticed although I run multiple copies of Visual Studio alongside and never noticed any problem during my daily debugging (except once in 2011.09 builds when obfuscator settings were preventing from running under debuggers - for more info please refer to change logs).

Newer obfuscator builds may be free from this effect (well, maybe not). Unfortunately, there is no plan to re-release these libraries as there were no changes to their code base yet. With ChartStyles Community, a workaround is to re-compile from source code. With the others, I suggest moving the assemblies out when you debug or just clicking through the error dialogs.
profile picture

Ben_Zurich

#8
This is a bit too complicated and beyond my system understanding, and therefore I needed to go back to 6.3.

But now

CODE:
Please log in to see this code.


produces an error (Namespace Community could not be found), although I have re-referenced it (Wealthlab.Community.indicators.dll).
profile picture

Eugene

#9
The upgraded DLLs will not work in 6.3, they require 6.4.

The thing is, .NET 2.0/3.5 suppresses those P/Invoke error messages while they're enabled by default in .NET 4.0. So to attempt fix the error in 6.4, try the following:

1. Close WL.

2. Depending on your WL bitness, find appropriate WealthLabDev.exe.config file:

* (typically) c:\Program Files\MS123\Wealth-Lab Developer 6\WealthLabDev.exe.config
* (32-bit WL running on a 64-bit OS) c:\Program Files (x86)\MS123\Wealth-Lab Developer 6\WealthLabDev.exe.config

3. Start Notepad with admin privileges by explicitly selecting "Run as admin" when right-clicking its shortcut.

4. Inside the configuration root element nearly at the end of the file, right after the startup tag, add this block:

CODE:
Please log in to see this code.


In other words, the very end of your file must look like this:
CODE:
Please log in to see this code.


5. Save the file and start WL.

Double check everything. Let me know how it goes.
profile picture

Ben_Zurich

#10
No, this did not work. But this does work:

In Visual C# 2010 Express, open your project
Press Ctrl Alt E
Under "Managed Debugging Assistants" uncheck PInvokeStackImbalance
profile picture

Eugene

#11
Cool. Thanks for the information.
profile picture

mikesblack

#12
Hi Eugene,
I am unable to access a few dll files that are in Program Files> Fidelity Investments > Wealth-Lab Pro 6. Those included are SSLib.dll as well as a couple of dll files created by Yuri. I followed the example in this thread, but am not entirely sure what to do.
Thanks,
Mike
profile picture

mikesblack

#13
I Just was able to compile one of my systems using the SSLib dll successfully. The other two dlls won't however.
profile picture

Eugene

#14
Mike, I'm afraid you just dropped them into the main folder, not clearing the "Downloaded from the internet" flag in their File Properties. They will not be recognized by WLP as a matter of Windows security policy.

If that doesn't help, what makes you think that the example in this thread from 2012 that I provided after a version upgrade should apply to your case? Now to the meaning of the phrase "unable to access". It sounds cryptic enough for me to understand it. For what purpose are you trying to access the two unknown DLL files created by the 3rd party? And how exactly?

This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).