Click here to Skip to main content
16,006,514 members
Home / Discussions / C#
   

C#

 
Questionhow to create a bar that leaves no frames but works like a splitter bar. Pin
just_starting19-Jan-05 2:48
just_starting19-Jan-05 2:48 
AnswerRe: how to create a bar that leaves no frames but works like a splitter bar. Pin
Judah Gabriel Himango19-Jan-05 4:56
sponsorJudah Gabriel Himango19-Jan-05 4:56 
GeneralException after P/Invoke callback Pin
Iwan Littel19-Jan-05 1:33
Iwan Littel19-Jan-05 1:33 
GeneralRe: Exception after P/Invoke callback Pin
leppie19-Jan-05 6:03
leppie19-Jan-05 6:03 
GeneralRe: Exception after P/Invoke callback Pin
Iwan Littel19-Jan-05 22:29
Iwan Littel19-Jan-05 22:29 
GeneralRe: Exception after P/Invoke callback Pin
Heath Stewart19-Jan-05 7:41
protectorHeath Stewart19-Jan-05 7:41 
GeneralRe: Exception after P/Invoke callback Pin
Iwan Littel19-Jan-05 23:02
Iwan Littel19-Jan-05 23:02 
GeneralRe: Exception after P/Invoke callback Pin
Heath Stewart20-Jan-05 5:50
protectorHeath Stewart20-Jan-05 5:50 
It could be, but you should still pin the delegate in memory. This is good practice for any reference type whether it's a problem or not now. This is really only necessary for long-lived delegates, however, since if you're passing the delegate to your native function only for that call you should be safe. The fact that you declared it as static also helps, but may not be the best design idea.

If the third-party DLL is creating a new thread (and you could find this out easily using Thread.Name or - lacking any names - store some test data in TLS (see Thread.AllocateNamedDataSlot), it really depends what your delegate is doing. If you're updating controls you need to update them in the thread on which they were created. This means using Control.InvokeRequired to determine if you need to invoke the method on the thread, then Control.Invoke to actually invoke the method. If you need to set a property create a proxy method to set the value. Through reflection you can also get a MethodInfo for the property's set accessor.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Exception after P/Invoke callback Pin
Iwan Littel24-Jan-05 3:42
Iwan Littel24-Jan-05 3:42 
GeneralC# grouping / sorting Crystal Reports at runtime Pin
TehMedic19-Jan-05 1:21
TehMedic19-Jan-05 1:21 
Generalerror BC31019: -- Help needed Pin
Md Saleem Navalur19-Jan-05 0:29
Md Saleem Navalur19-Jan-05 0:29 
GeneralRe: error BC31019: -- Help needed Pin
Robert Rohde19-Jan-05 0:41
Robert Rohde19-Jan-05 0:41 
GeneralRe: error BC31019: -- Help needed Pin
Md Saleem Navalur19-Jan-05 0:54
Md Saleem Navalur19-Jan-05 0:54 
GeneralRe: error BC31019: -- Help needed Pin
Md Saleem Navalur20-Jan-05 1:27
Md Saleem Navalur20-Jan-05 1:27 
Generalembedding text files into a project Pin
mike chaplee18-Jan-05 23:20
mike chaplee18-Jan-05 23:20 
GeneralRe: embedding text files into a project Pin
Colin Angus Mackay19-Jan-05 0:15
Colin Angus Mackay19-Jan-05 0:15 
GeneralRe: embedding text files into a project Pin
mike chaplee19-Jan-05 1:17
mike chaplee19-Jan-05 1:17 
GeneralRe: embedding text files into a project Pin
Colin Angus Mackay19-Jan-05 1:19
Colin Angus Mackay19-Jan-05 1:19 
Questionhow to read unicode in msflexgrid Pin
ye win zaw18-Jan-05 22:51
ye win zaw18-Jan-05 22:51 
GeneralRemove background image from a button programatically Pin
kloepper18-Jan-05 22:12
kloepper18-Jan-05 22:12 
GeneralRe: Remove background image from a button programatically Pin
Stefan Troschuetz19-Jan-05 0:17
Stefan Troschuetz19-Jan-05 0:17 
GeneralRe: Remove background image from a button programatically Pin
kloepper19-Jan-05 10:02
kloepper19-Jan-05 10:02 
Generaluse of array in this program Pin
ramyasks18-Jan-05 22:00
ramyasks18-Jan-05 22:00 
GeneralShell 32 Dll Pin
rchokler18-Jan-05 21:02
rchokler18-Jan-05 21:02 
GeneralText to Speech Pin
Amir Jalaly18-Jan-05 20:24
Amir Jalaly18-Jan-05 20:24 

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.