[Solved] What dlls are needed to distribute the application with ribbon?

Apr 11, 2010 at 3:43 PM

Hi, I tried ribbonlib and it's great, but it works only on my developer machine with Windows 7 SDK installed. Do I have to install that 1.5GB SDK on every machine where the program will be executed? When I execute it on another Windows 7 PC, I get the following exception:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at RibbonLib.Ribbon.InitFramework(IRibbonForm form, String resourceName, IntPtr hInstance)
   at RibbonLib.Ribbon.InitFramework(IRibbonForm form, String resourceName, Module resourceModule)
   at RibbonLib.Ribbon.InitFramework(IRibbonForm form)
   at ApplicationRibbon.FormMain.FormMain_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
    Assembly Version:
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Assembly Version:
    Win32 Version:
    CodeBase: file:///K:/ApplicationRibbon.exe
    Assembly Version:
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/
    Assembly Version:
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/
    Assembly Version:
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/
    Assembly Version:
    Win32 Version:
    CodeBase: file:///K:/Ribbon.DLL

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging

For example:

    <system.windows.forms jitDebugging="true" />

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Is there any solution for this? I thought that needed COM should be directly in Windows 7, but it seems it isn't. Both PC's (my developing machine and the client workstation) are running Windows 7 Ultimate x64. Thanks very much for any help.

Apr 15, 2010 at 4:53 PM

I'm also seeing this same error on Windows 7 x86. It runs ok in debu on my development machine, but when the app is installed on the dev machine I get this error. Has anyone got any idea why?

Apr 16, 2010 at 11:57 PM

Have you copied the ribbon resource dll? (the one the pre-build steps generates)

Apr 17, 2010 at 12:02 AM

Yes, I put it in the same folder as my exe. I tried running of included samples as well and I've got the same result - if Windows 7 SDK is present, everything works fine, otherwise I get an exception.

Apr 17, 2010 at 1:06 AM

Make sure that the the called overload of InitFramework is the one that gets the ribbon dll name (set a breakpoint inside ribbon.cs).

I've uploaded a small update to the code that prints to the output if the dll isn't found. Also if the dll couldn't be loaded it thorws an exception.

I tried the samples on another Win7 machine I got which doesn't have the SDK installed and it worked.

Apr 17, 2010 at 3:02 PM

Ok, I found out where the problem is - final application needs two dlls - Ribbon.dll and ApplicationName.ribbon.dll - I didn't include ApplicationName.ribbon.dll which was the reason it didn't work. Thanks very much for your help and for the great managed ribbon wrapper.