i wana program in mfc that read from text file and do it an lexical analysis in compiler stage put the integer in list & key word in list & operation in list & real number in list & constant in list and punctuation in list
if any one can help send me email and i will send him the ER diagram
i might misread you but if i'am right you would like to write some kind of lexical analysis in mfc, don't you?
Well i can't serve with an mfc lexical analysis but during my studies i had to program a compiler for a so called language pl/0, which is kind of a pascal dialect. My solution does a lexical & syntax analysis and even produces code for a small virtual machine. It is all written in C, but really straight forward and perhaps useful for you.
If this isn't exactly what you have been looking for, then just ignore my reply.
You may search in google for flex. flex is an open source generator for lexical analysis. It is written in C but als has a C++ version. Lats time I used it I had quite some trouble to get it compiled using VC++, but maybe its improved. It saves you al lot of work and you can easily integrate it in your code
Working on converting a 32-bit server application to a x64 executable for performance comparision, but there is something wrong with the application or it's settings and I'm beginning to run out of ideas.
The project runs great in 32-bit.
It's a C++ application that has dll-files which I personally compile in 64-bit, shouldn't be any other except systme files.
Checking dependencies and they should all be 64-bit according to Dependency Walker.
It compiles without problems, gives a few warnings but that's no big deal since they are all related to 32-64 bit conversion and none should be of any relevance to this problem.
But, when I try to run or debug the 64-bit version I immediately get an error, Unable to start application. "This application has failed because the application configuration is incorrect. Review the manifest file for possible
errors. Reinstalling the application may fix this problem." No matter how early in the app I set any breakpoint I can't reach it... yet it doesn't seem to be any regular link error. The application config is the same as for the 32-bit version except that necessary x64-settings are changed is VS2005 project settings.
I'm currently running out of ideas, trying to find any tips out on the net and if I don't find anything I'll probably have to start up the whole project from scratch again... although the code would still be written it's a small mess since I didn't create the project earlier and I'm not 100% sure of all the project settings.
If anyone can confirm that these things shouldn't have anything to do with the problem I would be happy, or even better if you have any great tip for me:
The project was previously setup in VS2003 and VS2005_BETA, now I'm running VS2005 Pro
I'm currently running it through Terminal Server on a x64 Server 2003, using a regular WinXP as workstation to connect with.
am implementing drag and drop in i dialog that contains shapes drawn on it.
am doing it the ole way, am handling the WM_LBUTTONDOWN message to start the drag and drop operation
also am handling the WM_LBUTTONUP to stop dragging
the problem is that when i click first time on the dialog i get in the drag mode but the mouse up code is not called
the next click it is called
the next time it is not
and so on..........
I'm using some CDialogBars in my Application. If they are floating and I click the close-button the controls on the bar disappear. But the window containing the bar remains on screen.
It disappears only when dragging the empty window on a position where it could dock.
Using exactly the same dialogbar in an example application worked fine.
Does anyone have an idea why it behaves like this?
I am trying to disable some menu items in a menu. I am successful in getting the menu items disabled using the function SetMenuItemInfo; but when the menu refreshes the items are re-enabled and I don't want that. Is there anything that I can do to disable menu items from refresh or recreate of the menu?
What happens is I select submenu item from the 'Tool' Menu and it refreshes or recreates the main menu. At that point the sub menu items I disabled in the 'File' Menu are re-enabled. Does that make sense?
if the thread isnt successful in 3secs (using WaitForSingleObject(pThread->m_hThread, 3000)) it is closed.
what is the best way of killing a thread from outside the thread, i am using TerminateThread() but i dont think this is the best way??
it appears thou that the calls in the thread are not being killed off because if i go to start the thread again CoInitializeSecurity() throws up an error saying that it cant initialize security. so iam assuming it is saying this because the thread wasnt killed off right
A kind of related problem i have is with the code below. This is a part of the code the thread executes, if sucessful all is ok. this thread has a timeout of 3secs. A problem is that the ConnectServer call below takes 2minutes to complete if it cant connect. when this happens the below messagebox pops ups and then the program crashes. is it crashing because the code wants to "return" but there is nothing to return to as the thread has been already killed?? How can i modify it so that it wont crash. A message box doesnt have to be displayed either.