Sign in to follow this  
Code Is Your Friend

ShellExecute and .pps

Recommended Posts

Quote:
Original post by Code Is Your Friend
I am having trouble opening a .pps (powerpoint slide) file useing ShellExecute. I can open a text file, and a bitmap in the same folder using it, but it wont open the pps, does it need a special "verb"?
Can we see your ShellExecute line? And what does ShellExecute() return?

Share this post


Link to post
Share on other sites
ShellExecute

"Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. The following table lists the error values."

What error value are you getting?

"Because ShellExecute can delegate execution to Shell extensions (data sources, context menu handlers, verb implementations) that are activated using Component Object Model (COM), COM should be initialized before ShellExecute is called."

This might be the problem.

See also ShellExecuteEx

Share this post


Link to post
Share on other sites
Error code 0x00000002 is "file not found", so it looks like you're not specifying the right path to the text file you're trying to open.

For future reference the Win32 Error Codes are listed here, and you can also use FormatMessage to get a string description of the error code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this