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

C#

 
GeneralRe: How can I use a C++ struct from a C# app? Pin
leppie10-Sep-08 0:59
leppie10-Sep-08 0:59 
GeneralRe: How can I use a C++ struct from a C# app? Pin
verence33310-Sep-08 1:14
verence33310-Sep-08 1:14 
GeneralRe: How can I use a C++ struct from a C# app? Pin
leppie10-Sep-08 1:19
leppie10-Sep-08 1:19 
GeneralRe: How can I use a C++ struct from a C# app? Pin
verence33310-Sep-08 1:52
verence33310-Sep-08 1:52 
AnswerRe: How can I use a C++ struct from a C# app? Pin
Gideon Engelberth10-Sep-08 3:28
Gideon Engelberth10-Sep-08 3:28 
GeneralRe: How can I use a C++ struct from a C# app? Pin
verence33310-Sep-08 3:45
verence33310-Sep-08 3:45 
GeneralRe: How can I use a C++ struct from a C# app? Pin
verence33310-Sep-08 21:05
verence33310-Sep-08 21:05 
AnswerRe: How can I use a C++ struct from a C# app? Pin
Alan Balkany10-Sep-08 3:57
Alan Balkany10-Sep-08 3:57 
I had a similar problem, and I was able to avoid the complexities of marshalling by defining the same structure in both C# and C++.

A "char" is C# is NOT the same as a "char" in C++. C# uses unicode chars, which are usually longer than one byte. But a C# "byte" IS the same as a "char" in C++.

After you have what appear to be equivalent structures in both languages, write a test program that sets values in one, and see if you can pass it to the other unchanged. You can also use the sizeof () operator to see if the structure is the same size in both languages. (C# allows sizeof () to be used in unsafe mode.)

Ints and doubles are the same in both languages.
GeneralRe: How can I use a C++ struct from a C# app? Pin
verence33310-Sep-08 4:20
verence33310-Sep-08 4:20 
GeneralRe: How can I use a C++ struct from a C# app? Pin
Alan Balkany10-Sep-08 4:43
Alan Balkany10-Sep-08 4:43 
GeneralRe: How can I use a C++ struct from a C# app? Pin
verence33310-Sep-08 5:27
verence33310-Sep-08 5:27 
QuestionWhat's difference between a DLL file & an assembly file ? Pin
Mohammad Dayyan10-Sep-08 0:14
Mohammad Dayyan10-Sep-08 0:14 
AnswerRe: What's difference between a DLL file & an assembly file ? Pin
blackjack215010-Sep-08 0:25
blackjack215010-Sep-08 0:25 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
Mohammad Dayyan10-Sep-08 0:30
Mohammad Dayyan10-Sep-08 0:30 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
leppie10-Sep-08 0:32
leppie10-Sep-08 0:32 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
Mohammad Dayyan10-Sep-08 0:35
Mohammad Dayyan10-Sep-08 0:35 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
leppie10-Sep-08 0:41
leppie10-Sep-08 0:41 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
Giorgi Dalakishvili10-Sep-08 0:42
mentorGiorgi Dalakishvili10-Sep-08 0:42 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
Mohammad Dayyan10-Sep-08 0:46
Mohammad Dayyan10-Sep-08 0:46 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
Giorgi Dalakishvili10-Sep-08 0:49
mentorGiorgi Dalakishvili10-Sep-08 0:49 
GeneralRe: What's difference between a DLL file & an assembly file ? Pin
leppie10-Sep-08 0:58
leppie10-Sep-08 0:58 
AnswerRe: What's difference between a DLL file & an assembly file ? Pin
g_amol10-Sep-08 0:58
g_amol10-Sep-08 0:58 
AnswerRe: What's difference between a DLL file & an assembly file ? Pin
Mark Salsbery10-Sep-08 6:15
Mark Salsbery10-Sep-08 6:15 
QuestionEEPROM Smart Card Pin
asp.net.csharp.ir9-Sep-08 23:58
asp.net.csharp.ir9-Sep-08 23:58 
AnswerRe: EEPROM Smart Card Pin
leppie10-Sep-08 0:26
leppie10-Sep-08 0:26 

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.