Kernel32.dll - CreateFile2

I upgrade Xojo 2023r4 to Xojo 2024r2 and some of my users that still have old Windows 7 PCs have the following problem:


Any advice to solve this without having to ask my customer to upgrade his Windows ?
Thanks

Upgrade the windows version to Windows 10 (64 bists…); they probably use a 32 bits version. Look @ wikipedia for more info.

Thanks Emile, but that is the easy and may be the only one solution… I am asking for a possible (if exists) solution to do not have to ask my customers that still have the old Win 7 to upgrade it.
If any in the community have this problem and found a solution, I will appreciate.

See the MS API documentation:

CreateFile2 requires Windows 8 onwards so your users need to either upgrade their version of Windows or you need to rebuild with an older version of Xojo that doesn’t use CreateFile2.

1 Like

also.

It has nothing to do with 32 bit or 64 bit like Emile suggests.

2 Likes

I was writing my response but Kevin already give the only 2 options I can think of:
a) upgrade to Windows 8.1 or later
b) build with Xojo 2023r4 for them

of course, if you use new features only available in later versions of Xojo, then you should tell your Windows 7 users that the last version they can use is X and they can’t use new versions of your program.

CreateFile2 is new in Windows 8 or Windows Server 2012.
So if you need your application to work on older versions, you need an older Xojo version.

So it is possible to say that “Xojo 2024r2 is not able to produce Windows 7 applications” ???

I don’t have 2024r2’s version of the documentation, but latest build shows this in “Requirements” section of documentation for Desktop apps:

Windows 8.1 is minimum.

1 Like

My guess is: “Xojo 2024r2 may not be able to produce Windows 7 applications” if your app uses something not available.

Thanks to all.
I didn´t pay attention of this limitations when I upgraded my Xojo version.

Can someone explain to me why in Xojo 2023 and 2024 there is the possibility to compile for Window 7 and Windows 8 even if they are no longer supported?
If I provide an option to compile also for these operating systems then the executable should work!

I’m sure, someone at Xojo (like @Geoff_Perlman f.e.) can explain this.

I assume that most functions are still available on these systems, i.e. they work. However, support beyond that cannot be guaranteed. In principle it works, but it is no longer actively supported.
And I have to say that I welcome the fact that you can still compile for these systems, even if 100% functionality is not guaranteed.

Of course, it would be nice if the IDE could point out that function XYZ is not supported on the selected platforms. :blush:

1 Like

But if I create a new project without writing even a line of code and compile the project I can’t run it on Windows 7 and 8, I get the error message of missing DLL libraries.

This happens from Xojo 2023r3 and up, if I try with Xojo 2023r2 instead everything works!

I made an issue for this:
https://tracker.xojo.com/xojoinc/xojo/-/issues/78058

1 Like

That’s correct. You can still build for those versions of Windows but we don’t guarantee everything will work. At some point when we have to remove the ability to compile for those versions, the options will no longer be there. We don’t want to remove it until there’s a very good reason to do so.

1 Like

FWIW, that’s really not what those switches mean. They set flags in the windows manifest so that you could prevent the app from launching on an old OS by sending them to false.

1 Like

Whatever you set the flag, if the Xojo framework references Windows 8 functions, the app won’t run!

2 Likes

I am running into the same issue but with CopyFile2 in kernel32.dll when launching the app.
I compiled my app using Xojo 2021 r1.1 so assume it should work on Windows 7.
So maybe a plugin is the problem? Is there a way to find out?

I guess so.