|
-
Jul 18th, 2003, 05:35 AM
#1
Thread Starter
Member
ShellExecuteEx problem
Hi friends,
One new problem. Not working the following simple codes.
SHELLEXECUTEINFO shell;
// set struct parameters
shell.cbSize = 1028;
shell.fMask = SEE_MASK_NOCLOSEPROCESS;
shell.hwnd = m_hWnd;
shell.lpVerb = "print";
shell.lpFile = "C:\Documents and Settings\avaneesh\Desktop\This is Geodesic Company.doc";
shell.nShow = SW_SHOW;
shell.hInstApp = AfxGetInstanceHandle();
shell.lpDirectory = "C:\Documents and Settings\avaneesh\Desktop";
shell.lpParameters = NULL;
// print the file
int val = ShellExecuteEx(&shell);
DWORD dword = GetLastError();
//ShellExecuteEx
Any help?
-
Jul 18th, 2003, 07:11 AM
#2
What message does GetLastError() give you?
Look at the docs to see how to get the textual message.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jul 18th, 2003, 08:02 AM
#3
Thread Starter
Member
Yes that I got and looked in LookUpError and got message as
"Access denied". It means I am not able to get access to printer which is remote (as I am on LAN). But same time I tried printing a .doc file it prints.
What you about codes. I find it correct. Then ...?????
-
Jul 18th, 2003, 08:16 AM
#4
Strange, if it doesn't have permission it should pop up a box asking for a password...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|