VB不能按照C调用规范输出函数,所以VB不能实现扩展存储过程 实现扩展存储过程通常都用C/C++来写. 另外,从效率上来说,用VB实现扩展存储过程也并不合适. The execution of an extended stored procedure has these characteristics: The extended stored procedure function is executed under the security context of Microsoft® SQL Server™.The extended stored procedure function runs in the process space of SQL Server.The Microsoft Win32® thread associated with the execution of the extended stored procedure is the same one used for the client connection. ================================================================================= Caution: Extended stored procedures offer performance enhancements and extend SQL Server functionality. However, because the extended stored procedure DLL and SQL Server share the same address space, a problem procedure can adversely affect SQL Server functioning. Although exceptions thrown by the extended stored procedure DLL are handled by SQL Server, it is possible to damage SQL Server data areas. As a security precaution, only SQL Server system administrators can add extended stored procedures to SQL Server. These procedures should be thoroughly tested before they are installed.
下面是扩展存储过程的实现原型 It is highly recommended that all Microsoft® SQL Server™ 2000 extended stored procedure DLLs implement and export the following function:__declspec(dllexport) ULONG __GetXpVersion() { return ODS_VERSION; }
不对,上面贴错了.上面扩展存储过程建议实现的Export function 下面才是扩展存储过程的原型: SRVRETCODE xp_extendedProcName (SRVPROC *);You can export a function by listing its name in the EXPORTS section of a .def file, or you can prefix the function name in the source code with __declspec(dllexport), a Microsoft compiler extension (Note that __declspec() begins with two underscores).
XXXX函数是一定存在的你要说明以下,在那里使用扩展存储过程?
还有xxx.dll,xxxx
实现扩展存储过程通常都用C/C++来写.
另外,从效率上来说,用VB实现扩展存储过程也并不合适.
The execution of an extended stored procedure has these characteristics: The extended stored procedure function is executed under the security context of Microsoft® SQL Server™.The extended stored procedure function runs in the process space of SQL Server.The Microsoft Win32® thread associated with the execution of the extended stored procedure is the same one used for the client connection. =================================================================================
Caution:
Extended stored procedures offer performance enhancements and extend SQL Server functionality. However, because the extended stored procedure DLL and SQL Server share the same address space, a problem procedure can adversely affect SQL Server functioning. Although exceptions thrown by the extended stored procedure DLL are handled by SQL Server, it is possible to damage SQL Server data areas. As a security precaution, only SQL Server system administrators can add extended stored procedures to SQL Server. These procedures should be thoroughly tested before they are installed.
It is highly recommended that all Microsoft® SQL Server™ 2000 extended stored procedure DLLs implement and export the following function:__declspec(dllexport) ULONG __GetXpVersion()
{
return ODS_VERSION;
}
下面才是扩展存储过程的原型:
SRVRETCODE xp_extendedProcName (SRVPROC *);You can export a function by listing its name in the EXPORTS section of a .def file, or you can prefix the function name in the source code with __declspec(dllexport), a Microsoft compiler extension (Note that __declspec() begins with two underscores).