Click here to Skip to main content
15,896,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SMTP server Pin
Vasudevan Deepak Kumar25-Nov-02 1:24
Vasudevan Deepak Kumar25-Nov-02 1:24 
GeneralADO conn.Open and L macro Pin
devvvy25-Nov-02 0:00
devvvy25-Nov-02 0:00 
GeneralRe: ADO conn.Open and L macro Pin
Christian Graus25-Nov-02 1:28
protectorChristian Graus25-Nov-02 1:28 
Generalactivex property initialisation Pin
Debs24-Nov-02 23:58
Debs24-Nov-02 23:58 
GeneralRe: activex property initialisation Pin
Heath Stewart25-Nov-02 2:38
protectorHeath Stewart25-Nov-02 2:38 
QuestionOne resource in more than one project? Pin
Anonymous24-Nov-02 22:38
Anonymous24-Nov-02 22:38 
AnswerRe: One resource in more than one project? Pin
Stephane Rodriguez.25-Nov-02 0:05
Stephane Rodriguez.25-Nov-02 0:05 
AnswerRe: One resource in more than one project? Pin
dima_t25-Nov-02 0:39
dima_t25-Nov-02 0:39 
AnswerRe: One resource in more than one project? Pin
KarstenK25-Nov-02 3:06
mveKarstenK25-Nov-02 3:06 
QuestionHow to write a Code Generator similar to Visual Studio Pin
aninddroy24-Nov-02 22:34
aninddroy24-Nov-02 22:34 
AnswerRe: How to write a Code Generator similar to Visual Studio Pin
Simon.W25-Nov-02 1:31
Simon.W25-Nov-02 1:31 
GeneralClosing already running instance Pin
suresh_sathya24-Nov-02 22:32
suresh_sathya24-Nov-02 22:32 
GeneralRe: Closing already running instance Pin
Roman Fadeyev24-Nov-02 23:33
Roman Fadeyev24-Nov-02 23:33 
GeneralRe: Closing already running instance Pin
suresh_sathya25-Nov-02 0:50
suresh_sathya25-Nov-02 0:50 
QuestionHow to use a DirectShow sample filter ? Pin
manio24-Nov-02 21:00
manio24-Nov-02 21:00 
AnswerRe: How to use a DirectShow sample filter ? Pin
Stephane Rodriguez.25-Nov-02 0:07
Stephane Rodriguez.25-Nov-02 0:07 
GeneralRe: How to use a DirectShow sample filter ? Pin
manio25-Nov-02 15:23
manio25-Nov-02 15:23 
GeneralRe: How to use a DirectShow sample filter ? Pin
Stephane Rodriguez.26-Nov-02 6:50
Stephane Rodriguez.26-Nov-02 6:50 
GeneralPorting from a NT to a '98 Pin
BlackRider24-Nov-02 20:43
BlackRider24-Nov-02 20:43 
I made a lil' app on a NT4.0 system. It works fine. But when I run my prog on a windows '98 it just didn't work. When I recompiled the prog on the '98 it worked fine. When I run it I get a c++ exception. Now, I don't think that's the big problem. The problem is that in a method like this:

void HTML::HTML_FileHeader(char* filename,char* pagehead,char* tableheader) {
fileout.open(filename,ios::trunc);
CString mesaj;
char text[100];
fileout<< "<html>\n"
"<head>\n"
"</head>\n"
"<body>\n"
"<h2 align=center>";
fileout<< pagehead;
mesaj.Format(" %d, data de %d",time.GetHour(),time.GetDay());
strcpy(text,(LPCTSTR)mesaj);
fileout<< text;
fileout<< "</h2><table border=1 align=center>\n"
"<tr>\n"
"<th>ORAS</th>\n";
fileout<< tableheader<<"</tr>\n";
}

doesn't work.
fileout.open(filename,ios::trunc); doesn't work. He doesn't like the (char *)filename. If i replace filename with the actual file that it has to open it works fine. This happens in every method of the class. He doesn't like getting that. If I debug it the content of filename is correct. This is very odd (to me).
When I create a new win32 console app and I open a file that way in the main function it works fine. !!!!
I also open databases from methods opendatabase(databasename). This also doesn't work until I replace the databasename with the actual db name "databasename".
What am I doing wrong ?????? Somebody knows anything about this problem ?

P.S. I get the c++ exception because I'm trying to open a db and since he doesn't like the arguments like that (see below) it doesn't work
DBDatabase = DBEngine.OpenDatabase ( text );
DBRecordset = Database.OpenRecordset((LPCTSTR)openstring,dbOpenDynaset,dbDenyWrite);

GeneralRe: Porting from a NT to a '98 Pin
KarstenK24-Nov-02 21:12
mveKarstenK24-Nov-02 21:12 
GeneralNot a solution Pin
BlackRider24-Nov-02 21:29
BlackRider24-Nov-02 21:29 
GeneralRe: Not a solution Pin
KarstenK24-Nov-02 21:43
mveKarstenK24-Nov-02 21:43 
GeneralRe: Not a solution Pin
Daniel Turini24-Nov-02 22:57
Daniel Turini24-Nov-02 22:57 
Generaldetect if user has admin privilege Pin
devvvy24-Nov-02 20:24
devvvy24-Nov-02 20:24 
GeneralRe: detect if user has admin privilege Pin
Daniel Turini24-Nov-02 21:09
Daniel Turini24-Nov-02 21:09 

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.