O$10.22: GetEnvironmentVariableW

Wayne Germann wgermann at PACIFIC.EDU
Fri Aug 26 22:11:19 UTC 2022


Does anyone know how to get the logged on users name?

-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Phil (OmnisList)
Sent: Friday, August 26, 2022 2:17 PM
To: omnisdev-en at lists.omnis-dev.com
Subject: Re: O$10.22: GetEnvironmentVariableW

CAUTION: This email originated from outside of Pacific. Do not click any links or open attachments if this is unsolicited email.

Hi Greg,

I have different call for the computer name:

Register DLL('kernel32','GetComputerNameW','ICM')

Call DLL('kernel32','GetComputerNameW',lcComputername,255)


But for your call, I think you are missing a parameter:

Register DLL('kernel32.dll','GetEnvironmentVariableW','ICCM')

Call
DLL('kernel32.dll','GetEnvironmentVariableW','COMPUTERNAME',lcComputername,255)

Register DLL('kernel32.dll','GetEnvironmentVariableW','ICCM',kTrue)


regards
Phil Potter
Based in Chester in the UK.

On 26/08/2022 20:38, Grzegorz (Greg) Pasternak wrote:
>
> The following code works on Windows 10 64bit in Omnis Studio 5.1 
> Register DLL ('kernel32.dll','GetEnvironmentVariableW','JCC')
> Call DLL 
> ('kernel32.dll','GetEnvironmentVariableW','COMPUTERNAME',vComputerName
> ) Returns vError
>
> but it does not work on Windows 10 64bit in Omnis Studio 10.22
>
> Any suggestions why?
>
> Grzegorz (Greg) Pasternak
>
>
>
>
>
> _____________________________________________________________
> Manage your list subscriptions athttps://lists.omnis-dev.com Start a 
> new message ->mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com


More information about the omnisdev-en mailing list