Home All Groups Group Topic Archive Search About

Replacement of C code with C# code

Author
26 Jan 2006 1:31 AM
Al
All - I am looking for a starting point on references for migrating a DLL
written in C (and the associated XP that goes with it) to C#.  I would like
to be able to use the managed code that SQL has instead of keeping the XP (as
it has ran into some security issues, and there is always that possibility
that it could blow up and make me restart SQL).  Any good web references or
books (well maybe the books are not out yet)?  Many thanks.

Author
26 Jan 2006 2:25 AM
--CELKO--
Why?  C is portable, highly optimizable and C# is just proprietary
without much history for good compilation.

>> security issues,  ..<<

If you really need a secure system, then you need get away from MS
products and move to UNIX family products designed by that.  .
Author
26 Jan 2006 4:44 AM
Jeff
Better yet, just write it all in assembler. Be a man!




Show quote
"--CELKO--" <jcelko***@earthlink.net> wrote in message
news:1138242313.806455.76760@f14g2000cwb.googlegroups.com...
> Why?  C is portable, highly optimizable and C# is just proprietary
> without much history for good compilation.
>
>>> security issues,  ..<<
>
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that.  .
>
Author
26 Jan 2006 11:45 AM
Tony Rogerson
No, be a real man - write it directly in binary!

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


Show quote
"Jeff" <A@B.COM> wrote in message
news:e2Lu7MjIGHA.668@TK2MSFTNGP11.phx.gbl...
> Better yet, just write it all in assembler. Be a man!
>
>
>
>
> "--CELKO--" <jcelko***@earthlink.net> wrote in message
> news:1138242313.806455.76760@f14g2000cwb.googlegroups.com...
>> Why?  C is portable, highly optimizable and C# is just proprietary
>> without much history for good compilation.
>>
>>>> security issues,  ..<<
>>
>> If you really need a secure system, then you need get away from MS
>> products and move to UNIX family products designed by that.  .
>>
>
>
Author
26 Jan 2006 11:58 AM
ML
Real men don't even use any I/O devices, other than themselves. Punching in
+/- 3 Volts is only a pain for the first thousand or so ticks.


ML

---
http://milambda.blogspot.com/
Author
26 Jan 2006 7:38 AM
Tony Rogerson
So you advocate using extended stored procedures?

> C# is just proprietary
> without much history for good compilation.

LOL - I guess you've only just started to realise that C# is a programming
language rather than a key on a piano.

C# has been around for a number of years and is extensively used by
programmers using the .NET platform.

Unlike C, C#, specifically the .NET platform has lots of security built-in
to prevent you coding buffer overflows, helps you by disposing memory that
in C you can forget to do, won't let you create pointers to memory you don't
own etc... etc...

As for security, I feel a lot more comfortable using the MS platform because
its the widest used platform on the planent and as such is the main hackers
target, I don't see many security holes coming out anymore - the majority
have been plugged. UNIX on the other hand, there are lots of holes, and when
one is found it takes forever to get a fix; with MS its usually days or at
the latest weeks.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


Show quote
"--CELKO--" <jcelko***@earthlink.net> wrote in message
news:1138242313.806455.76760@f14g2000cwb.googlegroups.com...
> Why?  C is portable, highly optimizable and C# is just proprietary
> without much history for good compilation.
>
>>> security issues,  ..<<
>
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that.  .
>
Author
27 Jan 2006 1:45 AM
Craig Kelly
"Tony Rogerson":

Show quote
> So you advocate using extended stored procedures?
>
>> C# is just proprietary
>> without much history for good compilation.
>
> LOL - I guess you've only just started to realise that C# is a programming
> language rather than a key on a piano.
>
> C# has been around for a number of years and is extensively used by
> programmers using the .NET platform.
>
> Unlike C, C#, specifically the .NET platform has lots of security built-in
> to prevent you coding buffer overflows, helps you by disposing memory that
> in C you can forget to do, won't let you create pointers to memory you
> don't own etc... etc...

