Click here to Skip to main content
15,918,007 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can i print a doc or pdf file ? Pin
abbd21-Feb-09 10:32
abbd21-Feb-09 10:32 
QuestionSplitting strings Pin
kanchoette20-Feb-09 4:21
kanchoette20-Feb-09 4:21 
AnswerRe: Splitting strings Pin
Kristian Sixhøj20-Feb-09 4:26
Kristian Sixhøj20-Feb-09 4:26 
GeneralRe: Splitting strings Pin
kanchoette20-Feb-09 4:30
kanchoette20-Feb-09 4:30 
QuestionC# client server communication [modified] Pin
mrithula820-Feb-09 4:19
mrithula820-Feb-09 4:19 
AnswerRe: C# client server communication Pin
Rob Philpott20-Feb-09 4:42
Rob Philpott20-Feb-09 4:42 
GeneralRe: C# client server communication Pin
Mel Feik20-Feb-09 5:54
Mel Feik20-Feb-09 5:54 
QuestionPass a dynamic collection from c# to c++ dll Pin
johnnycastle20-Feb-09 2:46
johnnycastle20-Feb-09 2:46 
Hi, i'm practicing with c# - c++ dll integration. I reached my first goal, that was to make the c# and c++ sides share a simple struct. This is what i did:

c++ side (NANUReader.dll)
--------------

typedef struct NANUINFO{

int a;
int b;
char* s;
double d;

}NANUINFO;


__declspec(dllexport) void callMe(NANUINFO* info){

info->a = 1;
info->b = 2;
info->s = "hellooo";
info->d = 5.57684;


}

c# side
-------------

[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)]
struct NANUinfo
{
int a;
int b;
string s;
double d;
}

[System.Runtime.InteropServices.DllImport("NANUReader.dll")]
static extern void callMe(ref NANUinfo info);

void callDLLFuntion(){
NANUinfo info = new NANUinfo();
callMe(ref info);
--here info has been filled by the dll--
}

This worked.
Now i would find a way to pass the dll a reference to some sort of empty dynamic collection (like an empty List<nanuinfo>) and make the dll populate it with an unpredictable number of NANUinfo structs. In other words, in the c# side i need something like this:

void callDLLFuntion(){
SomeCollectionType<nanuinfo> infoCollection = new SomeCollectionType<nanuinfo>();
callMe(ref infoColletion);
--here infocollection should be full of NANUinfo structs--
}

I don't even know if this can be achieved. Any help?

Thanks
Questionpc oscilloscope usb based Pin
wepce20-Feb-09 2:33
wepce20-Feb-09 2:33 
AnswerRe: pc oscilloscope usb based Pin
kanchoette20-Feb-09 2:46
kanchoette20-Feb-09 2:46 
QuestionUser holding down mouse while changing listview selection via keyboard problem [modified] Pin
kanchoette20-Feb-09 2:14
kanchoette20-Feb-09 2:14 
AnswerRe: User holding down mouse while changing listview selection via keyboard problem [modified] Pin
Jimmanuel20-Feb-09 3:59
Jimmanuel20-Feb-09 3:59 
GeneralRe: User holding down mouse while changing listview selection via keyboard problem Pin
kanchoette20-Feb-09 4:18
kanchoette20-Feb-09 4:18 
QuestionNew Table Pin
Alessio Granzotto20-Feb-09 1:22
Alessio Granzotto20-Feb-09 1:22 
AnswerRe: New Table Pin
moon_stick20-Feb-09 1:32
moon_stick20-Feb-09 1:32 
GeneralRe: New Table Pin
Nagy Vilmos20-Feb-09 1:46
professionalNagy Vilmos20-Feb-09 1:46 
GeneralRe: New Table Pin
moon_stick20-Feb-09 2:06
moon_stick20-Feb-09 2:06 
GeneralRe: New Table Pin
Alessio Granzotto20-Feb-09 1:58
Alessio Granzotto20-Feb-09 1:58 
GeneralRe: New Table Pin
musefan20-Feb-09 2:05
musefan20-Feb-09 2:05 
GeneralRe: New Table Pin
moon_stick20-Feb-09 2:05
moon_stick20-Feb-09 2:05 
QuestionDataGridView selection problem Pin
pedersen-roxen20-Feb-09 1:20
pedersen-roxen20-Feb-09 1:20 
AnswerRe: DataGridView selection problem Pin
musefan20-Feb-09 2:44
musefan20-Feb-09 2:44 
QuestionHow can we open any .doc/image/..... file on PC through remote place mobile [modified] Pin
aashish patidar20-Feb-09 1:18
aashish patidar20-Feb-09 1:18 
JokeRe: How can we open any .doc/image/..... file on PC through remote place mobile Pin
Eddy Vluggen20-Feb-09 2:15
professionalEddy Vluggen20-Feb-09 2:15 
GeneralRe: How can we open any .doc/image/..... file on PC through remote place mobile Pin
aashish patidar20-Feb-09 2:25
aashish patidar20-Feb-09 2:25 

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.