Application doesnot launch created using MSVC2010 - exe

I have created a exe using qt 5.0.2. Application launches if I try o launch it using qt creator. However application fail to launch which is created using MSVC 2010 pro edition.
When I double click on exe it will comes out and it will not display any error or dll missing errors. Is there any way to fix/debug these kind of issues.

Related

Visual Studio Extension to attach debugger to remote process running in .NET Core on Linux

I'm using Visual Studio 2019 to develop a .NET Core 3 application which runs on embedded Linux. I am able to build the code in Visual Studio 2019. If I copy the binaries manually to the Linux machine and then start the application running there then I am able to attach the Visual Studio debugger to the remote process over SSH in Linux and debug the application. This does work, but it's tedious to deploy it, start it and attach the debugger manually for each debug session. I do have a script in Visual Studio Code which works, but I want to use Visual Studio Professional.
I'm trying to write a Visual Studio Extension so that I can press a key in Visual Studio to have the application built, deployed, started and then connected to the debugger. I would then share the extension with my team. It's very nearly working, except for attaching the debugger.
In the extension I am able to list the processes running in the Linux machine and select my application using this code:
EnvDTE100.Debugger5 debugger = (EnvDTE100.Debugger5)dte.Debugger;
EnvDTE80.Transport transport = debugger.Transports.Item("SSH");
EnvDTE80.Engine engine = transport.Engines.Item("Managed (.NET Core for Unix)");
EnvDTE80.Process2 process = (EnvDTE80.Process2)debugger.GetProcesses(transport, "192.168.11.1").Item("app");
process.Attach2(debugger);
There are two problems:
The call to GetProcesses() opens a dialog where I need to enter the Linux username and press enter, how can I specify the username in code to avoid the dialog appearing?
Even though the selected process looks like the right one (process.ProcessID matches what I see in Linux if I run the ps command), I get an exception when I call Attach2(). The exception message is "Exception from HRESULT: 0x8971001E"
I feel like I'm really close to getting this to work, any suggestions for how to finish it?
I also solved the second problem by changing the parameter passed to Attach2() from debugger to engine, as shown below:
EnvDTE100.Debugger5 debugger = (EnvDTE100.Debugger5)dte.Debugger;
EnvDTE80.Transport transport = debugger.Transports.Item("SSH");
EnvDTE80.Engine engine = transport.Engines.Item("Managed (.NET Core for Unix)");
EnvDTE80.Process2 process = (EnvDTE80.Process2)debugger.GetProcesses(transport, "root#192.168.11.1").Item("app");
process.Attach2(engine);
I found out how to add the user Name, but not the Password:
In GetProcess(), set transportQualifier to $"{userName}#{hostName}".
The 1st time the Window will still Pop up and ask for the Password.
But after that VisualStudio has stored the connection including the password.

Using interop.MSProject.dll without Office installed or creating Project Add-in in Visual Studio

I need to work on Project Server using Microsoft.Office.Interop.MSProject.dll from Visual Studio.
Using gacutil.exe I have registered Microsoft.Office.Interop.MSProject.dll and at folder "C:\Windows\assembly" there is entry for MSProject.dll whose processor architecture is MSIL.
I have created Console Application and when I try to create Application instance it gives error:
Class not registered-HRESULT: 0x80040154 exception. As shown in image.
Target platform for this project is x86(32-bit). What could be the reason for the error?
Is it because office is not installed on local machine? Is there any alternative to using PIA without installing Office?
I have tried creating Project Add-in from Visual Studio, it works successfully, but it requires Project Professional to be open, which I want to avoid. Is it possible to avoid opening of Project Professional application in this case?
You need to have the Application (i.e. MS Project) installed on the PC. Interop files sre used for marshalling property or method calls from a managed code to the host application.

Error running app on Windows Phone 8.1 emulator - A dependent dll was not found

I have universal project targeting Windows Store 8.1 and Windows Phone 8.1 platform.
The windows one works fine but I having trouble running the WP one on an emulator. I get the error message saying:
Microsoft Visual Studio Unable to activate Windows Store app
'numbers-here!App'. The Kiss.WindowsPhone.exe process started, but the
activation request failed with error 'Msg in polish that the app did
not start'.
If this was Windows I would check System Event Log and see the logs just before the error what DLL the system was trying to load and that helped a lot when I was debugging similar problem with Windows Store project, here I have no clue on how to check what exactly was being loaded.
The worst part is that I created package (appx) and checked the dll's being packed with exe, it seems that it includes dependencies that the app explicility uses yet something is still missing and this might be some 'hidden' dependency of one of the other dlls.
Any ideas how to debug such issues with emulator?
For me it was due to having WIC code in my App and/or calling CoCreateInstance in a windows phone environment ( on PC it works flawlessly though )
I ran into the same problem on Windows 10. Turns out, that there is no Kernel32.dll on Windows 10 phone!
Instead you need to link against OneCore.lib which provides the entire Win32 API subset that is supported in UWP. This "umbrella library" will load the correct dlls at runtime.
See also:
https://msdn.microsoft.com/en-us/library/windows/desktop/mt683763(v=vs.85).aspx

MCR_CACHE_ROOT path empty after running the console application

I set the MCR_CACHE_ROOT to a folder C:\MATLAB_cache to speed up my compiled application. Using the linke below
How to setup MCR_CACHE_ROOT in Windows
But after I ran the console application calling it from PHP the folder is still empty.Why is it? Should I add anything in my console application or php code after setting up the MCR_CACHE_ROOT? I am working on Windows 7-64bit. The console application is C++ Win32 console application.
I deployed a c++ shared library using deploytool in MATLAB and the ctf archive is embedded in the application is it because of this?

C++ Builder .exe program in other computers

I’m working in a Program for the University using C++Builder 6.
The program works perfectly in my computer, but it doesn’t work in any other computer.
I have already disabled the PACKAGES->BUILD WITH RUNTIME PACKAGES and the LINKER-> USE DYNAMIC RTL options.
What else can I do?
With these options disabled, you will be able to run your application on any computer, except:
If you are using a component that requires installing another resource. For instance if you are using SQL, it will run, but obviously it will not use SQL functions if no SQL resource is installed on your computer;
If the Windows version cannot run it. E.g., you cannot run it on Windows CE, Windows 3.1... except if you compile it to run on these different versions.
Just to optimize your .EXE file, just press the Release button on Project > Options > Compiler, so debug data will not be stored on it.

Resources