Board index » delphi » UDF && InterBase && Delphi

UDF && InterBase && Delphi

            Hi,
I wish create UDF by Delphi
Type  DATE  [InterBase]  =   Double [Delphi] ?

--
  With Best Regards
                                           Denis.
Delphi, Perl, InterBase, SQL, HTML, etc.
Web Site:
         http://madli.ut.ee/~skyfox
         http://my.tele2.ee/skyfox

 

Re:UDF && InterBase && Delphi


No. IB's dates are a structure witch contains year, month, etc. Some time in
the past I wrote UDFs using Delphi for IB 5.x and, as far as I remember, the
date struct is defined on .h file witch isn't part of IB. Look at the
example UDF and see if is there someone witch uses dates. By the way, what
will do your UDF ?

Re:UDF && InterBase && Delphi


Quote
Denis Zhadan wrote:

>             Hi,
> I wish create UDF by Delphi
> Type  DATE  [InterBase]  =   Double [Delphi] ?

        Sure.  Read this:

http://www.interbase2000.com/doc_deatz_udf.htm

        Particularly the section on Dates.  Note that you don't actually need
all the header stuff and type declarations that Greg uses.  Just get an
up-to-date copy of IBX and add the single line:

uses IBIntf;

        ...to your unit.

        HTH,

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:UDF && InterBase && Delphi


            Hi,
I try make small function UDF, send

declare external function NAME
SmallInt, TimeStamp, TimeStamp
Returns TimeStamp BY VALUE
Entry_Point 'my_lib_name' module_name 'my_lib';

How I must declare TimeStamp in Delphi for create my dll?
type
  ISC_TIMESTAMP = record
           timestamp_date : Long;
           timestamp_time : ULong;
           end;
 PISC_TIMESTAMP = ^ISC_TIMESTAMP;

Long = Longint?
ULong= ???

--
  With Best Regards
                                           Denis.
Delphi, Perl, InterBase, SQL, HTML, etc.
Web Site:
         http://madli.ut.ee/~skyfox
         http://my.tele2.ee/skyfox

Re:UDF && InterBase && Delphi


Quote
Denis Zhadan wrote:

> How I must declare TimeStamp in Delphi for create my dll?

        Please read the document I referenced in my other message, where this
question is answered.  Note that TIMESTAMP is the same as DATE in
previous versions of IB.

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Other Threads