F
FatP
I have a VBA program which uses the WIN32API GetVersionExA:
Private Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As
Boolean
....
Dim theOsVersionInfo As OSVERSIONINFO
theOsVersionInfo.dwOSVersionInfoSize = 148
If GetVersionEx(theOsVersionInfo) Then
...
else
...
end if
When windows is started in Normal mode, the If statement flows into
the else block. And all the fields in theOsVersionInfo have initial
values.
It works when windows is started in Safe mode.
Windows Version: XP SP2, with most hotfix applied
Excel version: 2003 SP2
Any suggestion? Thanks
Private Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As
Boolean
....
Dim theOsVersionInfo As OSVERSIONINFO
theOsVersionInfo.dwOSVersionInfoSize = 148
If GetVersionEx(theOsVersionInfo) Then
...
else
...
end if
When windows is started in Normal mode, the If statement flows into
the else block. And all the fields in theOsVersionInfo have initial
values.
It works when windows is started in Safe mode.
Windows Version: XP SP2, with most hotfix applied
Excel version: 2003 SP2
Any suggestion? Thanks