Click here to Skip to main content
15,891,567 members
Home / Discussions / C#
   

C#

 
GeneralRe: help Pin
BillWoodruff16-Dec-11 18:12
professionalBillWoodruff16-Dec-11 18:12 
AnswerRe: help Pin
Pete O'Hanlon16-Dec-11 23:38
mvePete O'Hanlon16-Dec-11 23:38 
AnswerRe: help Pin
#realJSOP17-Dec-11 3:04
mve#realJSOP17-Dec-11 3:04 
GeneralReason for my vote of 1 Pin
Manfred Rudolf Bihy17-Dec-11 15:21
professionalManfred Rudolf Bihy17-Dec-11 15:21 
GeneralRe: Reason for my vote of 1 PinPopular
#realJSOP18-Dec-11 0:57
mve#realJSOP18-Dec-11 0:57 
AnswerRe: help Pin
AmitGajjar17-Dec-11 7:22
professionalAmitGajjar17-Dec-11 7:22 
Questionunmanaged - returning arrays Pin
Mark H Bishop16-Dec-11 12:26
Mark H Bishop16-Dec-11 12:26 
AnswerRe: unmanaged - returning arrays Pin
Luc Pattyn16-Dec-11 15:08
sitebuilderLuc Pattyn16-Dec-11 15:08 
Two comments apply here:

1.
your native code stinks. You are allocating an array on the stack, then returning its pointer. You should be aware whatever was on the stack is going to vanish as soon as the function terminates, so you should never do that, whatever the language is you are using.

2.
when you want to exchange large amounts of data between managed and unmanaged worlds, it is much much simpler to always have the memory allocated on the managed side: making the native world accept managed data is a lot easier than convincing the managed world it should accept native data. I did explain passing arrays in my little article here[^].

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 4:08
Mark H Bishop17-Dec-11 4:08 
GeneralRe: unmanaged - returning arrays Pin
Luc Pattyn17-Dec-11 4:22
sitebuilderLuc Pattyn17-Dec-11 4:22 
GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 7:22
Mark H Bishop17-Dec-11 7:22 
AnswerRe: unmanaged - returning arrays Pin
Luc Pattyn17-Dec-11 7:40
sitebuilderLuc Pattyn17-Dec-11 7:40 
GeneralRe: unmanaged - returning arrays Pin
harold aptroot17-Dec-11 5:13
harold aptroot17-Dec-11 5:13 
GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 7:16
Mark H Bishop17-Dec-11 7:16 
GeneralRe: unmanaged - returning arrays Pin
Mark H Bishop17-Dec-11 7:29
Mark H Bishop17-Dec-11 7:29 
QuestionCoolest way to do this string operation? Pin
SledgeHammer0116-Dec-11 11:23
SledgeHammer0116-Dec-11 11:23 
AnswerRe: Coolest way to do this string operation? Pin
PIEBALDconsult16-Dec-11 11:34
mvePIEBALDconsult16-Dec-11 11:34 
GeneralRe: Coolest way to do this string operation? Pin
SledgeHammer0116-Dec-11 11:44
SledgeHammer0116-Dec-11 11:44 
GeneralRe: Coolest way to do this string operation? Pin
PIEBALDconsult16-Dec-11 11:52
mvePIEBALDconsult16-Dec-11 11:52 
GeneralRe: Coolest way to do this string operation? Pin
SledgeHammer0116-Dec-11 12:06
SledgeHammer0116-Dec-11 12:06 
GeneralRe: Coolest way to do this string operation? Pin
Not Active16-Dec-11 13:54
mentorNot Active16-Dec-11 13:54 
AnswerRe: Coolest way to do this string operation? Pin
AspDotNetDev16-Dec-11 11:50
protectorAspDotNetDev16-Dec-11 11:50 
GeneralRe: Coolest way to do this string operation? Pin
PIEBALDconsult16-Dec-11 11:57
mvePIEBALDconsult16-Dec-11 11:57 
AnswerRe: Coolest way to do this string operation? Pin
AspDotNetDev16-Dec-11 12:05
protectorAspDotNetDev16-Dec-11 12:05 
AnswerRe: Coolest way to do this string operation? Pin
harold aptroot16-Dec-11 12:16
harold aptroot16-Dec-11 12:16 

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.