Click here to Skip to main content
15,920,383 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Executable application Pin
Maximilien7-Dec-07 5:26
Maximilien7-Dec-07 5:26 
GeneralRe: Executable application Pin
llp00na7-Dec-07 5:29
llp00na7-Dec-07 5:29 
GeneralRe: Executable application Pin
Eytukan7-Dec-07 5:30
Eytukan7-Dec-07 5:30 
GeneralRe: Executable application Pin
llp00na7-Dec-07 6:01
llp00na7-Dec-07 6:01 
QuestionCode structure Pin
chanduabcchandu7-Dec-07 0:48
chanduabcchandu7-Dec-07 0:48 
GeneralRe: Code structure Pin
CPallini7-Dec-07 1:18
mveCPallini7-Dec-07 1:18 
GeneralRe: Code structure Pin
KarstenK7-Dec-07 2:54
mveKarstenK7-Dec-07 2:54 
GeneralRe: Code structure Pin
James R. Twine7-Dec-07 4:13
James R. Twine7-Dec-07 4:13 
chanduabcchandu wrote:
struct tagMystruct
{
    char *name;
    int  nameLength;
    char *disign;
    int  disgLength;
...}

   Yes, you can do that since you mention that it is a "C" project, hence no C++ code.  If you can build the project in C++, you can then use string objects (MFC's CString, STL's std::string) that will handle the memory allocations for you as well as supply methods for assignment, concatenation/appending, etc.

   If you have to stick with the manually-managed buffers, be sure that when calling the string-related functions, you take care to use the n versions of the functions, like strncpy(...), so that you can help protect yourself from buffer overruns.

   Peace!

-=- James
Please rate this message - let me know if I helped or not!<hr></hr>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles



GeneralRe: Code structure Pin
Eytukan7-Dec-07 5:27
Eytukan7-Dec-07 5:27 
GeneralNot Able to Get Message Pin
paresh_joe7-Dec-07 0:27
paresh_joe7-Dec-07 0:27 
GeneralRe: Not Able to Get Message Pin
Hamed Musavi7-Dec-07 1:19
Hamed Musavi7-Dec-07 1:19 
GeneralRe: Not Able to Get Message Pin
paresh_joe7-Dec-07 2:24
paresh_joe7-Dec-07 2:24 
GeneralRe: Not Able to Get Message [modified] Pin
Hamed Musavi7-Dec-07 3:20
Hamed Musavi7-Dec-07 3:20 
GeneralRe: Not Able to Get Message Pin
paresh_joe9-Dec-07 18:00
paresh_joe9-Dec-07 18:00 
GeneralBig Project with many resources distributed over many dll's [modified] Pin
Tomerland7-Dec-07 0:07
Tomerland7-Dec-07 0:07 
GeneralRe: Big Project with many resources distributed over many dll's Pin
Hamed Musavi7-Dec-07 1:30
Hamed Musavi7-Dec-07 1:30 
GeneralRe: Big Project with many resources distributed over many dll's Pin
Tomerland7-Dec-07 1:56
Tomerland7-Dec-07 1:56 
QuestionHow to attach a Dialog to a SDI Application Pin
msr_codeproject6-Dec-07 23:47
msr_codeproject6-Dec-07 23:47 
AnswerRe: How to attach a Dialog to a SDI Application Pin
toxcct7-Dec-07 0:18
toxcct7-Dec-07 0:18 
GeneralUnmanaged Memory Profiler Pin
Jeffrey Walton6-Dec-07 23:36
Jeffrey Walton6-Dec-07 23:36 
GeneralRe: Unmanaged Memory Profiler Pin
James R. Twine7-Dec-07 4:14
James R. Twine7-Dec-07 4:14 
GeneralRe: Unmanaged Memory Profiler Pin
Bram van Kampen7-Dec-07 11:23
Bram van Kampen7-Dec-07 11:23 
GeneralRe: Unmanaged Memory Profiler Pin
Bram van Kampen7-Dec-07 11:25
Bram van Kampen7-Dec-07 11:25 
GeneralRe: Unmanaged Memory Profiler Pin
Jeffrey Walton7-Dec-07 15:45
Jeffrey Walton7-Dec-07 15:45 
GeneralRe: Unmanaged Memory Profiler Pin
Mike Dimmick7-Dec-07 16:38
Mike Dimmick7-Dec-07 16:38 

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.