topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 2:56 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - renjithcr [ switch to compact view ]

Pages: [1]
1
Developer's Corner / Re: Commandline execution VC++ using ShellExec
« on: November 10, 2015, 10:15 AM »
it works with both the versions... Thanks mouser...



2
Developer's Corner / Re: Commandline execution VC++ using ShellExec
« on: November 10, 2015, 09:19 AM »
Yes. those were the closing symbols _T(\") for -captureappbyname "filename.exe"

3
Developer's Corner / Re: Commandline execution VC++ using ShellExec
« on: November 10, 2015, 09:17 AM »


With ShellExecute() i can make a screenshot.

CString sParameters = _T("-save \"") + sImagePath + _T("\" -captureappbyname \"") + sUniNgeExeName + _T("\" -exit");
iRet = (int)ShellExecute(NULL, NULL, GetMiniCapAppPath(), sParameters, NULL, SW_SHOWNORMAL);


but with ShellExecuteEx() and then WaitForSingleObject() as described in my previous post i want to wait until the MiniCap executable exits (using -exit in sParameters). but i see the executable on Task manager. and the function call WaitForSingleObject() waits.



4
Developer's Corner / Re: Commandline execution VC++ using ShellExec
« on: November 10, 2015, 04:35 AM »
Thanks Mouser... it works with ShellExecute()

is there any way to wait until the screen capture is completed? I mean using ShellExecuteEx and WaitForSingleObject functions?

my following code is not working

    SHELLEXECUTEINFO ShExecInfo = { 0 };
    ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
    ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
    ShExecInfo.hwnd = NULL;
    ShExecInfo.lpVerb = NULL;
    ShExecInfo.lpFile = GetMiniCapAppPath().AllocSysString();
    ShExecInfo.lpParameters = sParameters.AllocSysString();
    ShExecInfo.lpDirectory = NULL;
    ShExecInfo.nShow = SW_SHOWNORMAL;
    ShExecInfo.hInstApp = NULL;
    ShellExecuteEx(&ShExecInfo);
    WaitForSingleObject(ShExecInfo.hProcess, INFINITE);


5
Developer's Corner / Commandline execution VC++ using ShellExec
« on: November 05, 2015, 10:49 AM »
 Hi i am trying to save a screenshot file to the following path C:\Users\Rn\Desktop\ScreenshotCaptor. But i cant change the screenshot directory.
 
 i used the following link to find the commandline options : https://www.donation...ptor/help/index.html

 please find my code below. any help is appreciated.

 ////////////////////////////// VC++ code  //////////////////////////////

  CString sApp = _T("C:\\Program Files (x86)\\ScreenshotCaptor\\ScreenshotCaptor.exe");

  CString sParameters = _T("-show -capture screen -format png -dir \"C:\\Users\\Rn\\Desktop\\ScreenshotCaptor\" ");

  CString sWorkDir = _T("C:\\Users\\Rn\\Desktop\\ScreenshotCaptor");

  int nRet = (int)ShellExecute(NULL, NULL, sApp, sParameters, sWorkDir, SW_SHOWNORMAL);

/////////////////////////////////////////////////////////////////////////////

Pages: [1]