How to deprecate a function?

Well what is deprecation? It’s just a way to tell the user that a better/safer function is available for a function which he is using! For e.g. strcpy. If you use strcpy in VC8 we’ll get a warning saying that it’s deprecated, instead use strcpy_s which is the secure version of this API. So the […]
Continue reading…

 

Naked functions!

The compiler generates prolog and epilogue code for functions compiled for do some additional housekeeping for try/catch blocks, maintaining stack frame etc. So what to do to prevent such code generation in MS VC compiler! MSVC compiler provides us with an attribute called __declspec(naked). Use this to prevent code generation by VC compiler. Note that […]
Continue reading…