0

I'm trying to run an RTD server from inside an ExcelDNA .xll. All the development files are on a shared drive on my network. On the computer I developed on, the server runs fine and produces the real-time data as intended. However, when I try to access the .xll and run the RTD server from other computers on the network, the server function calls I'm making (the ones which require the RTD calls underneath) always return #N/A to Excel. Through logging, I've determined that the server never gets started (i.e. ServerStart is never called) and none of the RTD functions are ever called.

The .xll file being used is the only file in its directory. Because this is on a shared drive being accessed by any computer, I don't really understand why this should work on the host computer and not on others. If it's relevant, I'm not copying the .xll to the local user's Addins folder.

To my knowledge, I'm packing all of the relevant .dll references into the .xll. My .dna file is as follows:

<DnaLibrary Name="ExcelRTD Add-In" RuntimeVersion="v4.0">
  <ExternalLibrary Path="W:\nate2\ExcelRTD\Build2\ExcelRTD.dll" Pack="true" ComServer="true" LoadFromBytes="true"/>
  <ExternalLibrary Path="C:\Program Files (x86)\MySQL\MySQL Connector Net 6.9.6\Assemblies\v4.0\MySql.Data.dll" Pack="true" />
  <ExternalLibrary Path="C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll" Pack="true" />
  <ExternalLibrary Path="W:\nate2\Excel-DNA.0.32.0\tools\ExcelDna.Integration.dll" Pack="true" />
  <ExternalLibrary Path="C:\Windows\assembly\GAC_MSIL\Office\14.0.0.0__71e9bce111e9429c\Office.dll" Pack="true" />
  <ExternalLibrary Path="C:\Windows\assembly\GAC_MSIL\Microsoft.Vbe.Interop\14.0.0.0__71e9bce111e9429c\Microsoft.Vbe.Interop.dll" Pack="true" />
</DnaLibrary>

Any help would be very much appreciated!

Nate
  • 225
  • 2
  • 12
  • It's much easier to address this kind of problem on the Excel-DNA Google group (https://groups.google.com/forum/#!forum/exceldna). – Govert Aug 12 '15 at 17:34
  • You can get rid of most of the .dna file. You only need the first two lines (as long as the COM references are marked "Embed Interop Types=true"). And the second entry should be a instead of an . – Govert Aug 12 '15 at 17:35
  • Then the first question is whether it works on the problem machine if the .xll file is copied locally and not run over the network. – Govert Aug 12 '15 at 17:37

1 Answers1

0

Have you looked a the privilege/permissions level of your process? Processes run with elevated permissions access the registry differently, which can prevent Excel-DNA based addins from working. For example, elevated perms are required to run binaries installed under c:\Program Files. However, processes with elevated perms can't access per user settings under HKEY_CURRENT_USER, instead they'll go to HKEY_LOCAL_MACHINE. This is by design to prevent exploits. Excel-DNA puts its auto registry entries under HKEY_CURRENT_USER for RTD registration. See ExcelRtd.cs. Consequently, to use addins with Excel-DNA based RTD servers, one must install outside c:\Program Files, to run without elevated privileges.

Component creation fails under UAC admin, works without UAC elevation

https://msdn.microsoft.com/en-us/library/bb756926.aspx

Community
  • 1
  • 1
osullivj
  • 341
  • 1
  • 5