Posts Tagged Microsoft Windows
This error had me “scratching my head” at work this week. I was trying to run a scheduled task which performing some bench marking testing of my parallel load using SqlBulkCopy implementation. I thought I had everything set up correctly, but was getting this error. The “job” was just crashing leaving not a trace, apart from the error code in the Task Scheduler.
I had a network drive mapping as the path to the executable which was to be run (H:\…). This appears to be a big “No No” with scheduled tasks. I also tried using a UNC name to the executable but that did not work either.
Although, this error code is not in the file, WinError.h. The WinError.h file is a very good source of explanations (quick hints) for some errors. Blow is an example of one of the entries in the file. Being able to get just a hint as what the error code is can often be enough to star the process of solving it.
// // MessageId: SPAPI_E_NO_DEVICE_ICON // // MessageText: // // There is no icon that represents this device or device type. // #define SPAPI_E_NO_DEVICE_ICON _HRESULT_TYPEDEF_(0x800F0229L)
The WinError.h file is located at C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include . The file is a C/C++ header file which gets installed when you have C/C++ installed with Visual Studio. or the Windows SDK. The file Windows SDK is available as a separate download and install from MSDN Windows SDK (there are links to downloaded and install the SDK on this page).
This site had a very short explanation for the error code. Something similar content of the WinError.h file. This was enough to get on the right track to solving this problem. DB Security – Win 32 Error Codes.
Copy the contents of .Net build target output from the network onto the C: drive. This scheduled task then worked perfectly.
Simple when you know what the problem is, a real mystery when you don’t.
I wish, that the dialog which is setting up the action of the scheduled task, gave some warning about this potential problem.
Trying to open a compiled help file (chm) which I downloaded from the MSDN site, get the following error:
Windows 7 is being a bit overprotective. Although I say yes I want to open the file:
It may be a useful feature, for some people. It may be my work’s network which has the security levels cranked up to a very high level. For me it is a right pain. Particularly, when I’ve already said yes to one thing only to find I need to do something more.
If you are just venturing into doing things in parallel with Visual Studio this one will be of interest you.
Being someone who is starting out using Visual Studio to develop parallel tasks, I’ve watched some demonstration of the support for parallel tasks in Visual Studio. That was fine, but when I came to get those nice windows up for my project I could not find where they were hidden.
The Parallel Task and Parallel Stack Windows
The only way I have found to get these windows displayed is as follows:
- Put some breakpoints into the code which has parallel activity. I put these break points into the “bits” of code I know are off on parallel tasks.
- Start debugging the program.
- Go to the Debug Tools Tool Bar, and select the “Breakpoints” icon. This then presents the dropdown menu with the parallel tool windows.
- There you can see there are keyboard short cuts to open the windows. This is fine if you can get the menu up and read the shortcuts, but I could never find the option to get the menu up. Why, these items only appear when the program is in “debug mode”.
- This is another one of those, “easy when you know how” type of things. It is not entirely obvious when you start looking for the Parallel tools where to find them.
- There are probably (undoubtable) other ways to get these windows up, but this is the one which I have found.