VS 2008 Windows API Code Pack - ApplicationRestartRecoveryManager?
Jun 5, 2011
I am looking for verification on whether Application Restart and Recovery APIs work on Windows Vista or not. In the documentation the introduction says it designed for both Windows7 and Vista. Windows API Code Pack for Microsoft® .NET Framework provides a source code library that can be used to access some features of Windows 7 and Windows Vista from managed code.I did surf thru the issue tracker on the API home page, nothing mentioned on restart/recovery issues.
In the download, there are two sample projects specific to restart/recovery of an application, which has stopped responding (AppRestartRecoveryDemo), one in VB.NET and the second in C#. I tried both with dbWin32 to monitor that various operations ran and that there were no exceptions raised. All operations ran without raising an exception other than the restart failed and the initial recovery worked. Before working with the above projects I did rebuild the core libraries rather than use the supplied binaries.
When first running the project you must wait 60 seconds for recovery/restart mode to be possible along with registering for recovery using the following.
ApplicationRestartRecoveryManager.RegisterForApplicationRestart( _
New RestartSettings("/restart", RestartRestrictions.None))
I changed the restrictions above seeing if this would make a difference in regards to restart failing but it did not.In RegisterForApplicationRestart a check is made to ensure the app is running at least under Vista ThrowIfNotVista It works as I am on Vista. Next RegisterApplicationRecoveryCallback sets up the callback method (see figure 1) to invoke when the app crashes. So when a crash occurs I have verified all code up to Debug.WriteLine("Application shutting down...") executes in the Recovery callback and assume that ApplicationRestartRecoveryManager.ApplicationRecoveryFinished(True) and the return statement execute, as there are no exceptions thrown.
After the recovery callback method finishes I expect the app to restart. The "application is not responding" dialog says that the application will now restart but instead the application closes and never restarts. I am curious if someone else has worked with recovery/restart API and had success on Window's Vista to restart an application.' This method is invoked by WER.
Private Function RecoveryProcedure(ByVal state As Object) As Integer
Debug.WriteLine("ARR: Recovery procedure called!!!")
PingSystem()
[code]....
View 1 Replies
ADVERTISEMENT
Nov 22, 2010
I'm compiling and testing the VB programs in a download from MS of the Windows API Code Pack at url...(which is in VS 2008 and needs to be converted to run on VS 2010). So far I've resolved most of the issues, but a couple are baffling.The code as downloaded for the Taskbar demo refers to icons in the project resources as My.Resources.Green and My.Resources.Yellow and Red. Fatal errors, even though all the help pages say this is the correct way to access them. I got the build to run by removing the "My."; has there been a syntax change between VS 2008 and 2010? When I run the app, I get a message from TaskbarDemo.vshost.exe which says "This demo application needs to register .txt files as associated files to properly execute the Task related features. Filetype is not registered." Does that mean that in trying to debug the app, I have to modify the registry to associate the test program with the .txt filetype?
View 4 Replies
May 26, 2011
How to programmatically refresh the ExplorerBrowserControl? I can press F5 to refresh, but I want to put a refresh button for it.
View 5 Replies
Apr 14, 2010
I recently downloaded the Windows API code pack for .net, and seeing there was VB.net examples inside there, I opened them up. Upon building I get a warning that the referenced components 'Core' and 'Shell' could not be found. Looking in the code pack folder I see there are no DLLs at all, but instead a whole load of C# sources.
Do I have to download C# Express (which I want to avoid) to use the code pack or are there precompiled DLLs somewhere?
View 3 Replies
Apr 14, 2010
is this even necessary in VS2010 & .NET 4.0? I've been trying to take advantage of the new Windows 7 taskbar interfaces like the Jump List. The MSDN documentation/tutorial instructs me to include a System.Windows.Shell, but apparently Shell isn't a member of System.Windows. I downloaded the API code pack, but I am unsure of what to do with it. The instructions say to open the main solution file and build it:QuoteTo build the library (except the DirectX related features) in Visual Studio 2008, please extract the contents of the �WindowsAPICodePack.zip� file in a new folder and build the included �WindowsAPICodePack.sln� file.And so I did that, but that is the extent of the instructions. I thought maybe it was a Visual Studio extension, so I tried accessing Shell again to no avail. Do I need to add each of the respective namespaces' projects to the target solution to use the API Code pack?
View 6 Replies
Nov 29, 2010
I decided to have a play around with the Windows API Code Pack and so far it has had some very interesting things. Something which I like in particular is AeroGlass. I have created a project to mess around with it to see how it works etc. and I am having some difficulties with the tranparency. If I put a textbox on the form for example, it displays fine. The text however is barely readable unless the form is over a dark background. The solution seemed obvious. Change the transparency key. However, there wasn't one set. Adding one stops the glass effect from working.
View 2 Replies
Apr 5, 2010
How to pack mine program ..to be protected from edit with Resource Hacker or Hex ?
View 1 Replies
Jul 14, 2009
I've been trying to find the Feature Pack for Visual Basic 2008, but all I seem to be able to find in the one of C++.
View 1 Replies
Mar 3, 2010
I want to check the service pack of my vs2008 but i find this:where is the service pack version gone How to check the service pack of my vs2008?
View 21 Replies
Jun 20, 2009
I have written a program in VB Express 2008 and published it so I can install on another PC. When trying to install on another PC I get the error message "Microsoft.VisualBasic.PowerPack.Vs Version 9.0.0.0 be installed in the Global Cache (GAC) first" I have already installed the .NET 3.5 and the PowerPack but I still get the message.
View 2 Replies
Jan 20, 2010
Is it possible to edit the Windows Form Designer generated code in VS2008?
View 4 Replies
Dec 18, 2007
Does anyone have code for Extracting Windows XP Product Key Code in VB 2008?
View 2 Replies
Feb 15, 2010
I used this code to make my program to startup with windows it should add a registry entry:
Dim key As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWAREMicrosoftWindowsCurrentVersionRun", True)
key.SetValue("MyApp", Application.ExecutablePath)
The problem is that it underline KEY and say declaration expected but shouldn't dim do the job for the declaration.
View 4 Replies
Apr 29, 2009
What is the best way to return a exit code from a windows forms application?
View 3 Replies
Mar 29, 2009
I have been developing windows and web application using Visual Basic 2005 for a long time. Now i want to change from Visual Basic 2005 to Visual Basic 2008. I would like to know what ever projects i have done in visual basic 2005 will works in Visual Basic 2008. Will the existing code in visual basic 2005 supports Visual Basic 2008 or do i need lot of modification. I haven't used VB 2008 but i hear that most of the code which written in visual basic 2005 supports visual basic 2008. What are the things i need to take care when working the existing projects in visual basic 2008.
View 3 Replies
Dec 13, 2009
I do not want a Windows Media Player control on my form. I am making an alarm clock. I have tried this: Friend WithEvents WindowsMediaPlayer As New Microsoft.Win32. But I do not see a Windows Media Player member. I also asked on the MSDN VB Forum.
View 1 Replies
Mar 31, 2009
how to generate code from user input. In Visual Studio 2008, Visual BasicI am new to this so I will try to explain the best I can.[code]I would also like to have these available on the UI but wont generate unless a user checks a box to add them or there is a box already for them but wont step into the code unless the user enters something into the box.Is there anyone that can explain how I would go about doing this. Or maybe some kind of visual studio plugin that will help me out. Or reference?I don't need anyone to do this for me I just need an explanation of how to do this or some kind of reference. Would this be a text template?
View 2 Replies
Mar 30, 2009
How to generate code from user input. In Visual Studio 2008, Visual Basic. My script always begins with:
Code:
function Init(Quest)
Then from here a user would input a quest name, type and zone in a interface using windows forms.
Ex:
Code:
RegisterQuest(Quest, "Kill Zombies", "Heritage", "Firestorm")
end
This part a user would enter in his interface what would an NPC say if accepted.
[Code] .....
What I need is a few text boxs that a user can input "Kill Zombies" or whatever they like and when they push a generate button it will create a file with a .quest extension. All of the code remains the same except for the quotes that would be the user input from the interface. Basically everything in quotes can be changed by the user in an interface. I have created my own functions for when a user accepts, deny and complete a quest. The user just needs to input what should happen then click a generate button to throw it all together as a .quest file to be saved in his or her quest folder for the server to call on later.
I also have many other functions like:
AddQuestRewardFaction --- (Quest, Faction ID, Amount)
AddQuestRewardCoin --- (Quest, Copper, Silver, Gold, Plat)
AddQuestStepObtainItem --- (Quest, Step ID, Description, Quantity, Percentage, TaskGroupText, Item ID(s))
Etc
I would also like to have these available on the UI but wont generate unless a user checks a box to add them or there is a box already for them but wont step into the code unless the user enters something into the box.
View 4 Replies
Mar 6, 2010
I made a code that starts the Disk Check on boot time it works fine on Windows Vista and Windows Xp but on windows 7 I checked the path at were windows 7 stores BootExecute and it is on the same path. Maybe the system is blocking it. Or do i have to change the code.
Here is the code:
Dim rk As Microsoft.Win32.RegistryKey
rk = My.Computer.Registry.LocalMachine.OpenSubKey("SYSTEMCurrentControlSetControlSession Manager", True)
rk.SetValue("BootExecute", "autocheck autochk /p ??" & Drive) 'Turn ON
The Drive String just gets the name of the drive for example C: or D:
I had more problems coding for a windows 7 machine then Vista.
View 8 Replies
Feb 15, 2009
I need to convert the following code to work in a visual studio 2008 windows form application, the moment ObjectQuery, ManagementObjectSearcher, ManagementObject and ManagementObjectCollection are not valid.
im objectQuery As New ObjectQuery("SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionId IS NOT NULL")
Dim searcher As New ManagementObjectSearcher(Scope, objectQuery)
[code].....
View 4 Replies
Jan 19, 2010
I'm porting code that I wrote for use in a Windows Forms application to a Windows Service, but for some reason, the code that worked in the Windows Forms application is now throwing errors in the Service
View 7 Replies
Jul 18, 2011
Dim wiaManager As WiaClass = Nothing ' WIA manager COM object
Dim wiaDevs As CollectionClass = Nothing ' WIA devices collection COM object
Dim wiaRoot As ItemClass = Nothing ' WIA root device COM object
Dim wiaPics As CollectionClass = Nothing ' WIA collection COM object[code]....
View 2 Replies
Oct 25, 2011
I have a VB.net project that i've published through a click once installation which was compiled in Windows XP the application contains a previous version of True DB grid which is not supported windows 7 so i'm trying to get my application to work in Windows 7 so that the true db grid and other such controls work without any issue. i tried compiling the code in x86 mode
View 2 Replies
Apr 4, 2012
I'm currently writing a small app that uses sqlite database.there's is system.web.sqlite.dll required to use this database and it isn't installed with .net framework by default.My client wants his app to be only 2 files (.sqlite database + exe file) with no additional DLLs etc.How to pack this DLL into exe?I tried adding this to resources and creating this file dynamically when the form loads, but it didn't worked.
View 6 Replies
Aug 26, 2009
i need to add framework3.5 with my application insatalation pack (.msi)so i don't let the customer download framework3.5 from internet i have to add the gframework3.5 with msi
View 11 Replies
Jul 12, 2010
component id for Visual Basic Power Pack 3.0.I need to determine if or not it is installed on my system for my setup.
View 3 Replies
Oct 22, 2010
There's plenty of examples out there for other languages. Are there any examples for vb.net?
View 1 Replies
Nov 27, 2011
i am trying to get the value from this code:
<DIV id=lcm_simlive_countdown>00 Days, 06 Hours, 40 Minutes, 35 Seconds</DIV>
I have tried the following to do so:
Dim theVidURL As String = doc.DocumentNode.SelectSingleNode("//DIV[@id='lcm_simlive_countdown']").Attributes("value").Value
But it tells me Object reference not set to an instance of an object.
View 1 Replies
Dec 6, 2010
I know how to use My.Computer.Info.OSFullName to get the version of the OS. How would I go about getting the Service Pack version?
I need this to work on all versions of Windows.
Also, is there a way to check and see if the activation has been successfully completed?
View 1 Replies
Mar 19, 2009
Is there a Service Pack 1 for Visual Studio 2005 (Professional Edition)? The only one I see is for Team something or other....
View 3 Replies