# How do I use SystemParametersInfoW function?

**URL:** <https://forums.unrealengine.com/t/how-do-i-use-systemparametersinfow-function/2485776>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [May 1, 2025, 7:55pm UTC](https://forums.unrealengine.com/t/how-do-i-use-systemparametersinfow-function/2485776 "2025-05-01T19:55:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Turkale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Turkale](https://forums.unrealengine.com/u/Turkale)\
**Post date:** [May 1, 2025, 7:55pm UTC](https://forums.unrealengine.com/t/how-do-i-use-systemparametersinfow-function/2485776/1 "2025-05-01T19:55:51Z")

</div>

I need to call this Windows function SystemParametersInfoW and

```auto
#include "Windows/AllowWindowsPlatformTypes.h"
#include <Windows.h>
#include "Windows/HideWindowsPlatformTypes.h"

```

includes. But I’m getting

```auto
WallpaperActor.cpp.obj : error LNK2019: unresolved external symbol __imp_SystemParametersInfoW referenced in function "private: class FString__ cdecl AWallpaperActor::GetDesktopWallpaperPath(void)" (?GetDesktopWallpaperPath@AWallpaperActor@@AEAA?AVFString@@XZ)
WallpaperActor.cpp.obj : error LNK2019: unresolved external symbol "public: bool __cdecl IImageWrapper::GetRawImage(struct FImage &)" (?GetRawImage@IImageWrapper@@QEAA_NAEAUFImage@@@Z) referenced in function "private: class UTexture2D *__cdecl AWallpaperActor::LoadTextureFromFile(class FString const &)" (?LoadTextureFromFile@AWallpaperActor@@AEAAPEAVUTexture2D@@AEBVFString@@@Z)

```

errors I cannot fix. I guess I need to add some module to my \*.Build.cs file, but how do I know which one?

---

<div class="post-metadata">

**Author:** ![Turkale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Turkale](https://forums.unrealengine.com/u/Turkale)\
**Post date:** [May 6, 2025, 11:02am UTC](https://forums.unrealengine.com/t/how-do-i-use-systemparametersinfow-function/2485776/2 "2025-05-06T11:02:27Z")

</div>

Solution: I had

`PublicAdditionalLibraries.Add("User32.lib");`

in my Build.cs file, but actually it was not loaded because for some reason UBT was not able to find it. So I just used the full path like:

```auto
PublicSystemLibraries.Add("C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.26100.0\\um\\x64\\User32.Lib");

```

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [June 5, 2025, 11:03am UTC](https://forums.unrealengine.com/t/how-do-i-use-systemparametersinfow-function/2485776/3 "2025-06-05T11:03:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