In addition (ignoring the fact that an XP for SQL Server written in C isn't
very portable), C#, C++/CLI, and the CLI are all ECMA standards.  The ECMA
standards for C# and the CLI are alreeady ISO standards and C++/CLI is
supposed to be fast-tracked.

Craig
Author
29 Jan 2006 4:04 AM
--CELKO--
>> As for security, I feel a lot more comfortable using the MS platform because its the widest used platform on the planet and as such is the main hackers target, I don't see many security holes coming out anymore - the majority have been plugged. <<

That is sooooo un-real!  **Because** the MS platform is the widest used
platform on the planet, therefore it is the main hackers target!  Read
the trade press!  Are you saying that your ISP does not bother with
Spam and virus fillers because there are no such creaturers in the MS
world?  LOL!

>> UNIX on the other hand, there are lots of holes, and when one is found it takes forever to get a fix; with MS its usually days or at the latest weeks. <<

Would you like to ACTUALLY lnumbers for UNIX and Linux versus windows?
Google it!  The Multics "ring model"was one of the best things ever
done for security.

Windows evolved from a single-user, non-MS product for 8- then 16-bit
machines than Bill Gates nefer wrote.  This is not a good genetic
background from which to evolve.

I often wonder if CM/P had won over the MSDOS fraud ?  Ever see the
made for TV movie on this piece of history?
Author
29 Jan 2006 2:26 PM
Tony Rogerson
> That is sooooo un-real!  **Because** the MS platform is the widest used
> platform on the planet, therefore it is the main hackers target!  Read
> the trade press!  Are you saying that your ISP does not bother with
> Spam and virus fillers because there are no such creaturers in the MS
> world?  LOL!

I never said that, stop trying to put words in my mouth because your
argument is so feable.

My ISP, PIPEX the biggest in the UK does not bother with spam nor virus
filters, they leave that to me; most supply a router now with a built in
firewall.

Its down to the consumer in the main to protect themselves, but Microsoft
have now addressed that by building a firewall into XP and there is a few
other things in beta to help with virus filters and spyware, also, outlook
the email link has junk mail filters built into it already.

> Would you like to ACTUALLY lnumbers for UNIX and Linux versus windows?
> Google it!  The Multics "ring model"was one of the best things ever
> done for security.

Check out the article here:
http://news.zdnet.co.uk/internet/security/0,39020375,39245873,00.htm

It shows that in 2005 there where significantly more holes in the unix/linux
os than windows.

Yes, Windows is more likely to get attacked because of sheer volume of
installations but MS have been addressing security which is why their number
of attacks are so low. I feel a dam site more secure on the windows platform
with a the fast turnround from reported security hole to actual hot fix
available, which quite frankly is poorly lacking in the unix and linux
world.

<<insert usual suggestion to update his out of date canned answers>>

> Windows evolved from a single-user, non-MS product for 8- then 16-bit
> machines than Bill Gates nefer wrote.  This is not a good genetic
> background from which to evolve.

