What does "ShellExecuteEx failed; code 18" mean (on vista) - windows-vista

A buddy of mine has been getting this error mesage when trying to run uninstall programs andor new program apps, windows just shows "ShellExecuteEx failed; code 18" and refuses to run the program.

This Microsoft article explains the system call he tries to make.
A little googling the error codes suggests that 18 means SE_ERR_ACCESSDENIED (In the list the previous one is 11 and the next is 27)
In case this is NOT a programming question, please head over to superuser.com

Related

x32debug exception access violation

I am trying to open a file in a program called DavkaWriter. Most of the files generated from this program I can open. I am facing an issue with a certain file. The software just crashes. I opened DavkaWriter in x32_debugger. I am attaching a screenshot of what looks like the issue. I am running this software on Windows 10 64 bit. The exact error code is "First chance exception on 005004C2 (C0000005, EXCEPTION_ACCESS_VIOLATION)!" The picture is attached as a link. This may be an amateur question but I have never debugged before. Thank you for your help!
First chance exception on 005004C2 (C0000005, EXCEPTION_ACCESS_VIOLATION)!

"The operating system is not presently configured to run this application" Error when Running MAPI App

Thank you for your reply and comments.
Let me describe the situation more detailedly.
I use Visual C++ 2008 to write a small application that will invoke MAPI. I use MAPIStubLibrary to support both 32bit and 64bit MAPI. MAPIStubLibrary can be found at https://msdn.microsoft.com/en-us/library/office/cc963763.aspx#sectionSection2 . It works on other versions of Outlook and most of the systems. However, under Windows 10(32bit) with Office 2016(32bit) installed, when I execute the following statement to initialize MAPI:
MAPIInitialize(NULL);
I will get the above error message "The operating system is not presently configured to run this application". And there will be an unhandled exception raised from the function GetDefaultMapiHandle(), which is in StubUtils.cpp, part of the MAPIStubLibrary.
The exact line that cause the exception is:
hinstMapi = LoadLibraryW(wzPath);
It seems that MAPIStubLibrary is trying to load 32bit MAPI but fails. wzPath is pointing to olmapi32.dll instead of msmapi32.dll.
In the error message, if I click “OK” button in the error messagebox, the application will continue running without problems. However, the error message is still frustrating and confusing the users. Therefore, how to eliminate the error?
Thank you very much.
This usually happens when you are either loading a wrong MAPI dll (e.g. olmapi32.dll instead of msmapi32.dll) or if your app is running in the compatibility mode (do you include a manifest?) and the MAPI system ends up patching wrong Windows API functions assuming an older version of Windows.

running Python 3 in chrome on Windows 8 computer

I have seen other programmers running their code in chrome and I want to do the same with my python 3 programs, but when I follow tutorials I always get an error message.
By default, browsers (chrome or most others) only run javascript code, but not Python code. Python code runs in an interpreter. There are some third party websites that lets you type in some code, but I don't think any of them are great. If you tried one of them, please provide the website and the code you used and the error you got.
'an error message' is never useful. Please detail the particular error you are getting, and any traceback when available..

What Windows error code for expired license?

My C# Windows program checks the license and exits if the license is expired after showing an explanation popup.
What exit code should I use when exiting in such a case?
Environment.Exit(exitCode);
Searching the 0-15999 Windows error codes did not lead me to any obvious one.
Using exit code 1 is OK.
From Hans Passant's comment:
Standard error codes are not better, there is no innocent "license expired" error code defined in Windows. it may lead the user onto a wild goose chase thinking that all the Google hits he gets are accurate. This can get out of hand pretty badly sometimes, he'll reinstall the operating system. You have half a billion error codes available to use for your own error reporting, look in WinError.h for the pattern. If you already report the error then an exit code of 1 is sufficient to indicate gross failure.

"Method '~' of object '~' failed" on starting VB6 IDE

