Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: definition file? Pin
bmzhao12-Dec-04 14:18
bmzhao12-Dec-04 14:18 
Generaltable like structure(multiple collumns) Pin
Spiritofamerica12-Dec-04 9:46
Spiritofamerica12-Dec-04 9:46 
GeneralRe: table like structure(multiple collumns) Pin
PJ Arends12-Dec-04 10:17
professionalPJ Arends12-Dec-04 10:17 
GeneralRe: table like structure(multiple collumns) Pin
lisoft12-Dec-04 13:55
lisoft12-Dec-04 13:55 
GeneralRe: table like structure(multiple collumns) Pin
bmzhao12-Dec-04 14:11
bmzhao12-Dec-04 14:11 
GeneralCEdit select text highlight Pin
Anonymous12-Dec-04 8:26
Anonymous12-Dec-04 8:26 
GeneralRe: CEdit select text highlight Pin
PJ Arends12-Dec-04 9:14
professionalPJ Arends12-Dec-04 9:14 
QuestionCannot ever open fstream object in DLL? Pin
registering12-Dec-04 8:23
registering12-Dec-04 8:23 
Howdy all,
First off this board is great, thanks for everyone who helped me earlier.
I'm explicitly loading a DLL and constructing an object of type CTestDLL. In this class's constructor is the following code:

CTestDLL::CTestDLL()
{
fstream outfile;
cerr << "constructed";
outfile.open("c:\test.log", ios::app);
if (!outfile)
{
cerr << "could not open file";
exit(1);
}
}

It always fails to open, but the constructor's definitely being called. In addition to failing to open, I always get "the instruction at 0x00000000 referenced memory at 0x00000000. The memory could not be read".

I've tried creating the file manually, then trying to open it, with no luck. I've tried casting the const char* to a (LPCTSTR), using a CString, making the whole class visible, or just the individual methods (constructor/destructor) visible, all with the same results and same error.

Any ideas? I've googled and found others with the same problem, but unfortunately no answers. If I take the fstream code out the object contructs fine, but the fstream seems to muck things up.
AnswerRe: Cannot ever open fstream object in DLL? Pin
bmzhao12-Dec-04 14:04
bmzhao12-Dec-04 14:04 
GeneralRe: Cannot ever open fstream object in DLL? Pin
registering12-Dec-04 14:31
registering12-Dec-04 14:31 
GeneralConfused by the &quot;Mapping Mode&quot; Pin
LiYS12-Dec-04 4:41
LiYS12-Dec-04 4:41 
GeneralRe: Confused by the &quot;Mapping Mode&quot; Pin
PJ Arends12-Dec-04 9:55
professionalPJ Arends12-Dec-04 9:55 
GeneralPrinting Output Pin
BRIMID12-Dec-04 4:14
BRIMID12-Dec-04 4:14 
GeneralRe: Printing Output Pin
PJ Arends12-Dec-04 9:31
professionalPJ Arends12-Dec-04 9:31 
GeneralRe: Printing Output Pin
BRIMID12-Dec-04 14:01
BRIMID12-Dec-04 14:01 
Questionis this kind icon in an exe file possible? Pin
includeh1012-Dec-04 4:05
includeh1012-Dec-04 4:05 
AnswerRe: is this kind icon in an exe file possible? Pin
PJ Arends12-Dec-04 9:20
professionalPJ Arends12-Dec-04 9:20 
Generalras &quot;error 632&quot; Pin
mohsen nourian12-Dec-04 3:52
mohsen nourian12-Dec-04 3:52 
GeneralYahoo Messenger Pin
Member 141138912-Dec-04 3:08
Member 141138912-Dec-04 3:08 
GeneralBUG: ScrollWindowEx smoothscrolling, Child windows are drawn displaced Pin
Nalik12-Dec-04 2:03
Nalik12-Dec-04 2:03 
GeneralUpdateResource() ------ 2 Pin
includeh1012-Dec-04 0:49
includeh1012-Dec-04 0:49 
GeneralUpdateResource function Pin
includeh1012-Dec-04 0:29
includeh1012-Dec-04 0:29 
QuestionHow can I change focus between child windows within an MDI application Pin
wicked_guy12-Dec-04 0:16
wicked_guy12-Dec-04 0:16 
QuestionDid I miss something? Pin
jw8111-Dec-04 23:18
jw8111-Dec-04 23:18 
AnswerRe: Did I miss something? Pin
*Dreamz12-Dec-04 19:01
*Dreamz12-Dec-04 19:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.