Click here to Skip to main content
16,008,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Cannot get SW_HIDE to work on Internet Explorer Pin
Ravi Bhavnani19-Aug-02 11:54
professionalRavi Bhavnani19-Aug-02 11:54 
GeneralRe: Cannot get SW_HIDE to work on Internet Explorer Pin
Ranjan Banerji20-Aug-02 7:14
Ranjan Banerji20-Aug-02 7:14 
GeneralRe: Cannot get SW_HIDE to work on Internet Explorer Pin
Ravi Bhavnani20-Aug-02 7:32
professionalRavi Bhavnani20-Aug-02 7:32 
GeneralUrgent! A release version problem Pin
david fox19-Aug-02 10:18
david fox19-Aug-02 10:18 
GeneralRe: Urgent! A release version problem Pin
Max Santos19-Aug-02 10:24
Max Santos19-Aug-02 10:24 
GeneralRe: Urgent! A release version problem Pin
Neville Franks19-Aug-02 10:37
Neville Franks19-Aug-02 10:37 
GeneralRe: Urgent! A release version problem Pin
david fox19-Aug-02 18:01
david fox19-Aug-02 18:01 
GeneralRe: Urgent! A release version problem Pin
Neville Franks19-Aug-02 18:35
Neville Franks19-Aug-02 18:35 
Well there are some obvious problems which jump out at me.

First:
david fox wrote:
char lpBuffer[80];
GetCurrentDirectory(80, lpBuffer);


Will trash memory whenever the current directory is >= 80 characters. This is because you aren't leaving room for the terminating '\0' in the string. I'd recomend never using hard coded sizes like 80 in function calls. Instead use sizeof( whatever )-1. You should really be using _MAX_PATH here anyway.


david fox wrote:
sprintf(File,"%s\\%s", dir, FileName);

is another disaster waiting to happen. Who says 'dir + Filename' will fit into File?

Not testing the success or otherwise of functions like chdir(), GetCurrentDirectory() etc. is also bad practice.

If you build your release code with Debug info, you can simply jump into the debugger and see precisely where the error is. I'm sure that's mentioned in the article I mentioned.

Neville Franks, Author of ED for Windows. www.getsoft.com
GeneralRe: Urgent! A release version problem Pin
jhwurmbach19-Aug-02 22:00
jhwurmbach19-Aug-02 22:00 
Generaldirectory browser Pin
ns19-Aug-02 10:17
ns19-Aug-02 10:17 
GeneralRe: directory browser Pin
Tomasz Sowinski19-Aug-02 10:16
Tomasz Sowinski19-Aug-02 10:16 
GeneralRe: directory browser Pin
Renjith Ramachandran19-Aug-02 10:23
Renjith Ramachandran19-Aug-02 10:23 
GeneralRe: directory browser Pin
ns19-Aug-02 10:41
ns19-Aug-02 10:41 
GeneralRe: directory browser Pin
Ravi Bhavnani19-Aug-02 11:48
professionalRavi Bhavnani19-Aug-02 11:48 
GeneralRe: directory browser Pin
ns20-Aug-02 1:47
ns20-Aug-02 1:47 
GeneralRe: directory browser Pin
ns20-Aug-02 2:15
ns20-Aug-02 2:15 
GeneralRe: directory browser Pin
Ravi Bhavnani20-Aug-02 4:37
professionalRavi Bhavnani20-Aug-02 4:37 
GeneralSTL vector push_back( ) copy c'stor question Pin
JohnnyG19-Aug-02 10:05
JohnnyG19-Aug-02 10:05 
GeneralRe: STL vector push_back( ) copy c'stor question Pin
Tomasz Sowinski19-Aug-02 10:15
Tomasz Sowinski19-Aug-02 10:15 
GeneralRe: STL vector push_back( ) copy c'stor question Pin
Stuart Dootson19-Aug-02 14:17
professionalStuart Dootson19-Aug-02 14:17 
GeneralRe: STL vector push_back( ) copy c'stor question Pin
JohnnyG20-Aug-02 4:25
JohnnyG20-Aug-02 4:25 
GeneralWinsock: Socket disconnection Pin
Le centriste19-Aug-02 9:37
Le centriste19-Aug-02 9:37 
GeneralRe: Winsock: Socket disconnection Pin
Ernest Laurentin19-Aug-02 9:52
Ernest Laurentin19-Aug-02 9:52 
GeneralRe: Winsock: Socket disconnection Pin
unregistered19-Aug-02 19:49
unregistered19-Aug-02 19:49 
GeneralToolbar in Internet Explorer Pin
Tzoockee19-Aug-02 9:22
Tzoockee19-Aug-02 9:22 

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.