|
|
|
date: Tue, 19 Aug 2008 18:17:56 -0600,
group: microsoft.public.office.developer.com.add_ins
back
RE: weird ACCDDS.DLL error
Hello Dave,
I think this may occur on a 64 bit machine running .net 2.0. ACCDDS
assemblies have unmanaged code in them, so they always need to be run in
the 32 bit runtime. "BadImageFormat" is referring to the format of the
dll, it means .net tried to load a 32 bit only assembly into the 64 bit
runtime. I found the following msdn blog article related to this topic:
http://blogs.msdn.com/joshwil/archive/2005/04/08/406567.aspx. According to
the article, this BadImageFormatException error may occur in the following
three scenarios:
1.anycpu.exe -- runs as a 64-bit process, can load anycpu.dll and x64.dll,
will get BadImageFormatException if it tries to load x86.dll
2.x86.exe -- runs as a 32-bit process, can load anycpu.dll and x86.dll,
will get BadImageFormatException if it tries to load x64.dll
3.x64.exe -- runs as a 64-bit process, can load anycpu.dll and x64.dll,
will get BadImageFormatException if it tries to load x86.dll
Hope this helps to troubleshoot the issue on your side. And if you need any
future help, could you please elaborate a little more about the problem?
Which kind of project we are working on? And, how do we reference the
ACCDDS.dll in our project? With more information, I can try to reproduce it
on my side.
Best regards,
Ji Zhou (v-jzho@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
date: Wed, 20 Aug 2008 06:10:59 GMT
author: (Ji Zhou [MSFT])
Re: weird ACCDDS.DLL error
Hi;
Sorry - I should have given more context. This occurs when running a
PowerPoint AddIn under the VS 2005 debugger (must use 2005 because we
have J# code) on Vista 64-bit and Office 2007.
Our AddIn is built as "any CPU" but my understanding is that AddIns
are always called in 32-bit mode from Office.
Is this enough to tell us how to work around it?
thanks - dave
On Wed, 20 Aug 2008 06:10:59 GMT, v-jzho@online.microsoft.com ("Ji
Zhou [MSFT]") wrote:
>Hello Dave,
>
>I think this may occur on a 64 bit machine running .net 2.0. ACCDDS
>assemblies have unmanaged code in them, so they always need to be run in
>the 32 bit runtime. "BadImageFormat" is referring to the format of the
>dll, it means .net tried to load a 32 bit only assembly into the 64 bit
>runtime. I found the following msdn blog article related to this topic:
>http://blogs.msdn.com/joshwil/archive/2005/04/08/406567.aspx. According to
>the article, this BadImageFormatException error may occur in the following
>three scenarios:
>
>1.anycpu.exe -- runs as a 64-bit process, can load anycpu.dll and x64.dll,
>will get BadImageFormatException if it tries to load x86.dll
>
>2.x86.exe -- runs as a 32-bit process, can load anycpu.dll and x86.dll,
>will get BadImageFormatException if it tries to load x64.dll
>
>3.x64.exe -- runs as a 64-bit process, can load anycpu.dll and x64.dll,
>will get BadImageFormatException if it tries to load x86.dll
>
>Hope this helps to troubleshoot the issue on your side. And if you need any
>future help, could you please elaborate a little more about the problem?
>Which kind of project we are working on? And, how do we reference the
>ACCDDS.dll in our project? With more information, I can try to reproduce it
>on my side.
>
>
>Best regards,
>Ji Zhou (v-jzho@online.microsoft.com, remove 'online.')
>Microsoft Online Community Support
>
>Delighting our customers is our #1 priority. We welcome your comments and
>suggestions about how we can improve the support we provide to you. Please
>feel free to let my manager know what you think of the level of service
>provided. You can send feedback directly to my manager at:
>msdnmg@microsoft.com.
>
>==================================================
>Get notification to my posts through email? Please refer to
>http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
>
>Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
>where an initial response from the community or a Microsoft Support
>Engineer within 1 business day is acceptable. Please note that each follow
>up response may take approximately 2 business days as the support
>professional working with you may need further investigation to reach the
>most efficient resolution. The offering is not appropriate for situations
>that require urgent, real-time or phone-based interactions or complex
>project analysis and dump analysis issues. Issues of this nature are best
>handled working with a dedicated Microsoft Support Engineer by contacting
>Microsoft Customer Support Services (CSS) at
>http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
>==================================================
>This posting is provided "AS IS" with no warranties, and confers no rights.
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm
date: Wed, 20 Aug 2008 08:53:37 -0600
author: David Thielen am
Re: weird ACCDDS.DLL error
Hello Dave,
Thanks for the information. After reviewing your first post, I found the
log mentions that "Native image will not be probed in LoadFrom context".
So, I try the following codes on my side:
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
try
{
Assembly.LoadFrom(@"C:\Program Files (x86)\Microsoft
Office\Office12\ACCDDS.DLL");
applicationObject = application as PowerPoint.Application;
addInInstance = addInInst;
}
catch (Exception ex)
{
Debug.Print(ex.Message);
Debug.Print(ex.StackTrace);
}
}
It pops up the exactly same exception message as you post:
"System.BadImageFormatException: Could not load file or assembly
'file:///C:\Program Files (x86)\Microsoft Office\Office12\ACCDDS.DLL' or
one of its dependencies. The module was expected to contain an assembly
manifest.". I think this issue may result from calling Assembly.LoadFrom()
to load a native dll. And, the problematical codes may exist in our Add-In
or one of its referenced assembly. Could you please help to check the
ex.StackTrace's content which tells where the exception comes from.
And one more thing to mention, could you please tell me what's the
objective to load ACCDDS.dll and how we are loading it now? Native dlls are
supposed to be loaded via native api LoadLibrary instead of the
Assembly.LoadFrom() method.
Best regards,
Ji Zhou (v-jzho@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
date: Thu, 21 Aug 2008 11:28:28 GMT
author: (Ji Zhou [MSFT])
|
|