开发者

What is causing my write to registry to crash with an error message of "Insufficient system resources exist to complete the requested service."

I have made some changes to my application that will allow the application to continue to function in Windows 7. Previously, the application would set and get from Registry.LocalMachine.OpenSubKey("SOFTWARE", True) but, with the advent of Windows 7 that must change. According to Microsoft, ""

Dim key As RegistryKey ' Is a Microsoft.Win32.RegistryKey which is pointing at Registry.CurrentUser.OpenSubKey("SOFTWARE", True)))

My registry key is built from: ExecutionArgs.ApplicationKey(Registry.CurrentUser.OpenSubKey("SOFTWARE", True))

My variables are:

key.Name = "HKEY_CURRENT_USER\SOFTWARE\MyApplication\Application Parame开发者_如何转开发ters"
key.SubKeyCount = 0
key.ValueCount = 5

Dim byts() As Byte ' This byte array has {Length=1965879}

key.SetValue("Constants", byts) ' 

This dies with error message

"Insufficient system resources exist to complete the requested service."

I am including data which appears pertinent to me, if more is necessary please advise.

Has anyone come up against this an been able to overcome it?


Apparently, the root cause and solution to my problem is that in Windows 7 a WPF application cannot be run as an administrator directly.

I have subsequently Changed from storing my data in the registry to storing it in a memorystream.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