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?