Khorsun Vlad wrote:
> 
> "AZDesign" ...
> 
>> В исходниках Firebird 2.5 есть пример fbudf.cpp
> ...
>> Помогите с примером.
> 
>     Или я тупой, или... :)
> 
>     В чём проблемы-то ? Как пробовал ?
> 
> 

Я в C++ разбираюсь плохо, подскажите, что делаю не так:
FBUDF_API void blob2string(const blobcallback* inpblob, paramdsc* rc)
{
        if ((inpblob->blob_handle == 0) || (inpblob->blob_total_length==0))
        {
            internal::setnull(rc);
                return;
        }
        if (!inpblob || !inpblob->blob_handle)
                return;

        ISC_SHORT EndOfBlob = 0;
        ISC_USHORT* res_len = 0;
        const ISC_USHORT buf_siz = inpblob->blob_max_segment;

        ISC_UCHAR* pbuff = 0;
        pbuff = new ISC_UCHAR[buf_siz+1];
        internal::set_any_string_type(rc, buf_siz, pbuff);

        EndOfBlob = inpblob->blob_get_segment(inpblob->blob_handle, pbuff, 
buf_siz,
res_len); // эта строка вызывает крах

        delete [] pbuff;

                return;
}

-- 
View this message in context: 
http://firebird.1100200.n4.nabble.com/Blob-UDF-Firebird-2-5-tp2998810p2999702.html
Sent from the firebird-russian mailing list archive at Nabble.com.

Ответить