I have noticed that about every third time or so I start up the VB6 IDE, a message box appears with the following error message:-
Method '~' of object '~' failed
This doesn't happen for any particular project or with any other thing in common that I have noticed. It doesn't appear to cause any problems after dismissing the message. My question is: ought I to worry about this, and if so, what should I do about it.
I have noted these other questions about the same error message here, here and here, but I get the message on opening up the project.
This is usually caused by locked clipboard on local machine. VB6 IDE add-ins use clipboard to copy/paste icons to toolbar buttons because the add-in API does not expose any other way of putting an image there.
Usually Remote Desktop client (mstsc.exe) is the culprit of the locked clipboard. The way Microsoft implemented transfer to remote clipboard is by probing local clipboard for available formats which locks it for a while. Clipboard is awfully designed global resource that can be accessed by a single process at a time and OpenClipboard API fails in flames for other processes if the resource is not currently available.
I used to occasionally run into this error and, in my case, it was caused by the Visual Source Safe add-in (bad install I guess; re-install corrected the issue). It never caused a problem; it was just a bother. As Jon stated in the comments, I would try shutting off add-ins to see if that fixes the issue. Another thing is to make sure you are running Service Pack 6.
I don't know about this specific error, but I do have some background information about this error message.
COM defines two levels of error information. All COM methods and properties have a return value with the type HRESULT, where 0 (S_OK) indicates success and negative values indicate an error. In addition there is a mechanism to provide so called "rich error information".
If a COM object generates rich error information, VB6 will show the information provided. If a COM object returns a negative value, but does not provide rich error information, then VB6 shows the message “Method '~' of object '~' failed”.
There are some standard error codes like E_POINTER and E_NOTIMPL which are often returned by COM objects in C++. All of these result in the message “Method '~' of object '~' failed”.
If you are implementing a COM object in C++, my advice is to always generate rich error information. (In ATL you just have to call the Error function.)
I uninstalled Visual Studio 6.0 and then re-installed it. This cleared the “Method '~' of object '~' failed” error for me. My VB 6 now appears to be functioning properly. I believe that, in my case, it has to do with several of the COM objects not being registered properly. My new machine received a ghost image from my old box which had VS on it.
I started getting this error all of a sudden on both of my development machines (one 32-bit, the other 64-bit). In my searching for a solution, someone made a tangential reference to SourceSafe.
Ahh, then it occurred to me that I had been recently cleaning up a project (clearing out .bak files, etc.), and one of the files I cleaned-out was 'MSSCCPRJ.SCC' (seeing how SourceSafe was - for our group - a distant relic, I felt "safe" removing this file from the project folder).
Long story short: restoring the file 'MSSCCPRJ.SCC' to the project folder, resolved this error.
I just came across this error while running VB6 on Windows Server 2012 R2. The offending Add-In was Visual Component Manager 6.0. Once I disabled that, the IDE was able to open without the Method '~' of object '~' failed issue. I'm not sure if that points to an installation issue or just "ancient" software on a "modern" OS.
For anyone else trying to install VB6 on Windows 7, 8, 10, 2012, etc., here are some useful links:
http://www.fortypoundhead.com/newbrowseresults.asp?catid=34
http://it.toolbox.com/blogs/locutus/how-to-install-visual-studio-6-onto-windows-10-70155
I just had the same experience when starting VB6 on my Windows 7 Ultimate desktop PC via a shortcut to a VB6 project (which, of course, starts VB6.) The notification box was titled "Visual Component Manager" and the message was "Method '~' of object '~' failed". It occurred when first starting the VB6 IDE, before the project was visible in the IDE. I have been using this process with this same project for several years with no issues, but today that message box popped up and had to be acknowledged. The one thing that I did differently today, and I believe this caused my problem, was to start an Excel 2007 workbook first and then start the VB6 project about three seconds later. Both were loading at the same time and they were probably battling each other for something they both needed. Starting my VB6 project by itself never results in this. Looking at all these responses, the one common thread seems to be that VB6 is unable to access some resources when they are needed. None of the responses suggest it is a serious problem; in fact, it appears to be simply a minor 'hiccup' until such time as the resources are freed.
I found the ultimate solution!
To avoid the "Method '~' of object '~'" message and avoid any "Windows Installer" message from running at startup of the VB6 IDE:
via the VB6.exe properties (after right-clicking on the file in Windows Explorer), ensure that VB6.exe has compatibility set to "Run in Windows 8" mode.
Ensure that the VB6.exe shortcut is set to NOT run as an Administrator.
With these settings it is OK to load any of the Add-Ins (including Visual Component Manager 6!)
It took me ages to work this out, but now VB6 loads with lightning speed and no annoying error messages.

Resources