Windows Version Information

Discussion forum about all things Team Developer 5.x and 6.x
clemdoc
Austria
Posts: 251
Joined: 08 Mar 2017, 09:51
Location: Austria

Windows Version Information

Post by clemdoc » 10 Dec 2018, 17:14

Hi y'all,

we have interesting problems with Windows 10 in combination with compatibility mode. Maybe someone here has had similar problems or can share some thoughts...
Our main problem is that our program, if run in "Windows 7 compatibility mode", doesn't seem to be willing to load VBA for Word when automated via COM.

If Word is started manually before performing all the COM automatosation, everythings works fine.

So a quick and dirty work around would be to tell the user to start Word manually if this situation is detected. That should not be too difficult, as we could check the difference beteween GetVersionEx[1] (which will return 6.1 if runs in Windows 7 compatibility mode) and NetServerGetInfo[2] (which will always return 10.0 for Windows 10).

Did anybody ever use NetServerGetInfo? It's not in the WinApi-Declarations in the Sample Vault and it seems to be kind of annoying to define. I'll have a go at it but if anyone has a smart idea, I'd be happy to listen.

Greetings,
Clemens

[1] https://docs.microsoft.com/en-us/window ... versionexa (yes, deprecated... but still working)
[2] https://docs.microsoft.com/en-us/window ... vergetinfo

thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 198
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

Re: Windows Version Information

Post by thomas.uttendorfer » 11 Dec 2018, 11:43

Hi Clemens,

attached is an example to call NetServerGetInfo from Gupta.
It's indeed a bit complicated to call it from Gupta.

Regards Thomas
You do not have the required permissions to view the files attached to this post.
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

clemdoc
Austria
Posts: 251
Joined: 08 Mar 2017, 09:51
Location: Austria

Re: Windows Version Information

Post by clemdoc » 12 Dec 2018, 12:40

Hi Thomas,

thank you, that's very kind of you.
I have come up with something similar, but as I needed only the version numbers, I didn't bother with fetching the strings as well. Very nice!

Kind regards, Clemens

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests