Hi,
How is obfuscation done? Can someone plzz give simple explanation......
Thanks....
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 4, 2011, 9:01 AM
Suthish NairPosted Mar 7, 2011, 2:23 PM
VulpesPosted Mar 5, 2011, 4:58 PM
Sam HobbsPosted Mar 5, 2011, 4:46 PM
As explained in How to Marshal a C++ Class, use of CallingConvention.ThisCall does not eliminate the necessity of using mangled function names; that author chose to use extern "C".
Use of C++ for this is not for a beginner. In addition to learning C++, there are abundant technical details to learn about .Net interop with C++. I have a book about it and all the details makes my head spin.
VulpesPosted Mar 5, 2011, 4:13 PM
Sam HobbsPosted Mar 5, 2011, 3:46 PM
I think we are getting off-topic for the thread but for discussion of C/C++ we need context. If the entire application is written in C++ then the calling convention is insignificant. If portions of an application are developed using C++ then C++ functions can be called as if they were C functions simply by using extern "C". C++ is not like C#; C++ does not require everything to be in a class. The C++ compiler can be used for a program that has no class.
There is not a "C subset of C++". There are two language specifications each of which are compiled by separate compilers (at least that is what Microsoft and the Gnu compilers do) and it is not possible to switch languages within a compilation unit. It is possible to use extern "C" in the manner above to specify that the C calling convention should be used. The reason that is needed is to eliminate the use of decoration of the function name.
Certainly it is possible to make a COM object server in C++ that managed code could use. Is it not possible to make a managed object in C++ that can be called by managed code and then the managed C++ code calls unmanaged code?
VulpesPosted Mar 5, 2011, 1:58 PM
Sam HobbsPosted Mar 5, 2011, 12:19 PM
VulpesPosted Mar 5, 2011, 9:14 AM
If you have any commercial secrets, then it's probably best not to use .NET at all or (where feasible) cloak them within C functions, which are much harder to disassemble, and then P/Invoke those from your .NET application.
Alternatively, you could write your application using C++/CLI which allows you to intermingle managed and unmanaged code.
Sam HobbsPosted Mar 5, 2011, 1:59 AM