The VLF common services layer is now available for use in your server modules on Windows or IBM i servers.
It must be globally declared like this:
Define_Com Class(#VF_SY001X) Name(#uSystemCommon) Scope(*APPLICATION)
And initialized for the execution platform like this:
Evtroutine Handling(#COM_OWNER.CreateInstance)
#uSystemCommon.Initialize Invlfonemode(False) Ibmiwebserver(*OSAPI = IBMI) Apptracemode(False) Systracemode(False)
Endroutine
Over the next few VLF releases more and more #uSystemCommon services are expected to be made available to your code.
The first service provided allows a Windows user's credentials to be validated. For example:
#uSystemCommon.avLogonWindowsUser Userprofile(TestUser) Domain(TestDomain) Password(TestPassword) Errormessage(#ErrorMessage) Result(#Result)
This is an interface to the Microsoft supplied LoginUser API, see MSDN – LogonUser function.