xlcalert not working in XLL SDK example - c++

I am new to XLL development. I downloaded 2010 XLL SDK and was able to build the example in VisualC++ 2012. When I load the xll in Excel2010, I am seeing the popup with "thank you ..." message and I am seeing all the functions exported from the example in Excel, so it seems everything is loaded successfully.
But, the xlcalert does not work in most of the functions. I am only seeing popup dialog from xlcalert in xlAutoAdd and xlAutoRemove. I even modified EvaluateExample() function to just do:
Excel12f(xlcAlert, 0, 2, TempStr12(L"Finished EvaluateExample"), TempInt12(2));
When I run the function, I don't see popup. What am I missing? I can't seem to find much references to xlcalert.
Thanks in advance

If you are new to XLL development, do yourself a favor and use http://xll.codeplex.com.
Your example would be ExcelX(xlcAlert, OPERX(_T("Finished EvaluateExample")), OPERX(12))
The code will work with either the old or new SDK.

For everyone looking for the answer for this question - one can find it here:
https://social.msdn.microsoft.com/Forums/office/en-US/6951ef0a-a66a-489a-b0da-9516667bffa9/xlcalert-in-xll-example
Long story short:
You also see 1 in the cell if you use it as a function for cell. However if you run it as a macro via Application.Run "xlGetNameExample" you will see the dialog. I think your issue is similar like it. Please try it. Let's see whether you can see the prompt.

Related

Is it possible for a DLL to open explorer?

Im trying to make (what I thought was a simple) extension for Game maker studio 2.
I am restricted to making a DLL app.
I am wondering is there any was to have a dll app open the file explorer have the user locate a file and then return said directory?
I fell like this is a sumb question but one I really need to know the answer too before slaving away coding for hours only to find its not possible.
You do not want to launch the explorer but to open a file dialog that allows the user to select a file.
Depending on the framework you use in your program the solutions may differ.
If you are using Qt framework you may use a QFileDialog for a platform independent mechanism.
If you are okay that it will only works on Windows then you may directly use the WinAPI functions GetOpenFileName or GetSaveFileName (that is a lot easier than the Common Item Dialog that is suggested as replacement on their documentation pages)
On GameMaker terms, you want to use get_open_filename or get_open_filename_ext.
See Dialog Module (marketplace, github) for C++ implementation reference.

Debugger popup message "Getting DataTip text"

This Debugger message pops up randomly while i am attempting to examine a variable while a breakpoint has hit in Visual Studio 2017.
Shortly thereafter, a larger message box appears that shows the following: "Evaluating the function 'System.Reflection.Assembly.LoadForm' timed out."
After enabling option Tools / Options / Debugging / General / Only managed code, the second message box have disappeared. But first message is still showing.
The problem is that first popup window appears for a relatively long time, that makes debugging process very noncomfortable. What else Visual Studio debugger options could I set to disable this popup?
(1)Tools->Options, uncheck the setting Debugging / General / Enable property evaluation and other implicit function call, and enable the Use Managed Compatibility Mode.
(2)Deleted all the .suo/obj/Bin/.user files in your project, and then re-open your project, clean and build your solution, debug it again.
This solution works fine for me:
Uncheck the new langage JavasScript Language Service in Options -> Editor -> JavaScript -> Language Service.
Option capture
I'm having this same issue and there doesn't appear to be a solution. It's extremely frustrating because when the "Getting DataTip text..." does popup and eventually goes away, my breakpoints no longer work.
The solutions listed here have not solved the problem, I've tried them ALL ... even a wipe and re-install of OS and VS 2015.
Debugging without ability to do property evaluation and other implicit function calls is basically NOT debugging and defeats the purpose.
Microsoft seem to be aware of the problem but keep closing the tickets as "unable to replicate" ... yet, a simple Google Search will show many many thousands of hits of developers running into this problem. I keep opening tickets with Microsoft, but they just keep getting closed or merged with no solution.
Cheers, Rob.
The ONLY solution that worked for me:
CMD window (Run As Admin)
type SFC /SCANNOW and wait for it to complete and hopefully fix any errors
Reboot
Bring up VS 2015 or 2017 without loading any project
In VS select Tools | Import and Export Settings | Reset all Setting ... now pick the template you use (i.e. VB, C, Web)
Exit VS
Load VS project and debug
Cheers, Rob.
Old post, but maybe it will help someone anyway ;)
In my case I got this every time I examined the first variable while debugging.
Annoying as hell as I due to the nature of the work restart the debugger often.
This was cause by that the location where my Visual Studio 2017 files were saved, was a cloud drive and it actually had to sync the files before showing the data.
The solution was to mark that whole folder "Always keep on this device".
Cheers,
​Here is one possible solution:
I had this error never seen - then my graphics card (Nvidia) was gone and I removed the graphics card and worked with the integrated Intel. Then I got this error in after 3-4 steps. I installed a Nvidia again and now the "getting data" text message was never shown again.
Btw: this was the fix for the error
"64 bit debugging operation is taking longer than expected"
I had the same issue when I wanted to evaluate variables while debugging in my Unit tests and couldn't find any solution.
This is the solution that helped me: Tools -> Options / Debugging / General. Uncheck "Call string-conversion function on objects in variables windows".
This might only work for some people.

