Click here to Skip to main content
15,921,837 members
Home / Discussions / C#
   

C#

 
QuestionCant see output to Event log with log4net EventLogAppender. Pin
Chintan.Desai8-Dec-08 17:25
Chintan.Desai8-Dec-08 17:25 
AnswerRe: Cant see output to Event log with log4net EventLogAppender. Pin
Giorgi Dalakishvili8-Dec-08 19:22
mentorGiorgi Dalakishvili8-Dec-08 19:22 
GeneralRe: Cant see output to Event log with log4net EventLogAppender. Pin
Chintan.Desai8-Dec-08 22:34
Chintan.Desai8-Dec-08 22:34 
QuestionEvent Log Madness - Changing the log associated with a log Pin
prod@pt8-Dec-08 14:28
prod@pt8-Dec-08 14:28 
AnswerRe: Event Log Madness - Changing the log associated with a log Pin
Chintan.Desai8-Dec-08 19:09
Chintan.Desai8-Dec-08 19:09 
Questionvalidation of class attributes Pin
devvvy8-Dec-08 14:05
devvvy8-Dec-08 14:05 
AnswerRe: validation of class attributes Pin
PIEBALDconsult8-Dec-08 14:17
mvePIEBALDconsult8-Dec-08 14:17 
GeneralRe: validation of class attributes Pin
devvvy8-Dec-08 14:27
devvvy8-Dec-08 14:27 
GeneralRe: validation of class attributes Pin
PIEBALDconsult8-Dec-08 14:34
mvePIEBALDconsult8-Dec-08 14:34 
AnswerRe: validation of class attributes Pin
N a v a n e e t h8-Dec-08 16:27
N a v a n e e t h8-Dec-08 16:27 
GeneralRe: validation of class attributes Pin
devvvy8-Dec-08 17:11
devvvy8-Dec-08 17:11 
GeneralRe: validation of class attributes Pin
N a v a n e e t h8-Dec-08 19:58
N a v a n e e t h8-Dec-08 19:58 
Questionderived class to automatically call base method before "return" Pin
devvvy8-Dec-08 13:56
devvvy8-Dec-08 13:56 
AnswerRe: derived class to automatically call base method before "return" Pin
PIEBALDconsult8-Dec-08 14:12
mvePIEBALDconsult8-Dec-08 14:12 
AnswerRe: derived class to automatically call base method before "return" Pin
Christian Graus8-Dec-08 14:14
protectorChristian Graus8-Dec-08 14:14 
AnswerRe: derived class to automatically call base method before "return" Pin
Thomas Weller9-Dec-08 3:12
Thomas Weller9-Dec-08 3:12 
QuestionHow can I get "Struct's address"~ help me~ Pin
G.I Cho8-Dec-08 13:03
G.I Cho8-Dec-08 13:03 
GeneralRe: How can I get "Struct's address"~ help me~ Pin
Luc Pattyn8-Dec-08 13:24
sitebuilderLuc Pattyn8-Dec-08 13:24 
Hi,

you don't need unsafe to use P/Invoke.

What you should do is use the GCHandle class to pin objects (so the GC won't move them around),
then obtain their address, pass that as an IntPtr, and afterwards free the handle.
You don't need to do this for strings though: a read-only string can be passed as is, and your C code will get a valid char*. For a writable string, use a StringBuilder instead.

Make sure you describe the structs correctly; be careful with the size of simple types,
long in C# is 64-bit, in most C environments it is 32-bit; and char in C# is 16-bit, in C it is 8-bit. Also be careful with alignment, the byte stuffing rules could be different on both sides.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Fixturized forever. Confused | :confused:


GeneralRe: How can I get "Struct's address"~ help me~ Pin
G.I Cho8-Dec-08 18:39
G.I Cho8-Dec-08 18:39 
Questionembed .net component to program Pin
saeed70078-Dec-08 11:11
saeed70078-Dec-08 11:11 
AnswerRe: embed .net component to program Pin
EliottA8-Dec-08 11:28
EliottA8-Dec-08 11:28 
AnswerRe: embed .net component to program Pin
Giorgi Dalakishvili8-Dec-08 19:26
mentorGiorgi Dalakishvili8-Dec-08 19:26 
AnswerRe: embed .net component to program Pin
Lev Danielyan8-Dec-08 19:55
Lev Danielyan8-Dec-08 19:55 
QuestionHow to update my datagrid using text boxes? Pin
Vloops8-Dec-08 11:11
Vloops8-Dec-08 11:11 
AnswerRe: How to update my datagrid using text boxes? Pin
Alireza Loghmani8-Dec-08 22:40
Alireza Loghmani8-Dec-08 22:40 

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.