What does "Invalid parameter error. 0x80030057 (STG_E_INVALIDPARAMETER)" usually mean? - com

I came across the COM error:
Invalid parameter error. HRESULT 0x80030057 (STG_E_INVALIDPARAMETER)
when dealing with an Excel interop component called Aspose and couldn't figure out why this error when opening an Excel file. Nor could I find anything here on Stack Overflow so it MUST be asked:
What is the most common cause of this error (in any printed representation) from some black-box COM component?
I will also post what caused my error when SO allows me to!

In my case the cause was that I had targeted my C#.NET app that was interacting with a wrapped COM component (Aspose Excel 2.9.2) to run on "any CPU" platform. This is no good as the DLL was compiled explicitly for 32-bit platforms only. So my C#.NET app had to be platform targeted explicitly to "x86".
I'm not sure if this would be the most common though, but it's a pretty well obscured problem for that error message.

Aspose file format products are not COM components. They're fully managed .NET assemblies. Could you please share which component caused this problem. Also, share the version number of the component you're using. I would also like to share that all the Aspose components work on 32-bit and 64-bit systems seamlessly. Also, they do not require MS Office to be installed on your development or deployment machines. Moreover, they do not use COM interop.
Please share some more details regarding your issue. You can also post your query along with all the details in our support forums, so that our team would be able to investigate your issue in detail.
Disclosure: I work as a developer evangelist at Aspose.

Related

Compile Solution without DLL's Visual Studio Managed C++

I'm very new at C++ Managed and Visual Studio keep this in mind. Ive programmed an application that makes it easy for users to bind keys in counterstrike, found here:
https://sites.google.com/site/intrepidprojects/
The first error I ran into with my friends testing the program was "msvcr120D.dll is missing". Which lead me to finding that I have to set the runtime library to Multi-threaded (/MTd), if I don't want the users to download the Visual Studio c++ dll's . When I choose this option I was given the error that /MTd and /clr are incompatible. So I turned the common runtime support to no support. Now all of the namespaces are invalid such as 'System', 'Collections', etc.
My question is how do I produce a stand alone application without needing the dll's? Every solution I have come across leads me to more errors I do not understand.
Again, the language I am using is c++/cli. Sorry If I am not using the proper lingo to communicate my errors I am teaching this on my own.I am aware that this question has been asked many times before, but the answers are not leading me to solutions.
My question is how do I produce a stand alone application without needing the dll's? basically: you don't. Just have them install the CRT runtime - the'll need it anyway sooner or later as you're not the only one writing programs targetting that toolset (btw, you tagged the question VS2012 but those dlls are normally for VS2013?). As an alternative you could look for all the needed dlls (msvcr120.dll, msvcp120.dll etc, use Dependency Walker) on your filesystem and put them in the same directory as your executable, that works as well because of how the path is searched for dlls. But it's a bit messy.
Furtermore missing msvcr120D means you are building your project with the Debug configuration (that is what the D stands for), but you should build with Release configuration when shipping to users as the runtime installer only installs release versions.
Select MT without DLL in VC++/C Code generation section in solution properties. Worked for me.

Could I create a MFC DLL for Metro apps to use?

I've post this question on MSDN (http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/9da1b0e4-6a03-41b2-b68e-6fefb4729c52). If it is considered as duplicated question, please remind me to delete it. Thanks.
I am using VS2012 pro on Win8 Pro. I encountered an issue and needs your help:
Let me simplify the scenario: Metro App (JavaScript) calls DLL1(a Windows Runtime Component), and DLL1 calls DLL2(a MFC DLL).
After I created a MFC DLL, then from "Configuration Properties", I changed the "use of MFC" as "Use Standard Windows Libraries", and changed "Windows Store App Support" as "Yes". But My Metro App always said that "0x8007007e - JavaScript runtime error: The specified module could not be found." After debugging, I found that the error is caused by DLL2. But I don't know why it is caused.
Does anybody know anything about this? Or would you please give me some hint?
Thank you all.
I think it is necessary to add my solution: I must manually add the external dependent dll (not the system dll but built by yourself or others) into my js project by "added as link". Thus the issue could be resolved. If any encounter the same issue, please write to me and let's discuss it. Thanks.

MonoDevelop - Bug with SmartAssembly

I have my dlls (.NET4) build with msbuild and obfuscated with SmartAssembly 5.5.
After that i set them with reference for simple console application in the MonoDevelop (latest) on Mac (10.8).
Built ok, but when i ran that simple app, i have a message:
Unknown heap type: SmartAssembly
I asked SA support but no luck yet (the saproj have item blabla(supports Mono) checked.
I dont see how to attach a screenshot, but, when i run my application i see in the console that message twice. It appears before program stops on the breakpoint on the first line of code.
So maybe someone knows what to change in SmartAssembly or in MonoDevelop to remove this problem ? Thanks
Many .NET obfuscators change the assemblies such that they are not technically correct assemblies (they fall outside the .NET assembly specs) but such that they still run on the Microsoft .NET runtime by exploiting bugs specific to Microsoft's implementation. I suspect they do this to make it harder for assembly reader tools/libraries to load the assemblies. Unfortunately, this also prevents Mono runtime from loading the assemblies. In general Mono has a policy of not "fixing" support for this kind of invalid obfuscated code, so you'll need to ask SmartAssembly support for help.
If you're certain you're compiling with SmartAssembly's "Strictly valid" option and it's not working, perhaps you could perhaps try their "Basic" option.

Autodesk Inventor Add-In does not load

I have Autodesk Inventor 2012 and its SDK, including add-in creation wizards, installed. I have created an add-in project (in VB.NET), and used the code from SimpleAddIn sample provided. .addin file points to the location of dll output of the compilation.
However, i have run into a following problem. When Inventor loads, not a single breakpoint in the add-in Activate function is triggered. Moreover, when i call the list of add-ins, mine is shown in the list as not loaded, and however i flag it to be, it does not.
What could be the reason for this behaviour? How can that be fixed?
Well, I assume that you're using RegistryFreeAddins being deployed via Manifests...
From the fact that your AddIn is listed in the AddIn Manager, I conclude that the registration works, but the loading at runtime fails. This can have those main reasons:
Missing Dependencies (in case you use third party assembiles)
BadImageFormatException (your AddIn compiled in x86 and you have X64
Inventor installed, which you always have in case you've got a 64-bit
OS)
Have a look at your debug output in VisualStudio. Do you see any Exception Messages, that would relate to your AddIn? If not, you could try to activate the "Managed Debugging Assistants" in VS (especially for BadImageFormat- and FileNotFoundException(s)). Just google the above phrase to see how it's done.
Hope I could help :)
Are you targeting .Net 4? Inventor 2012 supports only .net 3.5 it seems. I ran into the same problem and changing to 3.5 made my plugin load correctly.
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Registry-free-addin-won-t-load/td-p/3488178
if for a reason or another, the library load crash in the Activate procedure, you will not be able to debug the solution.
So, clean the Activate sub and keep only necessary calls and try again.
If it's still not working, just PM me the Activate procedure and I'll help you.

Devex Ribbon control prevents applicetion start - entry point was not found

It does work on some machine's but wold not start on other computers.
from the code line's I see the problem is related to devex components.
this is the message I get:
We have reviewed your old posts and here is what we have found:
It seems, you were asked about Delphi interop, but Delphi creates x86 applications. Also, it seems, that your application fails on x64 systems. Since, VS creates ANY CPU applications, this most likely the cause of the problem. Try to build the application in VS for x86 platform, this should fix the problem.
I fixed the problem by using gacutil -i to add the dll to the assembly cache.