-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registration [Error] xlfRegister call failed for function or command #664
Comments
You can enable a higher level of logging to see the exact call that is failing - in this case you need the 'Info' level of logging enabled. .NET Framework 4.x Logging ConfigurationIf you are targeting .NET Framework 4.x, you can use a .config file to set up the logging, with these instructions: https://excel-dna.net/docs/archive/wiki/Diagnostic-Logging Simplest is to add this .config file next to your .xll file (with name <configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4"/>
<sources>
<source name="ExcelDna.Integration" switchValue="All">
<listeners>
<remove name="Default"/>
<add name="LogDisplay" type="ExcelDna.Logging.LogDisplayTraceListener,ExcelDna.Integration">
<filter type="System.Diagnostics.EventTypeFilter" initializeData="Off"/>
</add>
<add name="File"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="ExcelDnaAddIn.log" />
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration> .NET 6 Logging ConfigurationIf you are targeting .NET 6, you can't use the .config file, and have the following options to configure the logging: Set environment variables to configure the logging, then restart Excel: EXCELDNA_DIAGNOSTICS_DEBUGGER_LEVEL=Verbose Set Registry entries under either of the keys
Then use these values, similar to the environment variables
|
Thanks for the fast response. Will come back to you once I have further data, most likely will take some days until client creates *.config file and error reoccures and provides feedback. |
Sadly, never got feedback with Logs activated. |
Finally... I received logs for this error, but sadly those logs aren't helpful to me, maybe they are to you.
Note the previous claim:
was a lie, the user simply didn't see the issue anymore because when the *.config file is present it doesn't produce the User Interface any more but instead it wrote the error into the log. So, what the user believed to be a fix, was simply a silent ignore, because the error never disappeared, it was just written to the file instead of a pop up window, and user wasn't aware of the fact. We notice this, when we published a new version and the *.config was overwriten an it didn't log to file anymore the user would again report the error. So it seemed to work just fine with the *.config, but without it the error poped up. Long story short, finally have logs of the still ongoing issue. |
/ping @govert (maybe you missed the reopen of the issue and my comment) |
Is this still true?
You might try to see if it makes a difference to load the add-in via "File -> Open" vs. the "Alt+t, i" dialog box. If it always fails on a particular machine, you can start by checking that VBA is installed correctly (at least check that Alt+F11 opens the VBA IDE). Otherwise, we could test whether a simple C add-in works (this uses the same xlfRegister call to add a function, but involves no Excel-DNA code). |
Yes, even in the provided logs only a couple of lines later I see this:
What is the name of the dialog box?
It happens on a particular machine but not on for all users on this machine.
Is there a sample available to test this? |
I got a 23 MB log file and it failed 98 times, and it succeded 731 times. |
"Alt+t, i" is the "Add-ins" dialog that you can get through "File -> Options -> Add-ins, Manage: Excel Add-ins, Go...". I'm wondering whether the add-in is somehow (initially?) loaded in a context where the registration fails, like from another add-in or from a COM call. For testing with the native code samples from the Excel SDK, I have this from a previous support incident: Here is a slightly tweaked version of the Excel SDK https://www.dropbox.com/s/ssvpe7quyxpdvje/Excel2013XLLSDK.zip?dl=0 The only tweaks are to make it compile without warnings (which are errors by default in my VS 2022 installation).
|
and FYI addin gets loaded by having a link in xllstart folder. |
What else gets loaded at startup? |
Would need to check with the customer, which will take some time again, response time is very slow. |
I also get the fShowDialog error upon Ctrl+N (similar error with Ctrl+M) - I don't think the way they register the shortcuts in that example works anymore. Yes, you are just trying to see if function registration works, so either add-in will work. |
A client of mine is getting the following message
I am rather clueless as what could be the problem, the error only seems to happen irregullary.
Does excelDna write more detailed information somewhere, to narrow down the problem?
The text was updated successfully, but these errors were encountered: