xp_cmdshell will allow you to call some things.
The code inside SQL Server are not the same as say the code from a C# or VB program. You don't have an interface to link to a DLL.
What you can do is install an extended stored procedure, which can be used to link to a DLL and call it, but you want to be very careful as you are then running something in process, and could cause instability.
You can also potentially use the sp_OA procedures if you have a OLE/COM interface.
http://msdn.microsoft.com/en-us/library/aa238863%28v=sql.80%29.aspx