C
C#2y ago
blurr

❔ Linking C# and C++

This may be a region issue but I couldn't find an exact answer, I have a simple GUI for an application in Winforms C#, and I want to make it functional using C++ or C not C# itself, is there any SIMPLE way to make buttons and text boxes etc functional using C++ or C#?
26 Replies
Angius
Angius2y ago
There's no simple way, no p/invoke comes to mind, or maybe DLLImport
blurr
blurr2y ago
Thank you. For a Macro would it be more efficient to learn C# or just try to use C++? because I need a language that can execute many things in milliseconds
Angius
Angius2y ago
I'd say try C#, see if it fits your performance requirements, if not try fiddling with P/Invoke'ing C++ code
blurr
blurr2y ago
thank you so much
sibber
sibber2y ago
what are you asking exactly
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
blurr
blurr2y ago
I'm trying to make a simple macro application It would have: -Keybind selector, Intervals between clicks and total amount of clicks before it stops clicking a mouse click macro* I'm more comfortable with C and C++ but making GUIs in them is too hard for my current level, so i thought of using C# Only code that needs to be executed in C: Simulating mouse clicks Using keybinds to start/stop
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
blurr
blurr2y ago
Personal project / gaming it's my first year coding and I thought it'd be a good start
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
blurr
blurr2y ago
Not really you're right but I'm using it on a singleplayer world in Minecraft It's an SMP but I own the server so it's okay
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
blurr
blurr2y ago
I think I'll try that if I hit a roadblock for now, because the channel specified low-level and macros are generally not very low level
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
pogrammerX
pogrammerX2y ago
Have you tried CLR? (Common Language Runtime)
MODiX
MODiX2y ago
tebeco#0205
unsure if that still works in .net core I would also ask if C++.Net is still a thing because you could then have both unmanaged and managed code together
Quoted by
<@!689473681302224947> from #Linking C# and C++ (click here)
React with ❌ to remove this embed.
sibber
sibber2y ago
id rather do ipc than c++/cli
pogrammerX
pogrammerX2y ago
Yea, but it depends on OP, if he didn’t know about cli he should atleast give it a try
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX2y ago
blurr#9735
I think I'll try that if I hit a roadblock for now, because the channel specified low-level and macros are generally not very low level
Quoted by
<@!689473681302224947> from #Linking C# and C++ (click here)
React with ❌ to remove this embed.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
sibber
sibber2y ago
clr is the .net runtime what youre talking about is called c++/cli
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
pogrammerX
pogrammerX2y ago
frfr
cptcrawler
cptcrawler2y ago
Don't use [DllImport] actually use [LibraryImport] way better and the managed types marshaling is covered by a source generator
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts