Subject Re: [firebird-support] Manipulating BLOBs in a x64 UDF compiled with Delphi XE2
Author Josef Kokeš
Hi!

> Hello, Josef!
>
> Monday, June 18, 2012, 10:18:57 AM, you wrote:
>
> JK> function STRBLOB(Value: PAnsiChar; Dest: PBlob): PBlob;
> cdecl

Yeah, I realized too late that I should have used the declaration from
interface, not from implementation. I have that.

> JK> The blob record (probably wrong for x64):
>
> JK> TISC_BlobGetSegment = function(BlobHandle: PInt;
> JK> Buffer: PAnsiChar;
> JK> BufferSize: LongInt;
> JK> var ResultLength: LongInt): SmallInt; cdecl;
>
> no,
> buffersize: word; // two unsigned bytes, NOT longint.
> resultlength: word: // the same two unsigned bytes

I will fix this. It should not matter, though, as I am not using
GetSegment at all. But of course it's a good idea to have a correct
declaration, even if I don't need it right at the moment.

Is it possible that the access violation is caused by e.g. alignment
issues? I tried to use a packed record without success, though.

Josef Kokes