Windows NT didn't, go back and do your research. XP is a departure away from
the old Windows 3.11, Windows ME code base (which wasn't NT) and with XP we
move into robust business quality operating systems.

Windows NT and now Windows 2003 are more than capable of handling extensive
volumes of users and data - again, update your research, you are about 10
years out of date on that one!

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


Show quote
"--CELKO--" <jcelko***@earthlink.net> wrote in message
news:1138507468.155074.112310@o13g2000cwo.googlegroups.com...
>>> As for security, I feel a lot more comfortable using the MS platform
>>> because its the widest used platform on the planet and as such is the
>>> main hackers target, I don't see many security holes coming out
>>> anymore - the majority have been plugged. <<
>
> That is sooooo un-real!  **Because** the MS platform is the widest used
> platform on the planet, therefore it is the main hackers target!  Read
> the trade press!  Are you saying that your ISP does not bother with
> Spam and virus fillers because there are no such creaturers in the MS
> world?  LOL!
>
>>> UNIX on the other hand, there are lots of holes, and when one is found
>>> it takes forever to get a fix; with MS its usually days or at the latest
>>> weeks. <<
>
> Would you like to ACTUALLY lnumbers for UNIX and Linux versus windows?
> Google it!  The Multics "ring model"was one of the best things ever
> done for security.
>
> Windows evolved from a single-user, non-MS product for 8- then 16-bit
> machines than Bill Gates nefer wrote.  This is not a good genetic
> background from which to evolve.
>
> I often wonder if CM/P had won over the MSDOS fraud ?  Ever see the
> made for TV movie on this piece of history?
>
Author
26 Jan 2006 8:18 PM
Mark Williams
Here we go; propagating the myth the UNIX is more secure than Windows.

Let's see, UNIX gets it start in the 1960s, and has been hacked away at for
nearly half a century. Windows NT born around 1994. Getting the drift?

Go to www.cert.org and look at historical vulnerability data. Just as many
(if not more) items concerning UNIX/Linux as Windows in the past 10 years.

---
Mark Williams, MCSE: Security, MCDBA



--


Show quote
"--CELKO--" wrote:

> Why?  C is portable, highly optimizable and C# is just proprietary
> without much history for good compilation.
>
> >> security issues,  ..<<
>
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that.  .
>
>
Author
29 Jan 2006 2:28 PM
Tony Rogerson
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that.  .

Check out the current statistics before consider MS or UNIX has a
platform...

You might also want to consider vendors attitude towards dealing with or
even accepting security loop holes, you only need to look toward the end of
last year at Oracle's attitude toward their security problems with passwords
etc....

Stats here:
http://news.zdnet.co.uk/internet/security/0,39020375,39245873,00.htm

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


Show quote
"--CELKO--" <jcelko***@earthlink.net> wrote in message
news:1138242313.806455.76760@f14g2000cwb.googlegroups.com...
> Why?  C is portable, highly optimizable and C# is just proprietary
> without much history for good compilation.
>
>>> security issues,  ..<<
>
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that.  .
>
Author
26 Jan 2006 7:33 AM
Tony Rogerson
Hi Al,

You probably need to write a stored procedure using CLR; its not that
difficult - significantly easier than extended stored procedures and you
don't have to worry about bringing SQL Server so long as you use SAFE or
EXTERNAL.

This topic area in MSDN has a lot of what you need to get started :
http://msdn2.microsoft.com/en-us/library/ms254498.aspx

Tony

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


Show quote
"Al" <A*@discussions.microsoft.com> wrote in message
news:B9E55A17-6D2F-4252-9637-5E8740F40988@microsoft.com...
> All - I am looking for a starting point on references for migrating a DLL
> written in C (and the associated XP that goes with it) to C#.  I would
> like
> to be able to use the managed code that SQL has instead of keeping the XP
> (as
> it has ran into some security issues, and there is always that possibility
> that it could blow up and make me restart SQL).  Any good web references
> or
> books (well maybe the books are not out yet)?  Many thanks.
Author
27 Jan 2006 6:24 PM
JT
Consider hooking the DLL into a client side application or on a designated
application server. Any executable that interacts with external services can
misbehave, regardless of the language, compiler or OS platform.

Show quote
"Al" <A*@discussions.microsoft.com> wrote in message
news:B9E55A17-6D2F-4252-9637-5E8740F40988@microsoft.com...
> All - I am looking for a starting point on references for migrating a DLL
> written in C (and the associated XP that goes with it) to C#.  I would
> like
> to be able to use the managed code that SQL has instead of keeping the XP
> (as
> it has ran into some security issues, and there is always that possibility
> that it could blow up and make me restart SQL).  Any good web references
> or
> books (well maybe the books are not out yet)?  Many thanks.

AddThis Social Bookmark Button