I need do wirte Unit-testing(Automated testing)code for our project. Some of the modules are developed in VC++(Using MFC).Its a Multiple Document Interface[MDI] application.
I tried to use CPPUnit framework ,but i'm getting difficulties. Also CPPUNIT don't have TestCoverage facility.
Hence kidly guide me how can i write test cases for pure MFC code. I mean the Unit testing code can handel MFC library & also the tool can able do the TestCoverage analysis.Any best & friendly Unit tesitng framework is avaialblle?
I've looked around some time ago, and found that almost all frameworks available for Windows require .NET, or at least managed C++. One of the few that doesn't is WinUnit: It requires some work for you (creating test classes for each class to test), but otherwise saves a lot of work by extracting the test cases directly from the binaries.
I haven't yet tried it out myself because it wasn't really what I required, but it may be useful for your purposes. Should be easy enuogh to google for, and IIRC the documentation even contains references of alternate solutions.
Please ensure the target is not started, by adding some log in that process. If process terminates as soon as the startup, then TaskManager cant show it.
Please check the values of returned PROCESS_INFORMATION structure. Process ID is avaialable in pi.dwProcessId.
Since CreateProcess() returns before the process has been fully initialized (e.g., waiting on some other DLL to load), it would have no way of knowing that. It goes ahead and returns a non-zero value because it did start the process.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
I tried entering the .exe on cmd.exe and it just returned, next I tried starting it from Task
Manager and it and I saw it pop up for a second , tried to debug it and got invalid handle
as it disappeared
My guess I have a CWinApp to start things off and some how I didn't build it as a MFC project
On my property pages -> Project Default USE of MFC -> USe MFC as Shared DLL
I want to get my program to change the database password (MS Access MDB file). I used to be able to do this using CDaoDatabase class, but that is now depreciated. I am in the process of changing my code to use CDatabase class, but can not figure out how to add some of the functionality that I had before.