Before you proceed too much further into this chapter, you need to be aware that this isn't a book on the C language. There is some C code presented only as an example. In this chapter, you won't learn how to write C code, and the code won't receive more than a cursory explanation .
Now that we are through that, it's time to jump into the actual creation of extended stored procedures. In C terms, the DLL contained in an extended stored procedure is a function with the following prototype:
SRVRETCODE xp_extendedProcName (SRVPROC *);
This function is exported by the compiler that you use to create the DLL and then registered with the SQL Server.
When you are creating the C code required for your extended ...