Click here to Skip to main content
15,899,124 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionChecking Latest Virus Scan? Pin
DarthKarnage17-Nov-08 5:51
DarthKarnage17-Nov-08 5:51 
AnswerCross Post Pin
led mike18-Nov-08 5:07
led mike18-Nov-08 5:07 
Question[Message Deleted] Pin
De@r17-Nov-08 3:49
De@r17-Nov-08 3:49 
AnswerRe: bubble sort to quick sort Pin
73Zeppelin17-Nov-08 6:15
73Zeppelin17-Nov-08 6:15 
QuestionSTL/CLR Pin
staticv17-Nov-08 1:31
staticv17-Nov-08 1:31 
QuestionSyntax Error Help: Switch Statement Code Pin
Olaman15-Nov-08 18:09
Olaman15-Nov-08 18:09 
AnswerRe: Syntax Error Help: Switch Statement Code Pin
Mark Salsbery16-Nov-08 6:49
Mark Salsbery16-Nov-08 6:49 
QuestionPostMessage fails in Windows Service [modified] Pin
Indivara13-Nov-08 14:29
professionalIndivara13-Nov-08 14:29 
What is the equivalent of a window in .NET? Is it a form? I don't mean the visible UI window, but the window handle used as a message pump.

Consider the following situation - Application A loads DLL B (on its one and only thread). DLL B spawns a new thread to receive data, but has to send that data to application A on the same thread as it was loaded. The usual practice (at least I think so), is to have a hidden window within DLL B, created on the application's thread, and the data-receiving thread posts a windows message and the received data to that window handle. The window procedure then sends the data to application A.
If you were to implement this in C++/CLI, what would you use instead of the hidden window?

Here's the real problem I'm facing: we have such a system as above, originally developed as a MFC application and native C++ DLL. It works perfectly in this case. However, the application had to be converted to a windows service written in C#. In this case, PostMessage within the DLL stops working. Using it as a native C++ DLL or compiling with /clr makes no difference. The PostMessage function itself succeeds, but the message disappears into nowhere. Any idea what could be happening here? Would the solution be to replace the window with a form (using BeginInvoke)? So far, MSDN and Google have got me nowhere...D'Oh! | :doh:

The real system is actually much more complicated than I've described, I've just tried to separate the problem area here.

Thanks in advance!





Last modified: 31hrs 59mins after originally posted --



GeneralRe: PostMessage fails in Windows Service Pin
Mark Salsbery15-Nov-08 12:32
Mark Salsbery15-Nov-08 12:32 
GeneralRe: PostMessage fails in Windows Service Pin
Indivara16-Nov-08 14:28
professionalIndivara16-Nov-08 14:28 
GeneralRe: Solution Pin
Indivara18-Nov-08 18:04
professionalIndivara18-Nov-08 18:04 
AnswerRe: PostMessage fails in Windows Service Pin
Rob Graham21-Dec-08 4:19
Rob Graham21-Dec-08 4:19 
Questionbinding Many records to one textbox Pin
Member 294183412-Nov-08 13:24
Member 294183412-Nov-08 13:24 
AnswerRe: binding Many records to one textbox Pin
N a v a n e e t h12-Nov-08 17:31
N a v a n e e t h12-Nov-08 17:31 
QuestionSelf integrity check of my program Pin
stormydaniels7-Nov-08 15:40
stormydaniels7-Nov-08 15:40 
AnswerRe: Self integrity check of my program Pin
Mark Salsbery8-Nov-08 7:27
Mark Salsbery8-Nov-08 7:27 
QuestionMemory usage and dialogs Pin
dSolariuM1-Nov-08 21:06
dSolariuM1-Nov-08 21:06 
AnswerRe: Memory usage and dialogs Pin
Giorgi Dalakishvili2-Nov-08 4:27
mentorGiorgi Dalakishvili2-Nov-08 4:27 
AnswerRe: Memory usage and dialogs Pin
Mark Salsbery2-Nov-08 9:43
Mark Salsbery2-Nov-08 9:43 
AnswerRe: Memory usage and dialogs Pin
N a v a n e e t h2-Nov-08 17:32
N a v a n e e t h2-Nov-08 17:32 
AnswerRe: Memory usage and dialogs Pin
led mike5-Nov-08 4:22
led mike5-Nov-08 4:22 
QuestionQ: Changing Language with Thread::CurrenThread::CurrentUICulture Pin
jreisslein31-Oct-08 3:42
jreisslein31-Oct-08 3:42 
QuestionRe: Q: Changing Language with Thread::CurrenThread::CurrentUICulture Pin
led mike31-Oct-08 4:20
led mike31-Oct-08 4:20 
AnswerRe: Q: Changing Language with Thread::CurrenThread::CurrentUICulture Pin
jreisslein2-Nov-08 1:30
jreisslein2-Nov-08 1:30 
GeneralRe: Q: Changing Language with Thread::CurrenThread::CurrentUICulture Pin
jreisslein3-Nov-08 23:57
jreisslein3-Nov-08 23:57 

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.