TYPE_E_INVDATAREAD after changing Windows language format (culture)

Add-in Express™ Support Service
That's what is more important than anything else

TYPE_E_INVDATAREAD after changing Windows language format (culture)
Why are Excel add-ins so culture-sensitive? 
David Ching


Guest


Hello, I have developed an Excel COM add-in using Add-in Express 2010 and VS 2010. I am running Windows 7 x64 with Excel 2007. All is well until:

* I went into Control Panel and changed the regional settings: Display language format from "English (United States)" to "French (France)"

* Then I ran Excel, and my add-in crashed in


        private void AddinModule_AddinInitialize(object sender, EventArgs e)
        {
            // Force Automation add-in to be in this AppDomain so UDF can access properties of this
            // class instance
            ExcelApp.Evaluate("MYADDIN_UDF_INIT()");   // <-- Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
        }



What is the root cause of this issue? Is there anything in Add-in Express that makes it work only in EN-US?

I found http://www.add-in-express.com/forum/read.php?FID=5&TID=2911 but I don't understand it. Do I have to use dynamic method invoking, or set the culture of the current thread to en-us? If so, do I have to do that throughout my add-in or only in certain places?

Thanks much,
David
Posted 05 Oct, 2010 00:26:29 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hi David,

Please see http://www.add-in-express.com/creating-addins-blog/2009/02/13/old-format-invalid-type-library/.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Oct, 2010 02:10:58 Top
David Ching


Guest


Thanks much Andrei! It is good to see the workaround of installing the language pack. I'll experiment with that. Changing the code looks like far too much work!

-- David
Posted 05 Oct, 2010 21:50:09 Top