Click here to Skip to main content
15,880,364 members
Home / Discussions / C#
   

C#

 
GeneralRe: Combobox and listbox control Pin
Hum Dum1-Jul-09 0:04
Hum Dum1-Jul-09 0:04 
GeneralRe: Combobox and listbox control Pin
musefan1-Jul-09 1:18
musefan1-Jul-09 1:18 
QuestionCalling a C function from C# and getting values from it. Pin
shivapriyak30-Jun-09 2:42
shivapriyak30-Jun-09 2:42 
AnswerRe: Calling a C function from C# and getting values from it. [modified] Pin
DaveyM6930-Jun-09 3:26
professionalDaveyM6930-Jun-09 3:26 
GeneralRe: Calling a C function from C# and getting values from it. Pin
shivapriyak30-Jun-09 3:34
shivapriyak30-Jun-09 3:34 
GeneralRe: Calling a C function from C# and getting values from it. Pin
DaveyM6930-Jun-09 3:39
professionalDaveyM6930-Jun-09 3:39 
GeneralRe: Calling a C function from C# and getting values from it. Pin
Luc Pattyn30-Jun-09 4:03
sitebuilderLuc Pattyn30-Jun-09 4:03 
AnswerRe: Calling a C function from C# and getting values from it. Pin
Luc Pattyn30-Jun-09 4:09
sitebuilderLuc Pattyn30-Jun-09 4:09 
Hi,

three remarks:

1.

shivapriyak wrote:
public static extern int func1(ref double param[], int size);


I doubt you need the ref there. Objects (array is object) get passed by reference, so what you get is a pointer to the data anyway. With "ref" you get a pointer to a pointer, which you would then have to accept as a double**param.

2.

I typically don't rely on automatics marshaling, instead I use GCHandle class to pin the object and get its pointer into an IntPtr, then pass that to the native world. However, I am not saying your way could not work (without ref!).

3.

shivapriyak wrote:
in direct C application, gives error saying "Array size(i.e. 5) is lesser than the number of values to fill(i.e. 10)".


How the heck can the function now that???

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.

GeneralRe: Calling a C function from C# and getting values from it. Pin
shivapriyak30-Jun-09 20:03
shivapriyak30-Jun-09 20:03 
GeneralRe: Calling a C function from C# and getting values from it. Pin
Luc Pattyn30-Jun-09 22:57
sitebuilderLuc Pattyn30-Jun-09 22:57 
QuestionSQLite in C# Pin
stancrm30-Jun-09 2:35
stancrm30-Jun-09 2:35 
AnswerRe: SQLite in C# Pin
Pete O'Hanlon30-Jun-09 2:39
mvePete O'Hanlon30-Jun-09 2:39 
AnswerRe: SQLite in C# Pin
SeMartens30-Jun-09 2:41
SeMartens30-Jun-09 2:41 
QuestionHow to Upload large size file to server Pin
wasimsharp30-Jun-09 2:21
wasimsharp30-Jun-09 2:21 
AnswerRe: How to Upload large size file to server Pin
Vimalsoft(Pty) Ltd30-Jun-09 2:28
professionalVimalsoft(Pty) Ltd30-Jun-09 2:28 
GeneralRe: How to Upload large size file to server Pin
wasimsharp30-Jun-09 2:33
wasimsharp30-Jun-09 2:33 
GeneralRe: How to Upload large size file to server Pin
Vimalsoft(Pty) Ltd30-Jun-09 2:37
professionalVimalsoft(Pty) Ltd30-Jun-09 2:37 
GeneralRe: How to Upload large size file to server Pin
musefan30-Jun-09 2:40
musefan30-Jun-09 2:40 
GeneralRe: How to Upload large size file to server Pin
Vimalsoft(Pty) Ltd30-Jun-09 2:42
professionalVimalsoft(Pty) Ltd30-Jun-09 2:42 
GeneralRe: How to Upload large size file to server Pin
musefan30-Jun-09 2:43
musefan30-Jun-09 2:43 
GeneralRe: How to Upload large size file to server Pin
Vimalsoft(Pty) Ltd30-Jun-09 2:47
professionalVimalsoft(Pty) Ltd30-Jun-09 2:47 
GeneralRe: How to Upload large size file to server Pin
musefan30-Jun-09 2:58
musefan30-Jun-09 2:58 
AnswerRe: How to Upload large size file to server Pin
musefan30-Jun-09 2:33
musefan30-Jun-09 2:33 
GeneralRe: How to Upload large size file to server Pin
wasimsharp30-Jun-09 2:42
wasimsharp30-Jun-09 2:42 
AnswerRe: How to Upload large size file to server Pin
musefan30-Jun-09 3:01
musefan30-Jun-09 3:01 

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.