请教IB使用自编DLL问题?(100分)

  • 主题发起人 主题发起人 emonster
  • 开始时间 开始时间
E

emonster

Unregistered / Unconfirmed
GUEST, unregistred user!
IB里没有SQL SEVER中的ISNULL(),我只好用D5写了一个DLL,在D5里试调用正常,但
UDF调用返回不正常值。 请指教。
D5 中如下:
function(a:variant,b:variant):varaint;
begin
if varisnull(a) then
result:=b
else
result:=a;
end;
IB 中如下:
DECLARE EXTERNAL FUNCTION NEW_UDF1
DOUBLE PRECISION
RETURNS DOUBLE PRECISION BY VALUE
ENTRY_POINT "isnull" MODULE_NAME "mynull.dll"
 
IB 不支持varaint类型吧?
 
When you declare a UDF that returns a C string, CHAR or VARCHAR, you must include the
FREE_IT keyword in the declaration in order to free the memory used by the return value.
 
多人接受答案了。
 
后退
顶部