Page 1 of 1

Parameter Incorrect error compiling OpenDental7.5

Posted: Sun Dec 05, 2010 7:09 am
by Dockheas23
Hello,

I'm porting a custom plugin from 7.1 to 7.5, and have been trying to compile 7.5 from svn to provide the correct references for the plugin. I originally got the ResGen error, but fixed that using the Corflags solution. Ever since, most of the containing projects compile ok, but the OpenDental one fails with two errors of the following kind:

Error 1 Could not load file or assembly 'AxInterop.AcroPDFLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Line 240, position 5. Y:\OpenDental\Main Modules\ContrAccount.resx 240 5 OpenDental

In both cases the line numbers correspond to a closing </data> tag for a blob in the ContrAccount.resx and ContrTreat.resx files.

Environment:
- Windows 7 Ultimate 64Bit
- Visual Studio 2010
- I didn't mess with any of the configuration files, meaning all projects are set to build as x86, and mostly against .NET 3.5 (though the WebForms and WebHostSynch projects are for .NET 4)

What I've tried so far:
- Reinstall .NET Framework, as recommended on a couple of blogs.
- Reinstall Visual Studio
- Change the reference in question: This was interesting because the error remained exactly, just with 'CDT' instead of 'AxInterop.AcroPDFLib'. This leads me to believe that it's not the reference itself that is the problem.

Any help would be greatly appreciated. Thank you.

George Boyle

Re: Parameter Incorrect error compiling OpenDental7.5

Posted: Sun Dec 05, 2010 6:49 pm
by jordansparks
Looks like you are missing a dll for Acrobat. Do you have Acrobat installed on your computer?

Re: Parameter Incorrect error compiling OpenDental7.5

Posted: Mon Dec 06, 2010 4:26 am
by Dockheas23
I have Adobe Reader installed (does that count?!), but the 'AxInterop.AcroPDFLib' dll is there anyway in the Required DLLs folder, and the reference to it is correct. Is that not enough?

Thanks,
George

Re: Parameter Incorrect error compiling OpenDental7.5

Posted: Tue Dec 07, 2010 4:35 pm
by jordansparks
Are you sure you have it set to build x86. You said you didn't mess with the configuration, but I know that you do indeed have to mess with the configuration to get it to build for x86. It seems to forget that setting with each minor version.

Re: Parameter Incorrect error compiling OpenDental7.5

Posted: Thu Dec 09, 2010 4:19 pm
by Dockheas23
Yes, I checked and all projects are set to build x86 in the configuration manager.

I'm all out of ideas! I'll try VS2008 and let you know how it goes.

Re: Parameter Incorrect error compiling OpenDental7.5

Posted: Thu Dec 09, 2010 6:00 pm
by Dockheas23
Just tried with VS2008, and it worked without much difficulty...the mind boggles!
Thanks for your help.

Re: Parameter Incorrect error compiling OpenDental7.5

Posted: Fri Dec 10, 2010 6:34 am
by wjstarck
I got this error too after downloading the 7.5 and trying to compile in VS2010.

I noticed that all the Acrobat references were pointing to obj folder so I deleted the following references in the OpenDental project:

Interop.Acrobat
Interop.AcroPDFLib
Interop.AFORMAUTLib

Then re-added them pointing to the files in the RequiredDlls folder. And the error message went away.

Re: Parameter Incorrect error compiling OpenDental7.5

Posted: Fri Dec 10, 2010 9:03 am
by jordansparks
Thanks for pointing that out. It's been fixed in 7.5 and the head.