Click here to Skip to main content
15,892,575 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Excel Automation Using C++ #import Pin
Roger Stoltz15-Nov-06 5:47
Roger Stoltz15-Nov-06 5:47 
GeneralRe: Excel Automation Using C++ #import Pin
Doug Knudson15-Nov-06 6:39
Doug Knudson15-Nov-06 6:39 
GeneralRe: Excel Automation Using C++ #import Pin
Roger Stoltz15-Nov-06 6:57
Roger Stoltz15-Nov-06 6:57 
QuestionHow can we get size of the File.... Pin
Anamika200515-Nov-06 5:05
Anamika200515-Nov-06 5:05 
AnswerRe: How can we get size of the File.... Pin
VonHagNDaz15-Nov-06 6:22
VonHagNDaz15-Nov-06 6:22 
GeneralRe: How can we get size of the File.... Pin
Anamika200515-Nov-06 19:51
Anamika200515-Nov-06 19:51 
GeneralRe: How can we get size of the File.... Pin
Anamika200515-Nov-06 19:52
Anamika200515-Nov-06 19:52 
Questionarray of pointers Pin
thathvamsi15-Nov-06 4:46
thathvamsi15-Nov-06 4:46 
Hi all,
thanks all (cedric,toxxct,and brainley) for ur help. This is in response to my post some 5hrs ago.
I do in C. I have corrected the code and i get no warnings now. but i would like to know if the following way of coding and passing the address of the first pointer to funcB is threadsafe in multithreaded environment.
is the follwing way of coding correct?Any help?


funcA{
char * Names[] = {};
int next = 0;
char * list = "Abc";


Names[ next ] = malloc( sizeof( char )*( strlen( list ) + 1 ) );
memcpy( Names[ next ],list,sizeof( char )*( strlen( list ) + 1 ) );

list = "cdefg";
Names[ next+1 ] = malloc( sizeof( char )*( strlen( list ) + 1 ) );
memcpy( Names[ next+1 ],list,sizeof( char )*( strlen( list ) + 1 ) );

printf("vsp list got is %s\n", Names[0] );
printf("vsp list got is %s\n", Names[1] );

funcB(....,...,(const char**)&Names);
}

funcB(...,...,const char ** names)
{
....
//the actual values names[0] and names[1] are to be accessed and used.
...
//free names[0] and names[1]
free( (char*)names[0]);
free( (char*)names[1]);

}

AnswerRe: array of pointers Pin
led mike15-Nov-06 5:17
led mike15-Nov-06 5:17 
GeneralRe: array of pointers Pin
thathvamsi15-Nov-06 14:37
thathvamsi15-Nov-06 14:37 
GeneralRe: array of pointers Pin
led mike16-Nov-06 8:34
led mike16-Nov-06 8:34 
QuestionCOM Dialog Compile Error Pin
jon_fallon15-Nov-06 4:44
jon_fallon15-Nov-06 4:44 
AnswerRe: COM Dialog Compile Error Pin
Mark Salsbery15-Nov-06 7:09
Mark Salsbery15-Nov-06 7:09 
GeneralRe: COM Dialog Compile Error Pin
jon_fallon15-Nov-06 9:53
jon_fallon15-Nov-06 9:53 
QuestionHow to retrieve the memory information Pin
cy163@hotmail.com15-Nov-06 4:05
cy163@hotmail.com15-Nov-06 4:05 
AnswerRe: How to retrieve the memory information Pin
Programm3r15-Nov-06 4:16
Programm3r15-Nov-06 4:16 
GeneralRe: How to retrieve the memory information Pin
David Crow15-Nov-06 4:27
David Crow15-Nov-06 4:27 
GeneralRe: How to retrieve the memory information Pin
Programm3r15-Nov-06 4:33
Programm3r15-Nov-06 4:33 
QuestionRe: How to retrieve the memory information Pin
David Crow15-Nov-06 4:23
David Crow15-Nov-06 4:23 
AnswerRe: How to retrieve the memory information Pin
Viorel.15-Nov-06 4:43
Viorel.15-Nov-06 4:43 
QuestionHow to test for a Bad Ptr "0xcccccccc" Pin
Programm3r15-Nov-06 3:18
Programm3r15-Nov-06 3:18 
AnswerRe: How to test for a Bad Ptr "0xcccccccc" Pin
Cedric Moonen15-Nov-06 3:21
Cedric Moonen15-Nov-06 3:21 
GeneralRe: How to test for a Bad Ptr "0xcccccccc" Pin
Programm3r15-Nov-06 3:23
Programm3r15-Nov-06 3:23 
QuestionRe: How to test for a Bad Ptr "0xcccccccc" Pin
Programm3r15-Nov-06 3:38
Programm3r15-Nov-06 3:38 
AnswerRe: How to test for a Bad Ptr "0xcccccccc" Pin
Maximilien15-Nov-06 3:43
Maximilien15-Nov-06 3:43 

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.