En vista de que por otros comentarios tuyos que vi en el foro al parecer utilizas VB.NET, te comento otras dos opciones utilizando directamente la API de Windows.
La primera es mediante una llamada a la función 'SystemParametersInfo' pasándole el valor 'SPI_GETDESKWALLPAPER' (0x0073) al parámetro 'uiAction':
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx<DllImport("User32.dll", SetLastError:=True, CharSet:=CharSet.Auto, BestFitMapping:=False, ThrowOnUnmappableChar:=True)>
Public Shared Function SystemParametersInfo(action As UInteger,
uiParam As UInteger,
<[In]> <Out> pvParam As StringBuilder,
winIni As UInteger
) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function
Modo de empleo:
Public Shared Function GetCurrentWallpaperPath() As String
Dim sb As New System.Text.StringBuilder(capacity:=260)
If Not NativeMethods.SystemParametersInfo(&H73UI, CUInt(sb.Capacity), sb, Nothing) Then
Throw New Win32Exception([error]:=Marshal.GetLastWin32Error())
Else
Return sb.ToString()
End If
End Function
La segunda es mediante la función 'GetWallpaper' de la interfaz 'IActiveDesktop':
https://msdn.microsoft.com/en-us/library/windows/desktop/bb776357%28v=vs.85%29.aspxImports System.Runtime.InteropServices
Imports System.Text
Namespace NativeMethods
<ComImport>
<InterfaceType(ComInterfaceType.InterfaceIsIUnknown)>
<Guid("F490EB00-1240-11D1-9888-006097DEACF9")>
Public Interface IActiveDesktop
Function NotImplemented01() As Integer
<PreserveSig()> Function GetWallpaper(<MarshalAs(UnmanagedType.LPWStr)> buffer As StringBuilder, bufferSize As Integer, reserved As Integer) As Integer
Function NotImplemented02() As Integer
Function NotImplemented03() As Integer
Function NotImplemented04() As Integer
Function NotImplemented05() As Integer
Function NotImplemented06() As Integer
Function NotImplemented07() As Integer
Function NotImplemented08() As Integer
Function NotImplemented09() As Integer
Function NotImplemented10() As Integer
Function NotImplemented11() As Integer
Function NotImplemented12() As Integer
Function NotImplemented13() As Integer
Function NotImplemented14() As Integer
Function NotImplemented15() As Integer
Function NotImplemented16() As Integer
Function NotImplemented17() As Integer
Function NotImplemented18() As Integer
End Interface
End Namespace
Modo de empleo:
Public Shared Function GetCurrentWallpaperPath() As String
Dim typeActiveDesktop As Type = Type.GetTypeFromCLSID(New Guid("{75048700-EF1F-11D0-9888-006097DEACF9}"))
Dim activeDesktop As IActiveDesktop = DirectCast(Activator.CreateInstance(typeActiveDesktop), IActiveDesktop)
Dim sb As New System.Text.StringBuilder(capacity:=260)
Dim result As Integer = activeDesktop.GetWallpaper(sb, sb.Capacity, 0)
If (result <> 0) Then
Marshal.ThrowExceptionForHR(result)
End If
Marshal.ReleaseComObject(activeDesktop)
Return sb.ToString()
End Function