You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error message:
Invalid token.
invalid request BLR at offset 39.
function GEN_UUID_SEQUENTIAL is not defined.
module name or entrypoint could not be found.
source code:
library uuid;
{declare external function gen_uuid_sequential
returns char(16) character set octets free_it
entry_point 'gen_uuid_sequential' module_name 'uuid.dll'}
function UuidCreateSequential(var guid: TGUID): HResult; stdcall; external 'RPCRT4.dll';
function ib_util_malloc(l: integer): pointer; cdecl; external 'ib_util.dll';
function gen_uuid_sequential: PAnsiChar; cdecl; export;
var
uid: TGUID;
begin
Result := ib_util_malloc(16);
UuidCreateSequential(uid);
Move(uid, Result^, SizeOf(uid));
end;
exports
gen_uuid_sequential;
begin
isMultiThread := True;
end.
checking project code:
procedure TForm1.Button1Click(Sender: TObject);
type
PGuid= ^TGuid;
var
gen_uuid_sequential: function(): PAnsiChar;
LibHandle: THandle;
FileName: string;
Error: DWORD;
g: PGuid;
begin
FileName:= ExtractFilePath(Application.ExeName) + 'uuid.dll';
@gen_uuid_sequential := nil;
LibHandle := SafeLoadLibrary(FileName);
if LibHandle >= 32 then
begin
@gen_uuid_sequential := GetProcAddress(LibHandle, 'gen_uuid_sequential');
if @gen_uuid_sequential <> nil then
begin
g := PGuid(gen_uuid_sequential());
ShowMessage(GuidToString(g^));
end;
end
else
begin
Error:= GetLastError();
ShowMessage('Error: ' + IntToStr(Error));
end;
FreeLibrary(LibHandle);
end;
The text was updated successfully, but these errors were encountered:
Karol is correct, the issue is likely due to mixing of 64/32 engine and UDF, or some other configuration issue, that should be address via the appropriate support forum. As such, this item is not appropriate for the tracker.
If the issue turns out to be something which does require a code/project change, this item can/will be re-opened.
Submitted by: andrey (someonesomeone)
not working udf
error message:
Invalid token.
invalid request BLR at offset 39.
function GEN_UUID_SEQUENTIAL is not defined.
module name or entrypoint could not be found.
source code:
library uuid;
{declare external function gen_uuid_sequential
returns char(16) character set octets free_it
entry_point 'gen_uuid_sequential' module_name 'uuid.dll'}
function UuidCreateSequential(var guid: TGUID): HResult; stdcall; external 'RPCRT4.dll';
function ib_util_malloc(l: integer): pointer; cdecl; external 'ib_util.dll';
function gen_uuid_sequential: PAnsiChar; cdecl; export;
var
uid: TGUID;
begin
Result := ib_util_malloc(16);
UuidCreateSequential(uid);
Move(uid, Result^, SizeOf(uid));
end;
exports
gen_uuid_sequential;
begin
isMultiThread := True;
end.
checking project code:
procedure TForm1.Button1Click(Sender: TObject);
type
PGuid= ^TGuid;
var
gen_uuid_sequential: function(): PAnsiChar;
LibHandle: THandle;
FileName: string;
Error: DWORD;
g: PGuid;
begin
FileName:= ExtractFilePath(Application.ExeName) + 'uuid.dll';
@gen_uuid_sequential := nil;
LibHandle := SafeLoadLibrary(FileName);
if LibHandle >= 32 then
begin
@gen_uuid_sequential := GetProcAddress(LibHandle, 'gen_uuid_sequential');
if @gen_uuid_sequential <> nil then
begin
g := PGuid(gen_uuid_sequential());
ShowMessage(GuidToString(g^));
end;
end
else
begin
Error:= GetLastError();
ShowMessage('Error: ' + IntToStr(Error));
end;
FreeLibrary(LibHandle);
end;
The text was updated successfully, but these errors were encountered: