Click here to Skip to main content
15,889,346 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,

I had written a MFC program.
process:
program sent message to a mobile phone,phone replied a number and some informations,and my program connected a oracle database,downloading some data using the number,some data was sent to printer.

Today,my program was installed in factory...had a mistake.
Program wasn't run in some PC.

The computers has a lot in common.
1.Windows 7
2.Operation in C driver required administrator privileges.
3.if program was installed in C:\,program running would have a warning "reject access".
but if program was installed in D:\,program running would have issue phenomenon.

The following was issue phenomenon.
1.Serial communication was no problem.
2.Downloading data was no problem from database.
3.The program was running,but framework of the program crashed.
4.CPU usage rose to 58%.



Has anyone encountered this problem?plz help!

BR!
Posted
Updated 16-Jul-13 16:15pm
v3
Comments
[no name] 16-Jul-13 10:15am    
Help with what? You need to debug your code to figure what the problem is.
[no name] 16-Jul-13 22:23pm    
Everyone has encountered this problem. You have not completed the testing and debugging phase. You need to work out where the program is getting to before failing. Are you running a release or debug version? A logging window may help.
aolin.wang 16-Jul-13 22:56pm    
hi,thank you for your help.
I forgot to write i am a new coder and the program was my frist program.
debug version was run.
the issue phenomenon did not happen on all Win7 PC.
The C drive operation did not require administrator privileges,like this Win7 PC did not have the issue phenomenon.
And this issue phenomenon would be happened when the fist process was finish.
I think I should debug my program on issue computer.
[no name] 16-Jul-13 23:07pm    
Yes you can only debug on a computer that displays the problem. In debug version assert() statements can be a very useful tool. You can insert as many as you like and they will be ignored in release version.

your program writes some data in C:\Program which isnt allowed because it is a protected directory. Look out for the file and use a User directory.

-> http://msdn.microsoft.com/en-us/library/windows/desktop/bb762204(v=vs.85).aspx[^]

pick out a user csidl
 
Share this answer
 
Comments
aolin.wang 16-Jul-13 22:23pm    
hi!

Thank you for your help!
I am sorry,my description was wrong,so i already changed my question!
I hope you give me some new suggestions.

Thank you very much!
BR!
This is hardware problem.
I changed a USB-to-RS232 cable,all was ok.
Thanks all the same,all my friends!
 
Share this answer
 
Comments
[no name] 6-Aug-13 21:31pm    
Took 3 weeks?
aolin.wang 6-Aug-13 21:41pm    
O(∩_∩)O~,Not use 3 weeks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900