Subject | Re: [firebird-support] Manipulating BLOBs in a x64 UDF compiled with Delphi XE2 |
---|---|
Author | Dmitry Kuzmenko |
Post date | 2012-06-18T07:15:03Z |
Hello, Josef!
Monday, June 18, 2012, 10:18:57 AM, you wrote:
JK> function STRBLOB(Value: PAnsiChar; Dest: PBlob): PBlob;
cdecl
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
JK> TISC_BlobPutSegment = procedure(BlobHandle: PInt;
JK> Buffer: PAnsiChar;
JK> BufferLength: SmallInt); cdecl;
that's correct.
JK> TBlob = record
that's correct too
--
Dmitry Kuzmenko, www.ib-aid.com
Monday, June 18, 2012, 10:18:57 AM, you wrote:
JK> function STRBLOB(Value: PAnsiChar; Dest: PBlob): PBlob;
cdecl
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
JK> TISC_BlobPutSegment = procedure(BlobHandle: PInt;
JK> Buffer: PAnsiChar;
JK> BufferLength: SmallInt); cdecl;
that's correct.
JK> TBlob = record
that's correct too
--
Dmitry Kuzmenko, www.ib-aid.com