O$10.22: GetEnvironmentVariableW

Wayne Germann wgermann at PACIFIC.EDU
Fri Aug 26 23:20:24 UTC 2022


Thsnks Doug

Sent from my iPhone

> On Aug 26, 2022, at 4:10 PM, Doug Easterbrook via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> I have this from my dark history — but I have not used it for years.  so no guarantee of being perfect.  you might have to look the api up to make sure its still the same
> 
> 
> Register DLL ('ADVAPI32.dll','GetUserNameA','ICM’)
> Call DLL ('ADVAPI32.dll','GetUserNameA',NTUserName,255) Returns errorCode
> 
> 
> 
> 
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
> 
>> On Aug 26, 2022, at 3:11 PM, Wayne Germann <wgermann at PACIFIC.EDU> wrote:
>> 
>> 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
>> _____________________________________________________________
>> Manage your list subscriptions at https://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