Subj : Re: How can I make a very large program run? To : borland.public.cpp.borlandcpp From : "Richard Hufford" Date : Tue Feb 10 2004 02:35 pm >Did you check the result of GetProfileString()? Does it return the >correct printer name when things fail? Yes, I checked the result of GetProfileString() and it does return the correct printer name. Also, the call to OpenPrinter() returns TRUE. I don't get an error until the first call to DocumentProperties(). I have an April 2000 version of the MSDN Library and it has a Knowledge Base article Q135387, which says that GetProfileString() is the best way to find the default printer, even if the profile is not stored on the WIN.INI file. In the past, I used the PrintDlg() function--Actually, I believe I used a TPrintDialog OWL object--but for users who did not have a printer installed, this caused the program to hang. GetProfileString() always returns. My method of getting the default printer seems to work, as long as the program is reasonably small. Is there any way to find out whether or not I have reached a limit of some sort and what that limit might be? .