|
I would start choosing the right forum.
Veni, vidi, vici.
|
|
|
|
|
What? I can not understand,sorry
|
|
|
|
|
This is the C/C++/MFC forum, while you asked about C# .
As a side note, a quick Google search gave me about 830,000 results[^].
Veni, vidi, vici.
|
|
|
|
|
You can google for that.
Also, if it matters, a parser is probably faster than a regex.
|
|
|
|
|
you can post it at the c# forum
moonman
|
|
|
|
|
Hi,
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?
Kindly help me out. Thanks in advance 
modified 30-Jun-13 1:04am.
|
|
|
|
|
Since nobody answered so far...
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.
|
|
|
|
|
Hi,
I have a list control on a dialog box. I use
LVS_EX_CHECKBOXES functionality to put check boxes in the list control. I want to put the checkboxes in any other column of list control.
How it can be implemented.
Please share any sample code if you have.
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|
|
|
If you want to have a single column with checkboxes, you may rearrange the order of the columns, in such way to have checkboxes on the desired column ...
You can also check here[^], on this list you can put any kind of control, on any column ...
|
|
|
|
|
I hope someone can give me some proposal. I find the PDFMakerAPI.dll in acrobat. so i want to use the PDFMakerAPI.dll to convert in VC++.How to convert office to pdf with acrobat in VC++?
|
|
|
|
|
The first thing you need to do is study the documentation for the DLL.
Use the best guess
|
|
|
|
|
Hi,
I am getting back a 1 from CreateProcess indicting success however the process never takes off
I can cann't find it in TaskManager Either
Here is the code this code used to work I just cleaned up my computer tried re-building the app
strncpy(&herc_command[0],"HERC_CMD.EXE ",13);
memset(&si,0,sizeof(si));
si.cb= sizeof(si);
sa.nLength = sizeof(sa);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;
hutil_module = GetModuleHandle("HENGINE");
hercgui_addr = GetProcAddress(hutil_module,"hercgui_proc");
if (hercgui_addr == NULL)
errcd = GetLastError();
strncpy(&herc_parm[0],&hercgui_addr,8);
return_code = CreateProcess((LPCSTR) &herc_command[0], (LPCSTR) &herc_parm[0], (LPCSTR) &sa,
NULL,
TRUE,
(DWORD) NULL,
NULL,
NULL,
&si,
&pi);
if (return_code == 0 )
errcd = GetLastError();
|
|
|
|
|
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.
return_code = CreateProcess((LPCSTR) &herc_command[0], // command
(LPCSTR) &herc_parm[0], // paramter
(LPCSTR) &sa,
NULL,
TRUE,
(DWORD) NULL,
NULL,
NULL,
&si,
&pi);
Is third parameter is correct? Conversion to a string is not correct.
|
|
|
|
|
I run the code under the debugger in VS
2010
In the child process
I have a __debugbreak at the beginning of the code
Ill move it up to CWinApp::InitInstance as that would seem close to the first piece of code being executed
Thanks
|
|
|
|
|
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
|
|
|
|
|
Since CWinApp::CWinApp is the first piece of executable code as far as I am concerned
I would set a breakpoint e.g. (__debugbreak) at that location if it doesn't get there where else would I look ?
Thanks
|
|
|
|
|
I dont't think the target process will be started under the debugger by the host process. There are three possible things I can think of testing.
First, in the project settings of the target app enter the same parameters you would recieve from the host process. Then start debugging and see if the app starts or if it aborts as well.
Second, try starting another process, e.g. cmd.exe, from the host process to check if this works at all.
Third, use as little parameters as possible and possibly log (or check in debugger) the values before passing them to the CreateProcess() call to see if they really are what you expect them to be.
|
|
|
|
|
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
maybe its something else in my project settings
Any Ideas are welcome
|
|
|
|
|
ForNow wrote: I tried entering the .exe on cmd.exe and it just returned... Is it a dialog-based app, or some other app that has a doc/view?
"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
|
|
|
|
|
It has a MainWindow CFrameWnd
Something about the way I build it I think
|
|
|
|
|
ForNow wrote: It has a MainWindow CFrameWnd SDI or MDI?
ForNow wrote: Something about the way I build it I think That's kind of what I was leaning towards. If it was a dialog-based app, I was going to suggest to you to use the DS_NOFAILCREATE style.
"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 think SDI as there is only 1 MainWindow and dialogs Modal and non-modal that come
in response to user selection
|
|
|
|
|
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.
Anybody know how to do this?
|
|
|
|
|
I am also looking into upgrading the MS Access version we are using and from what I finding is that a lot of things previously done using the DAO library should now be done using an SQL command.
The SQL command for changing the password is ALTER DATABASE PASSWORD[^] and can be executed on the database using the CDatabase::ExecuteSQL[^] function.
I have not tried this myself but it looks like it should work.
0100000101101110011001000111001011101001
|
|
|
|