I have a VB6 ActiveX EXE which is being called from another desktop application. When I launch my desktop application, I can see the ActiveX exe listed in the process manager. How do I debug this ActiveX component from within the VB6 IDE?
Load your ActiveX exe project into the vb6 IDE. Set your breakpoints as desired. Press F5 (or use the mouse to click the start button icon).
Then start the desktop application. When it instantiates your application, it'll connect to the copy running in the IDE. Note that you will not see the ActiveX exe show up in task manager.
We have to unregister the ActiveX exe from all the places and make sure there is no entry in the registry.
Search registry with activex exe name,If there is any entry in registry delete it manually.
Otherwise test application will trigger the activex instead of the one that is running from IDE
Related
Trying to follow multiple tutorials on adding RDP client support to an MFC project and I can add the ActiveX control just fine, but when I close the dialog in the resource editor then try to open it back up, I always get:
Microsoft Visual Studio
The ActiveX control "Microsoft RDP Client Control - version 11" could not be instantiated.
I then have to manually edit the .rc file and remove the control it added from the dialog. How do I stop it from doing this?
Two different tutorials can be found here and here
I'm checking NetOffice and trying to run a simple example from below:
https://github.com/NetOfficeFw/Samples/tree/master/Excel/02%20NetOffice%20Excel%20COMAddin%20Sample/01%20Simple
how can run this example in visual studio? ideally I think it should be opening a blank Excel which contains addin, but when debugging, it just an error "In order to debug this project , add an executable project to this solution...."
so what executable project I need to add?
thanks,
To debug this example, you must do two steps:
The add-in must be registered in the registry to load it when starting Excel.
This step is done automatically, when you built the add-in (this is part of the NetOffice "magic" with the COMAddin attribute).
You can do the registration of the add-in manually too by using regasm.exe.
Excel must be started so that the add-in is loaded and the debugger can be used.
I prefer to set this up in the project properties. Go in the project properties on the tab Debug, go on Start external program and select the path of the excel.exe on your computer.
You could also start Excel and attach the project debugging to the Excel process.
If you have done the two steps, then start debugging by clicking F5. Now Excel starts. If you set a breakpoint, then it should be reached either at the Excel starting process or when you open a workbook in Excel.
I am using InstallShield 2015 Limited Edition with Visual Studio 2010 to create an installer for a variety of different files, including executables, some Excel spreadsheets, and html pages. The executable files are created by NetBeans. The installer works fine, except for the following behavior with a created shortcut that I don't understand.
NetBeans creates 2 executables: myapp.exe, which is 32-bit, and myapp64.exe, which is 64-bit. I am creating non-advertised shortcuts for these two files. The shortcut for myapp64.exe is created as a "Run as Administrator" shortcut, where the little shield picture is embedded in the shortcut icon, and double clicking the icon brings up the typical prompt window when trying to run an app as administrator. When looking at the Compatibility tab in the shortcut properties, "Run this program as an administrator" has been checked for all users.
The shortcut for myapp.exe is "normal". It can be run as administrator from the right-click context menu, but it is not forced to do so because "Run this program as an administrator" is not checked on the Compatibility tab.
I would like for both shortcuts to be created as "normal", to avoid the annoying prompt window, but I can't figure out why the shortcut for myapp64.exe is created as a "Run as Administrator" shortcut. I checked myapp64.exe with the MT tool, but there is no manifest, and the properties for myapp64.exe do not require admin privileges anywhere that I can find. I can't find any InstallShield settings that would make the shortcut "Run as administrator". I have deleted and re-created the shortcut in the installer project, but that doesn't solve the problem. If I manually modify the shortcut for myapp64.exe after installation to uncheck "Run this program as an administrator", the app runs fine.
Finally, this behavior doesn't seem to happen all the time. It happens in Windows 7, but does not seem to happen in Windows 10. I am only working with 64-bit operating systems.
Any ideas what is going on, or how to prevent the myapp64.exe shortcut from being created to run as an administrator? Is the Windows Installer seeing something that is causing it to make the shortcut this way?
I posted in the Flexera forum for InstallShield LE, but didn't get a response.
Thanks!
In Visual Studio I can attach the debugger to any process that is currently running.
I have an application that is calling my DLLs and what I need is to debug this process from it's beginning. Is this possible?
Open the project properties (context menu, Properties or Alt+Enter)
Go to the Debug tab
Choose "Start external program"
Save and close
Choose debug mode
Run the application (F5)
If the application expects the DLL in a specific path, it may be necessary to add a post build step to copy the DLL to the expected location.
I have a problem debugging a C++ DLL project in Visual Studio 2010. While debuging I want the DLL to be loaded by rundll32.exe automatically. To do so I follow these steps (like here http://msdn.microsoft.com/en-us/library/c91k1xcf.aspx):
In Solution Explorer, I select the project that creates the DLL.
From the View menu, I choose Property Pages.
In the Property Pages dialog box, I open the Configuration Properties folder and select the Debugging category.
In the Command box, I type: "C:\Windows\System32\rundll32.exe"
In the Command Arguments box I type (main is the function to be executed): output.dll, main
In the Working Directory I type: $(SolutionDir)$(Configuration)
Attach -> yes
After following these steps, I try to debug the DLL, but I get this error:
"Unable to attach. Process "C:/Windows/System32\rundll32.exe" is not running on "MY-PC", Refresh the process list before attempting another attach."
Anyone know how to debug a DLL, without manually starting rundll32.exe from command prompt and manually attaching to this process?
You should set:
"Attach -> no"
otherwise the VS is not trying to start new rundll32.exe process.
Setting Attach -> yes tells VS to attach to existing process.