|
Preeti9 wrote:
I have trouble building a code....When I compile it, it runs well, but when I start building it...It gives me the following errors.
What do you mean ? It doesn't compile, it has errors.
Preeti9 wrote:
TSCalibrate.obj : error LNK2001: unresolved external symbol "public: static class CTouchScreenAPI * __cdecl CTouchScreenAPI::Create(void)" (?
Assuming that CTouchScreenAPI is your class, you have a create method in your header file, and no implimentation in your .cpp file. If it's an external library, then you have linked to the header, and not the .lib file.
Preeti9 wrote:
Also, I included main function. When I don't include main in the code...
I get one more error in addition to the above...
Why would you remove your main function ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi there,
No, I said when I didn't include main function, it gives me 3 errors.
Now, I am including it, I get rid of that error.
Thanks for your reply, How can I remove other 2 errors.
Thanks
Preeti
Preeti9
|
|
|
|
|
They are both the same error ( one is just reiterating the other ), and did you try what I suggested ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes,
Thanks...My problem is solved and my program is working as I wanted.
Thanks once again.
Preeti
Preeti9
|
|
|
|
|
Hi
I am looking for a free ssh api for windows. Does that exist?
Basically I need to connect to a linux box, execute some commands and get their output and write this to a file.
I have seen a good project on sourceforge.net, but it is for java.
Thanks
|
|
|
|
|
openssh (do a google for it) is probably your best bet
'G'
|
|
|
|
|
How can I change execution point in suspended thread?
So if thread became suspended during executing some loop how I can move execution point programaticaly same way we Set next statment in VS? I know exceptions uses same mechanizm.
Thnaks.
|
|
|
|
|
|
I like that one
Goto AnotherThread: // like that right
|
|
|
|
|
You have to use the debug API to do what you are asking. However that is a bad idea. You need to find out which object the thread is locking on and release the object so the thread can continue, or better yet figure out what condition is causing the deadlock and prevent it from occuring.
|
|
|
|
|
Somewhere in third party ActiveX control. Owner not exist.
|
|
|
|
|
how is the thread suspended?
Is it through an external called of Suspend() method or by waiting for a handle through WaitForSingleObject, WaitForMultipleObjects,MsgWaitForMultipleObjects functions?
|
|
|
|
|
Extermal Suspend()
|
|
|
|
|
Hi all,
I have a windowless application that has a simple main() function with well-defined starting and ending points.
One of my customers claims that when this application is running within the SYSTEM account, he can see it "hang" in memory when execution should actually be complete and should terminate. The same program however, when running within a "regular" user account, runs fine and exits as expected. I don't doubt his claim, but I haven't been able to reproduce this particular problem.
To put it mildly, I'm stumped. I'm at a loss for things to look for or even specific questions to ask the customer.
I'm willing to entertain any sort of speculation.
|
|
|
|
|
How is he running it as SYSTEM? Is this a service?
|
|
|
|
|
> How is he running it as SYSTEM?
"SYSTEM", as in, when you look at the process in Task Manager, the User Name shows SYSTEM instead of any "regular" user profile.
The customer runs my program through SMS, which, apparently, runs within the SYSTEM context (I'm not all that familiar with it). In any case, he says he can reproduce the setup like this (so SMS shouldn't really be a factor):
- From the command line, run "at 00:00 /INTERACTIVE cmd" (without the quotes)
- This sets up a new scheduled task at midnight, which will simply launch CMD
- Navigate to the Scheduled Tasks folder in Control Panel. Right-click on the new task (at1), select Run
- This creates an instance of CMD running within the SYSTEM account, since that's how Task Scheduler runs everything (you can confirm this with Task Manager)
- He then runs my app from within this console window. It's also running within the SYSTEM context (I can confirm this behavior so far).
At this point, he says my program never shuts down. It does, however, on all the machines I tried this on.
I'm still trying to get some basic information out of the customer, but in the meantime, I'd like to hear some feedback so I can further experiment on my own...
|
|
|
|
|
First guess is that it's popping up a message box, and waiting for you to click it, except the message box is on a "hidden" desktop, so it'll wait forever.
If he allows the Scheduler service to interact with the desktop, and runs it via the scheduler (ie using the at command as you describe), you might see the messagebox (if there is one)
|
|
|
|
|
> First guess is that it's popping up a message box, and waiting for you to click it,
I thought about that as well, only if this was the case, he'd be seeing that message when NOT running as SYSTEM...there's nothing in the program that would try to display a message box when running as SYSTEM but not as a regular user.
Besides, with the /INTERACTIVE switch specified for the scheduled job, it *should* already be able to display a message box...
|
|
|
|
|
it will let me do debug (F5) and create report and every will be fine, but if I click "execute program (Ctrl +F5)"...It will have "application error, the instruction at "0v00490c3c " referenced memory at "0x000000cc". The memory could not be "read", click ok to terminate the program or cancle to debug"
but in release version, everything works, F5 or Ctrl + F5, could anyone tell me what to look at this error?
Thank you!
|
|
|
|
|
I would just fix the bug.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
Thanks for your reply, I am trying to fix the bug, i think my question is what's the difference between execute and go?
thank you
|
|
|
|
|
Do you have any program arguments in the debug settings? That could make a difference.
In any case, you should be able to break into the debugger after the exception and take a look at the call stack, variable values, etc., so as to determine where and why the program is producing an access violation...
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi,
I'm not sure but I think the main difference is that when pressing F5 the application will be loaded into the debugger. Which on his turn allocates memory for the programma and fills it up (the not initialize) with 0xCC. When pressing CTRL + F5 the application is started like a normal program without the extra byte filling. This can lead to different behaviuor when there are unintialized variables that are use directly.
Hope that this clarifies it a bit
Best regards,
Kurt Pattyn
codito ergo sum
|
|
|
|
|
When I lauch my C++ program, my CPU is only used at 50%. While watching my CU history, I can see that there is 2 graphics. All the other system that I used to work with had only one graphic showing the CPU. I don't remember having 2 CPU in my system...
My program (DLL) lauches a simulation program and is the main process on my computer. In other words, I'm using my computer only for that task, start DLL, launch a simulation program and calculate...I want full CPU usage for that task.
How can I use 100% of my CPU while lauching ma C++ program? I presume that my program would go faster!
My system is a Pentium(R) 4 CPU 3.2 GHz
Thanks
|
|
|
|
|
If you're checking the CPU Usage in the task manager and it's showing 50%, you're using way too much of your computer, in all likelihood.. you should try putting a few discreet sleep calls into your code to allow some process switching, it sounds like your program is hogging a lot of your computer resources. Unless you're writing a game or something that you intend to be used without any other programs running, 50% is a huge amount of processor power for one program to use.
|
|
|
|