Why it is at all needed more than one project in solution?
There are several reasons why you might want to do this, including:
1. You have a static library with rarely-changed code, linked to your app.
2. You have a dll - for example, a shell extension - and an app that presents the gui.
3. You have a dll and several test apps.
Pranit Kothari wrote:
How to add multiple projects in one solution?
Right click on the solution in the Solution Explorer, then click on Add > New Project (or Existing Project).
That is correct, look up dynamic and/or static dll use in Google. Having the ability to have all of your dll's in the same workspace is very advantageous for debugging the dlls themselves or interactions between the application and dll.
What I have guessed from your answer is, suppose I have some set of classes that I am creating in one project and I will create another project and use that library. It it correct?
Yes and no.
I use the term library to refer to a deliverable. An example is a logging library like log4cpp.
A deliverable has an independent project schedule, has its own requirements and users of the library determine which version to consume by moving the binary (compiled) form into their project.
An application however might have different layers or blocks. Each would likely have their own project. (I usually won't break into layers/blocks if there is only one code file even if there is a conceptual difference.)
On the other hand for something like a windows service I always break the 'service' code into a project that does nothing but provide the basic start/stop and uses another project (called something like 'App') which encompasses the entire functionality of the windows service. So a layout would look like
In the above the Service project refers to the App project and OtherFunctionality project and references the MyOtherLibrary.dll.
The App project refers to the OtherFunctionality project and references the MyOtherLibrary.dll as well.
Some very common functional blocks for me would be database layers, communication layers and business logic of different types. The App is also a block as it represents the application itself without requiring dependency specifically as a windows service. This makes it trivial to also deliver a stand alone console executable (which I always do as well.)
Sounds like a question for a Purify forum. Purify install should include all the C-Runtime DLLs it requires. You could try debugging a c++ app built against that version of the runtime and in the debugger use the Microsoft symbol server to download the pdbs by a right-click on the module and download symbols from MS symbol server.
but I have one big problem: IntelliSense code completion does not work, he does not find any options for exApp-> and I want to open a worksheet and I don`t know which variables the exApp->Workbooks->Open Function needs, for example.
Can someone tell me how I get the IntelliSense for the Managed Code to work?
I have a Windows Forms application that runs, when clicking on a button, a .exe console application. I know I can use System::Diagnostics::Process::Kill to exit it, and I want to do it when the user clicks on a Cancel button.
The problem I am encountering is that while the console application is running it is not possible to interact with the Windows Forms application.
Is there any way to run the process minimized or something similar?
this is a blocking call: the method waits, i.e. does not return, until the target process has exited. So if all the code shown is running on the main thread (say is part of an event handler, maybe a button click handler), then the main thread will sit there waiting , rather than handling all your Windows events (such as you clicking on the cancel button).
There are a couple of ways to solve your problem, the one I prefer is using an extra thread, probably a BackgroundWorker. Its DoWork handler would contain
proc->BeginOutputReadLine();//Start reading the output
or even a synchronous loop to read the output, no need to use asynchronous when you already have a dedicated thread.
BTW: you can't directly touch GUI Controls from inside DoWork, so you should enable the cancel button before you launch the BGW, and disable it inside the RunWorkerCompleted handler.
One alternative would be to use a timer (a System.Windows.Forms.Timer at best), that ticks say every 300 msec. Its Tick handler could check (no wait!) whether the process has exited, and if it has, disable the cancel button and stop itself.
Although not advisable a CString can contain embedded nulls.
So if one wants a string that doesn't have nulls, probably specifically in terms of length, and one isn't sure that nulls are not present (or one is sure) then one would need to do something like that.
I am new to windbg and I am analysing crash dump at some point I got below table as out put of !heap -s command, I want to dig deep and analyse futther can you please advice.
0:000> !heap -s
LFH Key : 0xeaafe2e0
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
008b0000 0000100210887272143100 L
008d0000 0000100264282821100 L
00c80000 000010021542457009744323415306 L
0ff90000 00041002128030830821100 L
0fff0000 0000100264323221100 L
121e0000 0000100264242441100 L
18fe0000 0000100264161600100 L
1a130000 0000100264161631100 L
1d9a0000 0000100210241024102410162000 L
1dc30000 00001002256323231100 L
1f540000 00001002256121211100 L
1c090000 0000100264121241100 L