| |

VerySource

 Forgot password?
 Register
Search
View: 21|Reply: 6

Questions about porting from C to .net

[Copy link]

1

Threads

2

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

Post time: 2020-2-23 18:30:01
| Show all posts |Read mode
I have a project of mixed programming of C and C ++, many of which are global variables and functions. Now I want to transplant them to the .net environment, please master what problems need attention. There is no design book for the original project, which is a black box transplant. I am going to encapsulate global functions into classes, and then convert functions such as Memcpy to .net mode. Convert the entire project to a managed type. Is there anything wrong with the above migration method?
Reply

Use magic Report

0

Threads

75

Posts

27

Credits

Newbie

Rank: 1

Credits
27

 China

Post time: 2020-5-7 18:30:01
| Show all posts
Global,
Pay attention to conflicts ...
Reply

Use magic Report

0

Threads

75

Posts

27

Credits

Newbie

Rank: 1

Credits
27

 China

Post time: 2020-5-8 00:00:01
| Show all posts
Is there anything wrong,
Also need to consider the use environment ...

Basically, if it ’s not very complicated,
Still feasible ...
Reply

Use magic Report

1

Threads

2

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

 Author| Post time: 2020-5-8 18:15:01
| Show all posts
Can the conflict issue be explained in detail?
Reply

Use magic Report

1

Threads

30

Posts

20

Credits

Newbie

Rank: 1

Credits
20

 China

Post time: 2020-5-27 16:00:01
| Show all posts
Black box transplantation is to make dll, and then use .net to write a calling terminal.
The dlls of winapi are called in this way, there is no problem.
Reply

Use magic Report

0

Threads

3

Posts

4

Credits

Newbie

Rank: 1

Credits
4

 China

Post time: 2020-7-1 12:45:01
| Show all posts
zfy010317


   
Black box transplantation is to make a dll, and then use .net to write a calling terminal.
The winapi dlls are all called in this way, there is no problem.

  

----

In this case, the efficiency will be very low.If the amount of code is small, it is recommended to replace all with .net code.
Reply

Use magic Report

0

Threads

14

Posts

8

Credits

Newbie

Rank: 1

Credits
8

 China

Post time: 2020-7-2 00:45:02
| Show all posts
There was a thing in the past, which was also mixed with C/C++, and later compiled into a DLL to be called by C#. Because of threading issues, all global variables are bundled into objects.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list