Vista API call

I have an application that uses a Windows API call to launch or display files, applications, default email and browser ... But since upgrading to Vista Home Premium the API call will no longer launch an associated program or application... nor will it launch the default email program or default browswer...

Anyone know the correct API or calling procedure in Vista

Jim

 

 

 



Answer this question

Vista API call

  • IndianScorpion

    Which API were you using previously

  • Stojance

    hRet = ::ShellExecute(m_pMainWnd->GetSafeHwnd(), _T("open"), "msinfo32.exe", NULL, NULL, SW_SHOWNORMAL);

    works fine on Vista Ultimate x32. What is the error code returned by ShellExecute http://msdn2.microsoft.com/en-us/library/ms647732.aspx

    Thanks,

    Gabriel Topala

    http://www.gtopala.com


  • Kiran05

    I am currently using the following API...

    'Launch files with associated program in registry
    Declare Function ShellExecute Lib "shell32.dll" _
    Alias "ShellExecuteA" (ByVal hwnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long

    Jim


  • Berber

    Gabriel Topala wrote:

    hRet = ::ShellExecute(m_pMainWnd->GetSafeHwnd(), _T("open"), "msinfo32.exe", NULL, NULL, SW_SHOWNORMAL);

    works fine on Vista Ultimate x32. What is the error code returned by ShellExecute http://msdn2.microsoft.com/en-us/library/ms647732.aspx

    Thanks,

    Gabriel Topala

    http://www.gtopala.com

    lReturn = ShellExecute(ParenthWnd, Verb, sFile, Parameters, sPath, vbNormalFocus)

    Thanx, Gabriel... I am using the same API but my calling statement is for VB6. I have it partially working but when Internet Explorer is minimized, it will not expand to a normal screen. The selected website will load into Explorer, but Explorer stays minimized regardless of what I use for nShowCmd. Whether I use constants, such as vbNormalFocus or numeric values such as 1. Same with my default email.

    However, other minimized applications, such as Word, will expand to a normal window. But Internet Explorer and my default email will not expand when minimized.

    It's very close now... thanks


  • Vista API call