O$10.22: GetEnvironmentVariableW

Phil (OmnisList) phil at pgpotter.co.uk
Fri Aug 26 21:16:43 UTC 2022


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  


More information about the omnisdev-en mailing list