G
Guest
Hi there,
I had a scenario here.
I had many tonnes of C codes in my office. Each C codes are used in low level stuff. Like connecting to smart card readers or even the OS itself.
I was being hired to push .NET into it and fully object oriented.
I had some questions to ask.
1) Is C# is the right way to do a rewrite over those existing C codes. I have to use platform invocation all the way, and do some marshalling. Just i seen too many p/invoke, and starts to wonder whether it will cause performance breakdown.
2) If i use C++.NET, i heard i can call directly from the windows.h. in C#, i need to use dllimport can direct call into kernel32.dll or winscard.dll. Quite tough.
3) I am not calling the C dll, if i do, i don't fit my job requirements.
4) Is C++.NET or C#, which one is the best way to create this whole new design of the library? I had the design planned using some design patterns?
5) In C, we can use pointers, but in C# i am preventing myself to use unsafe. Better stick on the safe side. Just too many pointers in there, and it takes time to understand the code. I am not that strong in C, only can read but cannot code it.
Please share some time to shed some comments for me. Thanks.
I had a scenario here.
I had many tonnes of C codes in my office. Each C codes are used in low level stuff. Like connecting to smart card readers or even the OS itself.
I was being hired to push .NET into it and fully object oriented.
I had some questions to ask.
1) Is C# is the right way to do a rewrite over those existing C codes. I have to use platform invocation all the way, and do some marshalling. Just i seen too many p/invoke, and starts to wonder whether it will cause performance breakdown.
2) If i use C++.NET, i heard i can call directly from the windows.h. in C#, i need to use dllimport can direct call into kernel32.dll or winscard.dll. Quite tough.
3) I am not calling the C dll, if i do, i don't fit my job requirements.
4) Is C++.NET or C#, which one is the best way to create this whole new design of the library? I had the design planned using some design patterns?
5) In C, we can use pointers, but in C# i am preventing myself to use unsafe. Better stick on the safe side. Just too many pointers in there, and it takes time to understand the code. I am not that strong in C, only can read but cannot code it.
Please share some time to shed some comments for me. Thanks.