I'm writing a GUI for a C++ program I have already written. Currently I need to either port a section of C++ code using MFC to the C# program, or use a wrapper and call the functions from C#. I'd like to be able to create cWinThreads to do some work and be able to control them from my C# GUI by calling setThreadPriority( ... ); and setProcessPriority( ... ) My question is: Should I wrap? Or is there an equivalent cWinThread, thread priority setting, and process priority setting alternative in C#? I've looked at some info on wrappers, and the tutorials are still a little hazy... after I've wrapped the C++ code should I compile it into its own DLL?

also I have 1 day of experience in C#, so thanks for any help/links you've got for me.


Recommended Answers

All 2 Replies

Look there is System.Threading namespace which contains a lof of classes concern threads.
But if you in situation which can't use managed code and enforced to work with unmanaged code you need import those dll (assemblies) to your project (which developed in .net environment).

yeah... I'd gotten that far. The search continues. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.