libc.so and getlogin

Posted by dmikai on 08-Sep-2011 09:26

Hi

I have some code wich retrieve UNIX initial login name of user:

procedure getlogin external "libc.so" cdecl:

DEFINE RETURN PARAMETER login_char AS MEMPTR NO-UNDO.               

end procedure.                                                                                                                           


def var login_char as memptr.                                                                                                         

def var s as char.                                                                                                                                                                                                 

run getlogin(output login_char).

assign s = get-string(login_char,1) no-error.


disp s.

But s is aways empty.

I need help.

OpenEdge 10.1B03 64Bit

SunSparc Solaris 5.10 64Bit

All Replies

Posted by Tim Kuehn on 13-Sep-2011 08:36

Check with tech support if the AVM supports 64 bit calls to external libraries as some 64 bit versions didn't.

This thread is closed