I am currently working on a mid-scale project and compiling and linking worked perfect until now. I played around with my resource files and the linker won't eat my object files anymore:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I already deleted the resource file, the resource header and made them new about 5 times, I removed all possibly deprecated object and pch files and restartet Visual Studio countless times, but it still won't work.
Never seen that before, I can only assume there is some corruption elsewhere on your system. Looking at some of the Google finds for that Link error I noticed a number that suggested either a system restore, or the use of a special recovery tool or both. you may wish to research some of those suggestions yourself. As a last resort you can always try the Microsoft Development Q&A - I don't have the address but I have used it in the past and got some useful feedback.
i try to open a *.chm File with a HtmlHelp() API this part works if i want to go to specific topic this all works fine.
I have a problem if i want to open my *.chm file with a HH_DISPLAY_SEARCH option.
I open my file and the "search" tab is selected, but search routine is not started?
On MSDN site http://support.microsoft.com/kb/241381[^] says that this don't work yet.
Does any one know a alternative for this?
Or is there any way to do this with hh.exe and "mk:@MSITStore:"??
Be very careful about using this sort of thing - as others have mentioned it's probable that your design isn't quite what you think it is (for example setting things of multiple types through an interface).
Good luck though and nice to see someone actually using <algorithm> in their work!
Of course you can do it at run-time, just create the CComboBox by hand. Then you can set it when you call CComboBox::Create(). If on the other hand, you mean can you change it after you've created the CComboBox, not sure, but do you really need that capability?
Thank you for your answer, I realise that I thought wrong the program ... I have not create CComboBox control dinamically (with Create), I put it on a dialog, setup manually the style (CBS_DROPWDOWN), and I was wonder if some condition is true, to modify the style on InitialUpdate ...
The CAsyncSocket class and the CWinThread class you put it in have little to do with each other by default, when it gets created depends on where you put it. You have to show us your code for us to be able to be more helpful with your issue.
Casynsocket derived is a member of CWinThread dervied I figure by the time it hits ::initinstance it will be created meaning "CAsynSocket" object
going back back to another thread I created regarding exceptions
if implement a catch for a derived CInternetExeption I am assuming CInternetException would catch socket errors
along with having a EnableStatusCallback procedure I be able to get more specfic information on the type of exception I am dealing with do any the create parms have bad ptrs that would be a memory exception or is it internet/socket exception
I want to recognize tables inside PDF, now I have rectangles of the PDF Text Objecthttp://i.stack.imgur.com/aHK3Q.png(the red rectangles in the picture).I'm confused about how to implement this rectangle algorithm. The programming language what I use is VC++.
The Result is a perfect table with header, rows, columns.Can anyone help me? How to rectangle table from these rectangles? These rectangles' orginal point (0, 0) is on the bottom-left point. x coordinate grow from left to right, and y coordinate grow from bottom to up.I don't want to use 3rd party. I want to implement this function through rectangle algorithm.
PDF content is held in a codified format inside the file and the information about how to render it to a display device is kept with the data. You can either use one of the many free libraries available on the internet or, if you do not want to use a third-party library, you need to get a copy of the PDF specification from Adobe[^] and write your own handler.
A catch clause will cath the specified exception and any derived exception.
In practice, if you don't write library for others, you rarely have to throw your own exception (and even less to catch them).
Generally you don't have to use exception handler and you should not have too much throw or catch in your code as exception are typically used for things that should not occurs.
MSDN documentation (and Google) are more complete documentation. It is not easy to explain it in a paragraph or two.
MFC and Visual C++ exception handling have some difference with standard C++ exceptions. For example catch ... will catch Win32 exceptions, MFC exceptions are thrown by pointer and exception specification is not implemented.
Somebody will throw the ball and somebody should catch it. So you should know the possibility of piece of code that throws and should decide where to catch and what exactly to catch.
Say, if you place a try and catch block on the main() or Win main, and leave the catch block empty or look for a more generic CException, all the exception can be caught if it is not handled by the called functions. Which is bad in a big application with millions of code.
So define the try..catch to a narrow down piece of code, and catch the specific exception say filenotfound exception should caught from the piece of code that opens a file.
Adding to David's reply, if you have one exception derived (subclassed) from another one in the list, put the catch for the derived (more specific) exception first or you'll never get to it. For example, catch divide-by-zero before arithmetic-exception.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
the scenario is like that: thread 1 invokes and creates thread 2 which monitors some data, using pthread_create with PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DEFERRED, then when thread 1 finishes his job it cancels thread 2 using pthread_cancel and everything is working fine, but the problem is that it seems that the threads are dead but still connected to the main projcess. I am usin QNX OS which is a BSD flavor, same as Unix,
It has been a long time since I used QNX, however what follows applies to all kernels and operating systems AFAIK:
- cancelling a thread often is unreliable; in general you don't know what state the thread and its data is in when you issue the cancel command, so you could end up with inconsistent data, with locked resources, etc.
- the better approach is "cooperative termination", where the thread's code helps in the thread either keeping active or exiting regularly.
So what I prefer to do in a monitoring thread typically looks like this (pseudo-code):
do whatever is needed for monitoring
wait a while
and when the caller wants it to terminate, just have it set the global boolean "enough" to true, the monitoring thread will exit (although not immediately, but that most often is OK).