Share via

Full duplex operation, functions C++ C# without textbox

Noah Aas 1,210 Reputation points
2025-04-15T15:12:51.3766667+00:00

Hello,

https://learn.microsoft.com/en-us/answers/questions/2152915/full-duplex-operation-functions-c-c

I need to send a data string from C# to C++ that isn't in any window (textbox). Is this possible? If so, how?

If I fill the textbox from outside I get error messages. cross-thread exception C# WinForms

How can I best solve this?

Background: I want to send a message from C# to C++ cyclically every 60 seconds.

<IsRunning>
  <Request stillAlive="1" />
</IsRunning>
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


Answer accepted by question author

Bruce (SqlWork.com) 84,086 Reputation points
2025-04-19T15:14:12.0566667+00:00

The timer is thread safe, as you are only using one thread. But a timer interrupts the current thread. So if you use a thread timer, it could fire during a current call. If you use a timer control and windows control events, the events are triggered by the window loop and do not overlap.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.