Click here to Skip to main content
15,897,519 members
Home / Discussions / C#
   

C#

 
QuestionJPEG Decoder\Encoder in C# Pin
Gilad Kapelushnik12-Aug-09 4:47
Gilad Kapelushnik12-Aug-09 4:47 
AnswerRe: JPEG Decoder\Encoder in C# Pin
0x3c012-Aug-09 4:54
0x3c012-Aug-09 4:54 
GeneralRe: JPEG Decoder\Encoder in C# Pin
Gilad Kapelushnik12-Aug-09 5:01
Gilad Kapelushnik12-Aug-09 5:01 
AnswerRe: JPEG Decoder\Encoder in C# Pin
Dave Kreskowiak12-Aug-09 4:57
mveDave Kreskowiak12-Aug-09 4:57 
GeneralRe: JPEG Decoder\Encoder in C# Pin
Gilad Kapelushnik12-Aug-09 5:04
Gilad Kapelushnik12-Aug-09 5:04 
GeneralRe: JPEG Decoder\Encoder in C# Pin
Dave Kreskowiak12-Aug-09 6:25
mveDave Kreskowiak12-Aug-09 6:25 
QuestionInterfacing managed C# code and a C-shared Matlab library Pin
Jan Arjen Kraak12-Aug-09 4:44
Jan Arjen Kraak12-Aug-09 4:44 
AnswerRe: Interfacing managed C# code and a C-shared Matlab library Pin
Luc Pattyn12-Aug-09 7:46
sitebuilderLuc Pattyn12-Aug-09 7:46 
Hi,

I'm not sure what is wrong, however there is an easy way to get native string results; this is my recipe, and it works without any Marshal attributes:

const int CAPACITY=1000;
StringBuilder sb=new StringBuilder(CAPACITY);
NativeFunction(sb, sb.Capacity, ...);
string result=sb.ToString();

[DllImport...] static extern void NativeFunction(string textBuffer, int textBufferSize, ...);


and the native code looks like
void NativeFunction(char* textBuffer, int textBufferSize, ...) {...}


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

QuestionRe: Interfacing managed C# code and a C-shared Matlab library Pin
Cracked-Down6-Sep-09 23:21
Cracked-Down6-Sep-09 23:21 
AnswerRe: Interfacing managed C# code and a C-shared Matlab library Pin
Jan Arjen Kraak7-Sep-09 4:01
Jan Arjen Kraak7-Sep-09 4:01 
GeneralRe: Interfacing managed C# code and a C-shared Matlab library Pin
Cracked-Down7-Sep-09 4:17
Cracked-Down7-Sep-09 4:17 
GeneralRe: Interfacing managed C# code and a C-shared Matlab library Pin
nizar3213-Nov-09 11:24
nizar3213-Nov-09 11:24 
GeneralRe: Interfacing managed C# code and a C-shared Matlab library Pin
Jan Arjen Kraak19-Nov-09 20:43
Jan Arjen Kraak19-Nov-09 20:43 
GeneralRe: Interfacing managed C# code and a C-shared Matlab library2 Pin
nizar3213-Nov-09 11:24
nizar3213-Nov-09 11:24 
GeneralRe: Interfacing managed C# code and a C-shared Matlab library Pin
nizar3213-Nov-09 11:49
nizar3213-Nov-09 11:49 
GeneralRe: Interfacing managed C# code and a C-shared Matlab library Pin
Jan Arjen Kraak19-Nov-09 20:45
Jan Arjen Kraak19-Nov-09 20:45 
QuestionCode coverage Pin
K.v.S.12-Aug-09 4:20
K.v.S.12-Aug-09 4:20 
AnswerRe: Code coverage Pin
Luc Pattyn12-Aug-09 7:50
sitebuilderLuc Pattyn12-Aug-09 7:50 
QuestionQuerystring needed to set to empty Pin
kKamel12-Aug-09 4:08
kKamel12-Aug-09 4:08 
GeneralRe: Querystring needed to set to empty Pin
musefan12-Aug-09 4:54
musefan12-Aug-09 4:54 
GeneralRe: Querystring needed to set to empty Pin
kKamel12-Aug-09 5:04
kKamel12-Aug-09 5:04 
GeneralRe: Querystring needed to set to empty Pin
musefan12-Aug-09 5:07
musefan12-Aug-09 5:07 
AnswerRe: Querystring needed to set to empty Pin
Coding C#12-Aug-09 21:35
Coding C#12-Aug-09 21:35 
QuestionOpen Child Form and threading Pin
Saamir12-Aug-09 3:50
Saamir12-Aug-09 3:50 
AnswerRe: Open Child Form and threading Pin
0x3c012-Aug-09 3:57
0x3c012-Aug-09 3:57 

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.