VB6 to check which OS is running [duplicate] - vb6

This question already has answers here:
C++ Check if Windows 10
(4 answers)
Closed 6 years ago.
I have a legacy VB6 application where I'm trying to look up the OS that is running on the machine using the OSVERIONINFOEX function. When the application is run out of IDE, it's telling me that my OS is XP Major Version = 5 and Minor Version = 1, however, when it's run from the executable it tells me that the OS is Windows 8, but it's actually Windows 10. I have not updated the code to Windows 10 but is there a reason why it's giving me two different results why it's doing that?

I suspect that the VB6 IDE is running with certain compatibility flags set, so it thinks the OS is XP, which your program (running from the IDE) then also sees. Outside the IDE the .EXE runs alone and then there may be no such flags or different flags.

Related

How can my app distinguish between Windows 10 and Windows 11?

I use Windows 11 but all apps I install report that I am running Windows 10. How can applications read the correct OS data for Windows 11?
Windows 11's version number is very similar. It's still major version 10, minor version 0. The difference between "Windows 10" and "Windows 11" is the build number being larger 22000. See this blog post.
Basically, unless the application was updated to know about Windows 11, it's going to think it's Windows 10.
It's also important to note that for application compatibility between major versions of Windows, many existing applications are subject an automatic "shim" that lies about the version number in any case. For more, see this blog post.

How to install xcode in windows 10? [duplicate]

This question already has answers here:
To install Xcode in Windows XP
(3 answers)
Closed 7 years ago.
Is it possible to download Xcode in windows guys? can you give me some good links in details on how to install it?
thanks.
Xcode is produced by Apple for Apple hardware, so you are out of luck.
When Swift is open sourced, you'll probably be able to use it with the various IDE's which are out there.
Only way to get XCode to run in windows 10 is to create a virtual machine for OS X inside of your windows 10 OS. This can be done via VirtualBox, which is free. Now unfortunately, since it is VM, it is going to run a lot slower than if it was on its native OS, so I would not recommend going this route unless you have a really good machine, so your better options are looking into hackintosh's, or actual Apple hardware. I myself recommend actual Apple hardware because things go wrong all the time with hackintosh's whenever Apple updates

Can you develop Windows 8 applications on Windows 7 PC and remote debug on a Windows 8 device?

I am trying to work out the least disruptive way of beginning to experiment with Windows 8 development. I currently have a Windows 7 Ultimate PC (plenty of disk space, RAM and i7 CPU), and I have a copy of Windows 8 (not 8.1).
I have considered various options:
Convert my whole machine to Windows 8. (Not ideal right now, as I am in the middle of other work, but I may have to do this eventually).
Dual boot Windows 7 & 8. (Can't get this to work. Windows 7 is already installed, and though I can get Windows 8 to install on the second HD, I can't get its boot menu to see Windows 7. I suspect this would be easier if I installed Windows 8 first, but that would be a huge pain.)
Run either OS using a virtual machine. (I haven't looked into this yet, and I have no idea what is involved.)
As a final option, I wondered if it is possible to develop Windows 8 applications on a Windows 7 PC and remote debug on an attached Windows 8 device? (I'd prefer to do this, as it is a way I have worked often in the past while doing console development.)
Does anyone have any experience of any of this - positive or negative? It takes ages to experiment with this stuff, with the constant threat of recking my existing work environment. I'd really appreciate any advice or pointers to articles that deal with any of this stuff.
Microsoft do their loyal developers no favours. I've paid hundreds for modern hardware, Windows versions and Visual Studio, and still it seems difficult to say the least to develop for their latest OS.
Kind wishes ~ Patrick
Option 4 is not possible. In similar situation I went with option 2 and gratually migrate myself completly to windows 8.
If you have problems with boot try to ask on superuser.com or better search the web for guideline.
If you want to develop applications for Windows 8 don't go with option 3.Please see this post on installing Visual studio in VM.
Regarding option 2,verbatim from Microsoft
You must install the older operating system first, and then install the more recent operating system. If you don't (for example, if you install Windows Vista on a computer already running Windows 7), you can render your system inoperable. This can happen because earlier versions of Windows don't recognize the startup files used in more recent versions of Windows and can overwrite them.
But as #Antonio said there may be roundabout for option 2.

Detecting if Windows is version 8 or 8.1 [duplicate]

This question already has answers here:
How can I detect Windows 8.1 in a Desktop application
(4 answers)
Closed 9 years ago.
Is there any way we can detect "Windows8 to Windows8.1 Upgrade" programatically?
I need one of my application to detect that user has done a OS upgrade?
You want the new Windows Version Helper functions.
Alternatively, use plain old GetVersionEx and the information it puts in the OSVERSIONINFOEX object.
Two minutes of Googling could have gotten you this.

write on windows, compile on mac [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Developing for Mac OS X, on Windows?
my situation is this, i do not have a mac, but need to write an app for a mac in xcode.
is there a way to write and simulate the code in Windows, save the project on a usb drive, and then compile the final package ona friend's mac when everything is OK?
thanks igor
ps: the project MUST be xcode compatible, so any other application with other coding languages is not an option.
If you do not own a mac, then you can try installing mac osx on your intel based PC, with vmware. However you will not attain all the features, but your xcode will run.
Second thing you can do is, share your friends mac os by Team Viewer, but he should not be using at same time.

Resources