Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
QuestionFile Tansfer Protocols in VC# Pin
bigjoe11a23-Jul-09 16:50
bigjoe11a23-Jul-09 16:50 
QuestionHow do you store a bunch of values in a 20x20 array Pin
Nathan Revka23-Jul-09 15:20
Nathan Revka23-Jul-09 15:20 
AnswerRe: How do you store a bunch of values in a 20x20 array Pin
PIEBALDconsult23-Jul-09 15:34
mvePIEBALDconsult23-Jul-09 15:34 
GeneralRe: How do you store a bunch of values in a 20x20 array Pin
Nathan Revka23-Jul-09 17:06
Nathan Revka23-Jul-09 17:06 
AnswerRe: How do you store a bunch of values in a 20x20 array Pin
musefan23-Jul-09 22:08
musefan23-Jul-09 22:08 
AnswerRe: How do you store a bunch of values in a 20x20 array Pin
RugbyLeague23-Jul-09 23:11
RugbyLeague23-Jul-09 23:11 
Question[MarshalAs()] attribute and Marshal.SizeOf() Issue Pin
Don Marino23-Jul-09 10:35
Don Marino23-Jul-09 10:35 
AnswerRe: [MarshalAs()] attribute and Marshal.SizeOf() Issue Pin
Luc Pattyn23-Jul-09 12:04
sitebuilderLuc Pattyn23-Jul-09 12:04 
Hi,

it is not entirely clear to me, however there seem to be some inconsistencies in your post:

1.
why should MISSING_TRANS take either 24 or 48 bytes? all I see is two integers.

2.
why is MISSING_TRANS declared a class, but you are using "ArraySubType = UnmanagedType.Struct" ?


FWIW: I use P/Invoke quite a lot, however I try and keep the data stucture as simple as possible,
which one can do when in charge of both sides. In particular I avoid passing a class, a struct holding other than basic types, and arrays holding other than basic types.
That may take some adjusting, however there are several benefits: it works almost right away, and most of the time the marshaling is free, i.e. no data gets ever copied, it is just passing pointers back and forth.

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.

GeneralRe: [MarshalAs()] attribute and Marshal.SizeOf() Issue Pin
Don Marino24-Jul-09 1:27
Don Marino24-Jul-09 1:27 
GeneralRe: [MarshalAs()] attribute and Marshal.SizeOf() Issue Pin
Luc Pattyn24-Jul-09 1:37
sitebuilderLuc Pattyn24-Jul-09 1:37 
GeneralRe: [MarshalAs()] attribute and Marshal.SizeOf() Issue Pin
Don Marino24-Jul-09 3:32
Don Marino24-Jul-09 3:32 
GeneralRe: [MarshalAs()] attribute and Marshal.SizeOf() Issue Pin
Luc Pattyn24-Jul-09 12:41
sitebuilderLuc Pattyn24-Jul-09 12:41 
QuestionWhy do I get a "Cross thread" Exception? Pin
David8001C23-Jul-09 8:32
David8001C23-Jul-09 8:32 
AnswerRe: Why do I get a "Cross thread" Exception? Pin
Luc Pattyn23-Jul-09 8:41
sitebuilderLuc Pattyn23-Jul-09 8:41 
GeneralRe: Why do I get a "Cross thread" Exception? Pin
David8001C23-Jul-09 8:49
David8001C23-Jul-09 8:49 
GeneralRe: Why do I get a "Cross thread" Exception? Pin
Luc Pattyn23-Jul-09 9:03
sitebuilderLuc Pattyn23-Jul-09 9:03 
GeneralRe: Why do I get a "Cross thread" Exception? Pin
David8001C23-Jul-09 9:11
David8001C23-Jul-09 9:11 
GeneralRe: Why do I get a "Cross thread" Exception? Pin
Luc Pattyn23-Jul-09 9:21
sitebuilderLuc Pattyn23-Jul-09 9:21 
GeneralRe: Why do I get a "Cross thread" Exception? Pin
Luc Pattyn23-Jul-09 13:12
sitebuilderLuc Pattyn23-Jul-09 13:12 
AnswerRe: Why do I get a "Cross thread" Exception? Pin
PIEBALDconsult23-Jul-09 8:42
mvePIEBALDconsult23-Jul-09 8:42 
QuestionHow to copy assembly from GAC to local drive ? Pin
hdv21223-Jul-09 8:06
hdv21223-Jul-09 8:06 
AnswerRe: How to copy assembly from GAC to local drive ? Pin
Ian McCaul23-Jul-09 8:20
Ian McCaul23-Jul-09 8:20 
AnswerRe: How to copy assembly from GAC to local drive ? Pin
stancrm23-Jul-09 9:17
stancrm23-Jul-09 9:17 
AnswerRe: How to copy assembly from GAC to local drive ? Pin
Abhijit Jana23-Jul-09 10:13
professionalAbhijit Jana23-Jul-09 10:13 
QuestionLittle conversion problem from visual basic to c# Pin
Member 474292223-Jul-09 7:42
Member 474292223-Jul-09 7:42 

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.