Subject Using API to add/modify user
Author nikicab_1999
I am trying to use API calls to add a user to FB server, but no
success.
Here is my code:

function isc_add_user(status: P_ISC_STATUS; user_sec_data:
P_USER_SEC_DATA):
ISC_STATUS; stdcall; external 'fbclient.dll';


function Add_User(user_name, password, server, sDbaPwd: PChar):
ISC_STATUS;
var
p_status: P_ISC_STATUS;
status: array[0..19] of ISC_STATUS;
user_sec_data1: USER_SEC_DATA;
begin
// have p_status point at the ISC_STATUS array
p_status := @status[0];

// set up the USER_SEC_DATA elements
user_sec_data1.protocol := sec_protocol_tcpip;
user_sec_data1.server := server;
user_sec_data1.user_name := user_name;
user_sec_data1.password := password;
user_sec_data1.dba_user_name := 'sysdba';
user_sec_data1.dba_password := sDbaPwd;

user_sec_data1.sec_flags := sec_password_spec or sec_server_spec or
sec_dba_user_name_spec or
sec_dba_password_spec;

result := isc_add_user(p_status, @user_sec_data1);
end;

I am calling this from my dll. No exception is fired.

What's wrong?

Thanks,
Nick