How to compile C code for an Excel XLL in Visual Studio 2008 so it runs on Office 2010 64 bit version

StackOverflow https://stackoverflow.com/questions/10897916

  •  12-06-2021
  •  | 
  •  

I have an Excel add-in that I developed using Excel 2007 SDK, it works fine on Excel 2007 and Excel 2010 32 bit version

More recently I noticed that Office 2010 or Excel 2010 is also made available as 64bit software as compared to 32 bit version in Excel 2007 and its counterpart in Excel 2010

I understand it would require Excel 2010 SDK and Visual Studio 2008 to be able to compile the XLL as a 64bit version so it will run in Excel 2010 64 bit on Win7

Are there any specific options I need to set in Visual Studio 2008 so that I can compile the code as 64 bit version

I looked at the sample code in Excel 2010 SDK and it uses the same XLOPER12 data type and the example code looks quite like the one for samples in Excel 2007 SDK

This leads to me ask whether the code from the previous version would require any changes before it is to run in a 64bit Excel environment

Many Thanks in Advance

有帮助吗?

解决方案

If your code compiles - you should be good to go. That said - if you are doing any pointer arithematic with the XLOPER12s - you will of course need to keep in mind pointers are 8 bytes in a 64 bit build.

Also - if you are dynamically linking to the CRT make sure you provide the redistributable. Alternatively - statically link to the 64 bit crt.

其他提示

You don't have to do anything special to get your code to work. Have a look at http://xll.codeplex.com if you want an easy way to create add-ins.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top