Click here to Skip to main content
15,902,492 members
Home / Discussions / C#
   

C#

 
Questionhow can made Login Form in c#.net?how can coding any easy in dot net or c#.net?please send me any software Pin
mohammedali20066-Jan-09 6:44
mohammedali20066-Jan-09 6:44 
AnswerRe: how can made Login Form in c#.net?how can coding any easy in dot net or c#.net?please send me any software Pin
leckey6-Jan-09 6:51
leckey6-Jan-09 6:51 
GeneralRe: how can made Login Form in c#.net?how can coding any easy in dot net or c#.net?please send me any software Pin
EliottA6-Jan-09 6:56
EliottA6-Jan-09 6:56 
AnswerRe: how can made Login Form in c#.net?how can coding any easy in dot net or c#.net?please send me any software Pin
Pete O'Hanlon6-Jan-09 10:39
mvePete O'Hanlon6-Jan-09 10:39 
QuestionCall DataBindings.Clear() on multiple, similarly named controls [modified] Pin
Jaffa Bobfluff6-Jan-09 6:26
Jaffa Bobfluff6-Jan-09 6:26 
AnswerRe: Call DataBindings.Clear() on multiple, similarly named controls Pin
Jaffa Bobfluff12-Jan-09 23:10
Jaffa Bobfluff12-Jan-09 23:10 
QuestionMarshalling pointers to structs Pin
Quiltfish6-Jan-09 5:50
Quiltfish6-Jan-09 5:50 
GeneralRe: Marshalling pointers to structs Pin
Luc Pattyn6-Jan-09 6:16
sitebuilderLuc Pattyn6-Jan-09 6:16 
Hi,

if I understand you correctly, you have native code allocating memory (a struct) and returning a pointer to it, then managed code is interested in that data. If so, AFAIK the data will get copied no matter what: managed code will only work on managed data, so either code you provide, or some marshaling code generated automatically, will take care of copying the data across the managed/native border.

When designing an interface, it is therefore better to have the managed world provide the memory and pass an IntPtr to the native world for it to fill; which means you may have to split the native function in two parts, one to calculate and return the required size, and one to provide the actual data.

Of course if the struct is small, having it copied back and forth may not be too bad;
for large arrays etc. (images, sound files, ...) it should be avoided though.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Love, happiness and fewer bugs for 2009!


GeneralRe: Marshalling pointers to structs [modified] Pin
Quiltfish6-Jan-09 8:56
Quiltfish6-Jan-09 8:56 
GeneralRe: Marshalling pointers to structs Pin
Luc Pattyn6-Jan-09 12:42
sitebuilderLuc Pattyn6-Jan-09 12:42 
QuestionSetter for Property bubbling up a level? Pin
Eric Burns6-Jan-09 4:49
Eric Burns6-Jan-09 4:49 
AnswerRe: Setter for Property bubbling up a level? Pin
J4amieC6-Jan-09 5:30
J4amieC6-Jan-09 5:30 
AnswerRe: Setter for Property bubbling up a level? Pin
Wendelius6-Jan-09 5:30
mentorWendelius6-Jan-09 5:30 
AnswerRe: Setter for Property bubbling up a level? Pin
benjymous6-Jan-09 5:31
benjymous6-Jan-09 5:31 
AnswerRe: Setter for Property bubbling up a level? Pin
Henry Minute6-Jan-09 5:48
Henry Minute6-Jan-09 5:48 
GeneralRe: Setter for Property bubbling up a level? Pin
Eric Burns6-Jan-09 9:17
Eric Burns6-Jan-09 9:17 
GeneralRe: Setter for Property bubbling up a level? Pin
Henry Minute6-Jan-09 9:20
Henry Minute6-Jan-09 9:20 
GeneralRe: Setter for Property bubbling up a level? Pin
Henry Minute6-Jan-09 10:05
Henry Minute6-Jan-09 10:05 
GeneralRe: Setter for Property bubbling up a level? Pin
Henry Minute6-Jan-09 13:48
Henry Minute6-Jan-09 13:48 
GeneralRe: Setter for Property bubbling up a level? Pin
Henry Minute6-Jan-09 13:51
Henry Minute6-Jan-09 13:51 
GeneralRe: Setter for Property bubbling up a level? Pin
Eric Burns7-Jan-09 6:55
Eric Burns7-Jan-09 6:55 
GeneralRe: Setter for Property bubbling up a level? Pin
Henry Minute7-Jan-09 7:17
Henry Minute7-Jan-09 7:17 
AnswerOT: Is it really called 'class Object'? Pin
Jon Rista6-Jan-09 10:14
Jon Rista6-Jan-09 10:14 
GeneralRe: OT: Is it really called 'class Object'? Pin
Eric Burns6-Jan-09 11:11
Eric Burns6-Jan-09 11:11 
GeneralRe: OT: Is it really called 'class Object'? Pin
Jon Rista6-Jan-09 11:38
Jon Rista6-Jan-09 11:38 

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.