Any easy way to convert legacy C++ code to managed C++?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am building a SQL Server CLR user-defined function (which means it must be
pure safe?). I got hundres/thousands of error. And most errors are in
vadefs.h, crtdefs.h, yvals.h, ymath.h, math.h, float.h, swprintf.inl, .....

Any easier way to convert the code without many changes?
 
Any code that is in a SQL Server CLR user-defined function must compile
cleanly with the /clr:safe switch. The /clr:pure switch isn't enough.

Unfortunately, while there is a "pure" version of the CRT, there isn't a
"safe" version of it, which means you can't use the CRT functions (like those
in math.h) in a SQL Server component. For further discussion, see:

http://msdn2.microsoft.com/en-us/library/85344whh(VS.80).aspx

Sean
 
Back
Top