Click here to Skip to main content
15,905,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CStringList to LPTSTR[] Pin
azusakt4-Feb-08 23:09
azusakt4-Feb-08 23:09 
GeneralRe: CStringList to LPTSTR[] Pin
CPallini4-Feb-08 23:17
mveCPallini4-Feb-08 23:17 
GeneralRe: CStringList to LPTSTR[] Pin
azusakt4-Feb-08 23:25
azusakt4-Feb-08 23:25 
GeneralRe: CStringList to LPTSTR[] Pin
CPallini4-Feb-08 23:39
mveCPallini4-Feb-08 23:39 
GeneralRe: CStringList to LPTSTR[] Pin
Cedric Moonen4-Feb-08 23:03
Cedric Moonen4-Feb-08 23:03 
GeneralRe: CStringList to LPTSTR[] Pin
azusakt4-Feb-08 23:08
azusakt4-Feb-08 23:08 
GeneralRe: CStringList to LPTSTR[] Pin
CPallini4-Feb-08 23:32
mveCPallini4-Feb-08 23:32 
GeneralRe: CStringList to LPTSTR[] Pin
Cedric Moonen4-Feb-08 23:37
Cedric Moonen4-Feb-08 23:37 
I think you didn't really understand what the function accept: the function doesn't accept an array of strings, but one single string (and the count argument is the size of this string). So, you need to pass each string separately. Basically, what you'll need to do is loop through your string array, create a LPTSTR array of the size of the string and pass it to your function, then delete it.

That's completely stupid because if your previous team would have been smart enough so that they passed the string as a constant (LPCTSTR instead of a LPTSTR), then you wouldn't have to create a new string buffer, copy the string in it, pass it to the function and delete it. You would just have to pass the CString object (and it would have been automatically converted).


Oops, I forgot the [] after the first argument Unsure | :~ . So, forget what I said...

Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: CStringList to LPTSTR[] Pin
CPallini4-Feb-08 23:58
mveCPallini4-Feb-08 23:58 
GeneralPush Button Pin
Pruthvi.gm4-Feb-08 22:48
Pruthvi.gm4-Feb-08 22:48 
GeneralRe: Push Button Pin
pierre_ribery4-Feb-08 23:12
pierre_ribery4-Feb-08 23:12 
GeneralRe: Push Button Pin
Pruthvi.gm4-Feb-08 23:27
Pruthvi.gm4-Feb-08 23:27 
GeneralTo resize the code section of a PE file Pin
zon_cpp4-Feb-08 22:43
zon_cpp4-Feb-08 22:43 
GeneralRe: To resize the code section of a PE file Pin
Iain Clarke, Warrior Programmer5-Feb-08 0:53
Iain Clarke, Warrior Programmer5-Feb-08 0:53 
GeneralRe: To resize the code section of a PE file Pin
zon_cpp5-Feb-08 1:32
zon_cpp5-Feb-08 1:32 
GeneralOT Pin
CPallini5-Feb-08 2:32
mveCPallini5-Feb-08 2:32 
GeneralRe: To resize the code section of a PE file Pin
Stephen Hewitt5-Feb-08 1:01
Stephen Hewitt5-Feb-08 1:01 
GeneralRe: To resize the code section of a PE file Pin
zon_cpp5-Feb-08 1:36
zon_cpp5-Feb-08 1:36 
GeneralRe: To resize the code section of a PE file Pin
Stephen Hewitt5-Feb-08 11:58
Stephen Hewitt5-Feb-08 11:58 
GeneralRe: To resize the code section of a PE file Pin
CPallini5-Feb-08 2:36
mveCPallini5-Feb-08 2:36 
QuestionHow to access a variable declared in other class Pin
hari prasad sathpadi4-Feb-08 22:39
hari prasad sathpadi4-Feb-08 22:39 
AnswerRe: How to access a variable declared in other class Pin
CPallini4-Feb-08 22:52
mveCPallini4-Feb-08 22:52 
AnswerRe: How to access a variable declared in other class Pin
Hamid_RT5-Feb-08 1:04
Hamid_RT5-Feb-08 1:04 
GeneralRe: How to access a variable declared in other class Pin
CPallini5-Feb-08 2:02
mveCPallini5-Feb-08 2:02 
GeneralRe: How to access a variable declared in other class Pin
Hamid_RT5-Feb-08 4:21
Hamid_RT5-Feb-08 4:21 

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.