Jump to content
  • Advertisement
Sign in to follow this  
Code Is Your Friend

ShellExecute and .pps

This topic is 3535 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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"? thanks

Share this post


Link to post
Share on other sites
Advertisement
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
Here is the line,

HINSTANCE hint;

hint = ShellExecute(NULL, "open", "\\Test.txt", NULL, "C:\\Program Files\\Pyrosoft\\Utilities", SW_MAXIMIZE);

it returns 0x00000002?
when it opens the txt it returns 0x00000002a

Matt

I called GetLastError and its 2 and 126.

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
Well, I can open a .txt file in the same folder with that line, by swapping the file name, so I know the path is good. And the filename is Test.pps, so I dont know what else to add to the path to fix that?

Matt

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!