Click here to Skip to main content
16,015,296 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionP/Invoke "why" question Pin
Gordon Kushner9-Aug-10 8:07
Gordon Kushner9-Aug-10 8:07 
AnswerRe: P/Invoke "why" question Pin
Luc Pattyn9-Aug-10 8:22
sitebuilderLuc Pattyn9-Aug-10 8:22 
GeneralRe: P/Invoke "why" question Pin
Gordon Kushner9-Aug-10 8:54
Gordon Kushner9-Aug-10 8:54 
GeneralRe: P/Invoke "why" question Pin
Luc Pattyn9-Aug-10 9:06
sitebuilderLuc Pattyn9-Aug-10 9:06 
AnswerRe: P/Invoke "why" question Pin
DaveyM6910-Aug-10 22:15
professionalDaveyM6910-Aug-10 22:15 
GeneralRe: P/Invoke "why" question Pin
Luc Pattyn11-Aug-10 1:44
sitebuilderLuc Pattyn11-Aug-10 1:44 
GeneralRe: P/Invoke "why" question Pin
Gordon Kushner11-Aug-10 3:02
Gordon Kushner11-Aug-10 3:02 
AnswerRe: P/Invoke "why" question Pin
Daniel Grunwald11-Aug-10 1:55
Daniel Grunwald11-Aug-10 1:55 
The .NET P/Invoke marshaller has special knowledge about some types.
For example when passing a String, it passes the pointer to the string data, not the pointer to the managed string object.
When passing a StringBuilder, the .NET marshaller passes a pointer to the StringBuilder's internal buffer.

Another useful idiom is the SafeHandle: you can create your own SafeHandle-derived class and directly use that in P/Invoke signatures. The .NET marshaller will pass the underlying handle (IntPtr) instead. This is extremely useful because it avoids a number of problems: for example the finalizer could run when there are no active references to your object, but the underlying handle is still being used in a P/Invoke call. Using a SafeHandle directly in the P/Invoke signature makes the GC aware that the handle is used during the lifetime of the P/Invoke call, and it'll avoid finalizing the object until the call is complete.
GeneralRe: P/Invoke "why" question Pin
Gordon Kushner11-Aug-10 3:02
Gordon Kushner11-Aug-10 3:02 
QuestionCustomizable menu Pin
Member 32222648-Aug-10 22:14
Member 32222648-Aug-10 22:14 
AnswerRe: Customizable menu Pin
Luc Pattyn9-Aug-10 1:31
sitebuilderLuc Pattyn9-Aug-10 1:31 
AnswerRe: Customizable menu Pin
JF201511-Aug-10 18:59
JF201511-Aug-10 18:59 
QuestionRead/Write image metadata in VB2008 [modified] Pin
Archdeacon6-Aug-10 23:11
Archdeacon6-Aug-10 23:11 
Generalasp.net updatepanel with dropdownlists-can not select a different item Pin
Martin_6-Aug-10 8:09
Martin_6-Aug-10 8:09 
GeneralRe: asp.net updatepanel with dropdownlists-can not select a different item Pin
Not Active6-Aug-10 8:48
mentorNot Active6-Aug-10 8:48 
GeneralRe: asp.net updatepanel with dropdownlists-can not select a different item Pin
T M Gray9-Aug-10 6:02
T M Gray9-Aug-10 6:02 
QuestionMessage Removed Pin
5-Aug-10 23:51
sr1595-Aug-10 23:51 
AnswerRe: i created mysqldump application using C#. it is saving to some path which i given. but how to make that application to save dump automatically at every 3 or 4 hours once daily [modified] Pin
Pete O'Hanlon6-Aug-10 0:26
mvePete O'Hanlon6-Aug-10 0:26 
QuestionExpan/Collapse Table Pin
All Time Programming5-Aug-10 23:12
All Time Programming5-Aug-10 23:12 
AnswerRe: Expan/Collapse Table Pin
Prosanta Kundu online5-Aug-10 23:24
Prosanta Kundu online5-Aug-10 23:24 
GeneralRe: Expan/Collapse Table Pin
All Time Programming6-Aug-10 0:02
All Time Programming6-Aug-10 0:02 
GeneralRe: Expan/Collapse Table Pin
Not Active6-Aug-10 8:55
mentorNot Active6-Aug-10 8:55 
AnswerRe: Expan/Collapse Table Pin
All Time Programming6-Aug-10 19:47
All Time Programming6-Aug-10 19:47 
QuestionCompare column names in Excel in each sheet by SSIS Pin
Member 32222645-Aug-10 3:35
Member 32222645-Aug-10 3:35 
AnswerRe: Compare column names in Excel in each sheet by SSIS Pin
Not Active5-Aug-10 6:27
mentorNot Active5-Aug-10 6:27 

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.