How do I turn on code completion in Dev-C++?

I am using Dev-C++ version 5.11. It has feature of code completion, but it is not turned on. I don't know how to do that because I am using Dev-C++ for the first time. Any help will be appreciated!
You need to go to Tools->Editor Options->Completion->The tab code completion and then click "Enable code completion" box
you can also change the delay with which the prediction will be made
Note: Its not going to predict variables names or function names. By the time i write this, it only predict things you put after the -> operator
It's not gonna show you the member functions inside your header file if you're calling the class member functions from another file. works if you use the class and main in the same file.
My man I have the answer
--DevC++ is an awesome IDE and I don't have any plans to move to any other IDE. So I found Intellisense in DevC++ and the best part YOU DON'T NEED ANY ADDONS OR PLUGINS it's just hidden in the DevC++ shortcuts. (I have been using Dev C++ NEWER VERSION so I dont know about the old version and I do recommend the new version found on sourceforge) so when you need Intellisense simply press Ctrl+Space. Yup That's it . Just try .U Can thank me later...................

Adding chart in PowerPoint using C++ OLE automation

i've encountered a problem when tried to add chart to PowerPoint in C++
AutoWrap(DISPATCH_METHOD, NULL, pShapes, L"AddChart", 0);
It throws "0x80020009 Exception occured" error. That code works for AddTable, AddTextbox etc.
I think you'll find help here:
http://support.microsoft.com/kb/222960
Note: Not all functions available in Office are available through ole in C++. AddChart may not be supported. If you can, look at using COM to call a managed dll. It is much easier. You will get full support when you add references to Powerpoint in .NET.
MDSN Interop Documentation:
http://msdn.microsoft.com/en-us/library/ms173184.aspx
I've managed to resolve the problem. There are two solutions:
-have PowerPoint opened in background
-make powerpoint visible when creating instace of it (by default it's invisible)
I don't know why it must be done this way, but it works :)

How to use SAPI's SetNotifyCallbackFunction() in a CLR project with Windows Form as the interface window?

I'm trying to write a dll plugin for Winamp. I'm using Microsoft Visual Studio 2008 and Microsoft SAPI 5.1. I created the interface window using Windows Form (System::Windows::Forms::Form).
I tried to use SetNotifyWIndowMessage(), but the method is never called when I speak to the microphone. So I tried using SetNotifyCallbackFunction(), but I got a compile error saying that I should use '&' in front of the method name in the parameter. However, when I add the '&', I got another compile error saying that i can't take the address of the method unless creating delegate instance.
What should I do? Someone please help me..
Well, as indicated, you need to create a delegate instance to wrap your callback. But don't go there, SAPI 5.1 is quite outdated. Updates are no longer shipped because the .NET framework has a very nice wrapper for it. Check out the System.Speech.Recognition namespace and the SpeechRecognitionEngine class. You'll want to use the SpeechRegonized event. You'll find plenty of code samples in the MSDN Library pages for the class.