question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shcore.dll is present but GetDpiForMonitor does not exist

See original GitHub issue

This is on Windows Server 2012 NOT R2. Seems it has the .dll but not this function

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'GetDpiForMonitor' in DLL 'shcore.dll'.
   at Avalonia.Win32.Interop.UnmanagedMethods.GetDpiForMonitor(IntPtr hmonitor, MONITOR_DPI_TYPE dpiType, UInt32& dpiX, UInt32& dpiY)
   at Avalonia.Win32.WindowImpl.CreateWindow()
   at Avalonia.Win32.WindowImpl..ctor()
   at Avalonia.Win32.Win32Platform.CreateWindow()
   at Avalonia.Controls.Platform.PlatformManager.CreateWindow()
   at Tgstation.Server.ControlPanel.Views.MainWindow..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance[T]()
   at Avalonia.Controls.AppBuilderBase1.Start[TMainWindow](Func1 dataContextProvider)
   at Tgstation.Server.ControlPanel.ControlPanel.Run(IUrlEncoder urlEncoder, IUpdater updater)
   at Tgstation.Server.ControlPanel.Windows.Program.Main()

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ncarrillocommented, Sep 25, 2018

I believe this API call recently gave us grief on Windows 8.1 too. Can’t we just check for IntPtr.Zero from GetProcAddress and avoid the OS check at all?

Read more comments on GitHub >

github_iconTop Results From Across the Web

shcore.dll on Windows 7 -- does it exist?
It is not available on Windows 7. Windows 8.1 or newer is required based on Microsoft's documentation.
Read more >
Shcore.dll issues
I've tried downloading a shcore.dll, but that failed too. ... I dont believe I got an answer for whether or not the shcore.dll...
Read more >
shcore.dll - Win7 missing since upgrade to 21.1
Hi, Since I upgraded my WPF app to 21.1 on app loading, I get error: shcore.dll is missing. I need to support some...
Read more >
[Module] DPI Awareness - PureBasic Forums - English
Applications that are not DPI–aware but are running on a high-DPI ... ErrLog$ = "GetDpiForMonitor function doesn't exist in SHCore.DLL.
Read more >
shcore.dll free download
The program can't start because shcore.dll is missing from your computer. Try reinstalling the program to fix this problem. There was a problem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found