Up Prev Next
From: Robert Voysey <rvoysey at metlife dot com>
Subject: Re: ARGV in NT
Date: Oct 24 1997 11:19AM
Sherry Lee wrote:
> Sherry Lee@METLIFE
> 10/22/97 03:08 PM
> 2. The message and error handlers are not being called. I've tried just
> 'requiring sybutil.pl' and all the different examples from the Sybperl Man
> pages. And with both DBlib (dbmsghandle/dberrhandle) and CTlib
> Thanks in advance,
In the source code for NT sybperl the calls to register the callback
routines have been commented out as the implemantation did not work.
Something to do with a CPERL pointer that was not available in the call
back routine. I changed the code to get the callback routine to work.
There is one small problem it that the display from the callback are
written to STDOUT which is a problem if you want to pipe the output from
your perl script to another process. This code is available from
Michleles home page as 'Patch 1 to the NT port of Sybperl'. It
implements just the server and client callback routines. I recently had
the need to pipe output from a perl script to another process so looked
into this problem with the code I had changed. I had problem when
compiling the code when trying to write to STDERR. So I created a
seprate source file for the callback routines and recomiled the code
which seems to work. I have no idea about the internals of perl
extensions work. There seems to be a CPerl* that is need all over the
place. The sybase callback routines do not have this pointer passed to
then which was the problem with the NT callback routines. When the
source code was compliled there was no problem. The problem was when
sybase called the callback routine. It never passed a CPerl* pointer so
the routines failed I think. I think that's why the callbacks are
commented out in the NT port.
Perhaps Michael could shed some light on this CPerl* pointer.