Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: detect if user has admin privilege Pin
devvvy24-Nov-02 21:47
devvvy24-Nov-02 21:47 
GeneralRe: detect if user has admin privilege Pin
Daniel Turini24-Nov-02 22:06
Daniel Turini24-Nov-02 22:06 
GeneralCreating a window in an ATL without MFC Pin
Jerome Conus24-Nov-02 20:19
Jerome Conus24-Nov-02 20:19 
GeneralRe: Creating a window in an ATL without MFC Pin
Daniel Turini24-Nov-02 22:12
Daniel Turini24-Nov-02 22:12 
GeneralPreTranslateMessage question Pin
Mel Feik24-Nov-02 19:45
Mel Feik24-Nov-02 19:45 
GeneralRe: PreTranslateMessage question Pin
Christian Graus24-Nov-02 20:21
protectorChristian Graus24-Nov-02 20:21 
GeneralRe: PreTranslateMessage question Pin
Mel Feik24-Nov-02 20:39
Mel Feik24-Nov-02 20:39 
GeneralRe: PreTranslateMessage question Pin
Christian Graus24-Nov-02 20:46
protectorChristian Graus24-Nov-02 20:46 
GeneralRe: PreTranslateMessage question Pin
Christian Graus24-Nov-02 20:51
protectorChristian Graus24-Nov-02 20:51 
GeneralRe: PreTranslateMessage question Pin
Mel Feik24-Nov-02 21:05
Mel Feik24-Nov-02 21:05 
GeneralRe: PreTranslateMessage question Pin
Cosmin Marin25-Nov-02 0:52
Cosmin Marin25-Nov-02 0:52 

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.