In the Windows API there is a structure called IP_ADAPTER_ADDRESSES_LH.
What does the _LH suffix indicate?
The _LH suffix indicates that the API is valid for Windows Vista or later. LH is short for "Longhorn", which was the code name for Windows Vista.
You may see other suffixes such as:
_W2K: Windows 2000
_W2KSP1: Windows 2000 SP1
_XP: Windows XP or later
Per the IP_ADAPTER_ADDRESSES documentation:
The size of the IP_ADAPTER_ADDRESSES structure changed on Windows XP with SP1 and later. The size of the IP_ADAPTER_ADDRESSES structure also changed on Windows Vista and later. The size of the IP_ADAPTER_ADDRESSES structure also changed on Windows Vista with SP1 and later and on Windows Server 2008 and later. The Length member should be used to determine which version of the IP_ADAPTER_ADDRESSES structure is being used.
...
In the Windows SDK, the version of the structure for use on Windows Vista and later is defined as IP_ADAPTER_ADDRESSES_LH. In the Microsoft Windows Software Development Kit (SDK), the version of this structure to be used on earlier systems including Windows XP with SP1 and later is defined as IP_ADAPTER_ADDRESSES_XP. When compiling an application if the target platform is Windows Vista and later (NTDDI_VERSION >= NTDDI_LONGHORN, _WIN32_WINNT >= 0x0600, or WINVER >= 0x0600), the IP_ADAPTER_ADDRESSES_LH structure is typedefed to the IP_ADAPTER_ADDRESSES structure. When compiling an application if the target platform is not Windows Vista and later, the IP_ADAPTER_ADDRESSES_XP structure is typedefed to the IP_ADAPTER_ADDRESSES structure.
Related
According to the documentation on MSDN, GetShortPathName is in KERNEL32.DLL
I have checked the MSDN documentation, however it is not clear to me whether this call is available in both Windows 64 and 32 bit version.
I can see:
FileAPI.h (include Windows.h);
WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008,
Windows Vista, Windows Server 2003, and Windows XP (include Windows.h)
However the bit version is not mentioned there.
It's present regardless of bitness.
I am developing a few scripts depending upon Windows Management Instrumentation Command-line (WMIC). What is worrying me is support of WMIC for different versions of Windows.
I have found a few pages here and there. For example,
http://ss64.com/nt/wmic.html points "WMIC is available on Vista/Windows 7, Windows XP Professional, but not Windows XP Home". But these links are quite old.
I have already checked WMIC in Windows 7. How to find what are the platforms WMIC support.
Can I assume in the following windows platforms, WMIC is available:
Windows XP
Windows 7 (32bit and 64bit version)
Windows 2007 (32bit and 64bit version)
Windows 2012 (32bit and 64bit version)
WMIC is supported in every SKU of Windows after Windows XP, so, yes, you can assume it will be there.
See http://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx, which states the minimum version of the supported OSes as XP and Server 2003.
You must aware for some changes about WMIC within XP to 7 even higher.
For example, Volume switch there is in Win7 but not WinXP.
I suggest to use and test with minimum state that is WinXP.
On MSDN lot win32 functions contain this statement:
Requirements: Minimum supported client - Windows 2000 Professional.
Is it really necessary to use the pro version, or function works with home version.
I use windows-xp home, and I can run many functions, but one function fails without reason, could be that it fails because I do not use pro version?
There was no "Home" versions of Windows 2000, Professional was the only non-server version released.
If the documentation displays it as the minimum supported version & do not list exceptions for XP, then anything with a minimum of "Windows 2000 Professional" will run on XP Home or Pro.
Is there some list of .dll files that are available on the various freshly-installed Windows platforms (or at least, the recent ones like Win XP and Win 7)? I am looking for a list similar to this one for Windows 2000.
(I am compiling a python app with py2exe, and the application reports which dlls are required for potential distribution with the compiled application, but unfortunately it doesn't tell me which ones are installed by default)
I think this is what you're after (at least for Windows 7).
And here's the Windows XP version.
If you are targeting different windows versions with your application, it is a really good idea to set up a virtual test environment for each of the primary target platforms, for example, using VMware, MS Virtual PC or Oracle Virtual Box. If you then still need the list of all available DLLs, just look in the windows folders after a fresh install in the virtual machine by yourself.
By the way, having a look on the py2exe tutorial site, the example shows up ADVAPI32.dll,
USER32.dll,SHELL32.dll and KERNEL32.dll as DLLs on which the generated files depend. AFAIK those DLLs are primary windows components, not to be deployed by your program, and available under all Windows versions I had to deal with the last 15 years.
This question is about an installation/uninstallation framework i am writing. For uninstallation i use the following mechanism:
msiexec /X {GUID} where GUID is the registrykey that is generated in the uninstall location of the registry hive : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.
For one of the softwares, when i install Microsoft Visual C++ 2008 SP1 Redistributable it generates a GUID {9A25302D-30C0-39D9-BD6F-21E6EC160475} in XP.
However the same software generates a GUID of {1F1C2DFC-2D24-3E06-BCB8-725134ADF989} in Windows 7.
If I uninstall the software and reinstall it in XP and Windows 7 i get the same above mentioned GUIDs again and again.
So why is the GUID different for XP and Windows 7?
Can I be sure that it will be the same on a given operating System (i.e it will always be {9A25302D-30C0-39D9-BD6F-21E6EC160475} in XP for VC++ 2008 SP1 Redist.) ?
What is the mechanism that Windows uses to generate these GUIDs (different for XP and Windows 7 in this case).?
There are a few other softwares(like Acrobat, RealVNC, etc) where the GUID is the same for Windows 7 and XP.
Most applications that use same setup for different versions of windows will have same guid at registry hive.
While some applications use conditional installing by looking up into windows version... in result GUIDs will be different in registry hive. this may work even both windows installer is same, installer can run different setups inside main setup by conditions like windows version, etc...