# Kernel32.dll - CreateFile2

**URL:** <https://forum.xojo.com/t/kernel32-dll-createfile2/83446>\
**Category:** Windows\
**Created:** [December 3, 2024, 5:07pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446 "2024-12-03T17:07:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariano\_Poli](https://forum.xojo.com/user_avatar/forum.xojo.com/mariano_poli/32/340_2.png) [@Mariano\_Poli](https://forum.xojo.com/u/Mariano_Poli)\
**Post date:** [December 3, 2024, 5:07pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/1 "2024-12-03T17:07:26Z")

</div>

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

 ![kernel32](https://forum.xojo.com/uploads/default/original/3X/9/8/98778e59b89e46126dea99656cff1dff71a723c7.jpeg)  
Any advice to solve this without having to ask my customer to upgrade his Windows ?  
Thanks

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 3, 2024, 5:14pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/2 "2024-12-03T17:14:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mariano\_Poli](https://forum.xojo.com/user_avatar/forum.xojo.com/mariano_poli/32/340_2.png) [@Mariano\_Poli](https://forum.xojo.com/u/Mariano_Poli)\
**Post date:** [December 3, 2024, 5:22pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/3 "2024-12-03T17:22:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kevin\_g](https://forum.xojo.com/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kevin\_g](https://forum.xojo.com/u/kevin_g)\
**Post date:** [December 3, 2024, 5:22pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/4 "2024-12-03T17:22:49Z")

</div>

See the MS API documentation:

> **[CreateFile2 function (fileapi.h) - Win32 apps](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2)**
>
> Creates or opens a file or I/O device.

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.

---

<div class="post-metadata">

**Author:** ![kevin\_g](https://forum.xojo.com/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kevin\_g](https://forum.xojo.com/u/kevin_g)\
**Post date:** [December 3, 2024, 5:24pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/5 "2024-12-03T17:24:47Z")

</div>

also.

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

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [December 3, 2024, 5:27pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/6 "2024-12-03T17:27:06Z")

</div>

> [@Mariano\_Poli](#):
>
> Any advice to solve this

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.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [December 3, 2024, 5:32pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/7 "2024-12-03T17:32:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mariano\_Poli](https://forum.xojo.com/user_avatar/forum.xojo.com/mariano_poli/32/340_2.png) [@Mariano\_Poli](https://forum.xojo.com/u/Mariano_Poli)\
**Post date:** [December 3, 2024, 5:38pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/8 "2024-12-03T17:38:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Anthony\_Dellos](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_dellos/32/208_2.png) [@Anthony\_Dellos](https://forum.xojo.com/u/Anthony_Dellos)\
**Post date:** [December 3, 2024, 5:41pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/9 "2024-12-03T17:41:30Z")

</div>

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

 ![image](https://forum.xojo.com/uploads/default/original/3X/c/f/cf695d55d670376341d1ff383af31e76b4e99b82.png)

Windows 8.1 is minimum.

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [December 3, 2024, 5:47pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/10 "2024-12-03T17:47:15Z")

</div>

> [@Mariano\_Poli](#):
>
> So it is possible to say

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

---

<div class="post-metadata">

**Author:** ![Mariano\_Poli](https://forum.xojo.com/user_avatar/forum.xojo.com/mariano_poli/32/340_2.png) [@Mariano\_Poli](https://forum.xojo.com/u/Mariano_Poli)\
**Post date:** [December 3, 2024, 6:14pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/11 "2024-12-03T18:14:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Vincenzo\_Azzone](https://forum.xojo.com/user_avatar/forum.xojo.com/vincenzo_azzone/32/11754_2.png) [@Vincenzo\_Azzone](https://forum.xojo.com/u/Vincenzo_Azzone)\
**Post date:** [December 11, 2024, 8:43am UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/12 "2024-12-11T08:43:42Z")

</div>

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!

 ![Screenshot 2024-12-11 alle 09.36.44](https://forum.xojo.com/uploads/default/original/3X/6/e/6e1dad76a066eb391629cfbdf06f1c02d67063dc.png)

---

<div class="post-metadata">

**Author:** ![Sascha\_S](https://forum.xojo.com/user_avatar/forum.xojo.com/sascha_s/32/22328_2.png) [@Sascha\_S](https://forum.xojo.com/u/Sascha_S)\
**Post date:** [December 11, 2024, 9:06am UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/13 "2024-12-11T09:06:57Z")

</div>

> [@Vincenzo\_Azzone](#):
>
> 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?

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. 😊

---

<div class="post-metadata">

**Author:** ![Vincenzo\_Azzone](https://forum.xojo.com/user_avatar/forum.xojo.com/vincenzo_azzone/32/11754_2.png) [@Vincenzo\_Azzone](https://forum.xojo.com/u/Vincenzo_Azzone)\
**Post date:** [December 11, 2024, 9:59am UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/14 "2024-12-11T09:59:05Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [December 11, 2024, 10:27am UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/15 "2024-12-11T10:27:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Geoff\_Perlman](https://forum.xojo.com/user_avatar/forum.xojo.com/geoff_perlman/32/48_2.png) [@Geoff\_Perlman](https://forum.xojo.com/u/Geoff_Perlman)\
**Post date:** [December 11, 2024, 4:06pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/16 "2024-12-11T16:06:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Greg\_O](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o/32/22785_2.png) [@Greg\_O](https://forum.xojo.com/u/Greg_O)\
**Post date:** [December 11, 2024, 4:19pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/17 "2024-12-11T16:19:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [December 11, 2024, 5:50pm UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/18 "2024-12-11T17:50:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Fabian\_Eschrich](https://forum.xojo.com/user_avatar/forum.xojo.com/fabian_eschrich/32/292_2.png) [@Fabian\_Eschrich](https://forum.xojo.com/u/Fabian_Eschrich)\
**Post date:** [April 15, 2025, 5:18am UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/19 "2025-04-15T05:18:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [April 15, 2025, 7:24am UTC](https://forum.xojo.com/t/kernel32-dll-createfile2/83446/20 "2025-04-15T07:24:13Z")

</div>

> [@Fabian\_Eschrich](#):
>
> …CopyFile2 in kernel32.dll… Xojo 2021 r1.1 so assume it should work on Windows 7.  
> So maybe a plugin is the problem?

I guess so.

[Next page](https://forum.xojo.com/t/kernel32-dll-createfile2/83446.md?page=2)
