ShellExecuteEx

Discussion in 'WASM.ENGLISH' started by dcskm4200, Jun 7, 2007.

  1. dcskm4200

    dcskm4200 New Member

    Blog Posts:
    0
    Joined:
    Oct 12, 2004
    Messages:
    173
    Location:
    China
    Code (Text):
    1.     mov sei.cbSize,sizeof SHELLEXECUTEINFO
    2.     mov sei.fMask,SEE_MASK_NOCLOSEPROCESS
    3.     m2m sei.hwnd,hWnd
    4.     mov sei.lpVerb,NULL
    5.     m2m sei.lpFile,SADD("C:\WINDOWS\SYSTEM32\mspaint.exe")  
    6.    
    7.     m2m sei.lpParameters ,SADD("C:\Documents and Settings\TEST.bmp")  
    8.     mov sei.lpDirectory,NULL   
    9.     mov sei.nShow,SW_SHOWNORMAL
    10.     m2m sei.hInstApp,hInstance
    11.     invoke  ShellExecuteEx,ADDR sei
    if there are some blank characters in sei.lpParameters(the path includes blank characters), ShellExecuteEx will be fail.
    how do i can solve the problem ?
     
  2. Freeman

    Freeman New Member

    Blog Posts:
    0
    Joined:
    Feb 10, 2005
    Messages:
    1,385
    Location:
    Ukraine
    you can simply to do m2m sei.lpFile,SADD("C:\WINDOWS\SYSTEM32\mspaint.exe C:\Documents and Settings\TEST.bmp")
     
  3. asmfan

    asmfan New Member

    Blog Posts:
    0
    Joined:
    Jul 10, 2006
    Messages:
    1,004
    Location:
    Abaddon
    use old 8.3 names.
    /can get them
    Code (Text):
    1. cmd.exe->
    2. dir /x c:
    /
     
  4. dcskm4200

    dcskm4200 New Member

    Blog Posts:
    0
    Joined:
    Oct 12, 2004
    Messages:
    173
    Location:
    China
    thanks you for the response.
    That can't work.

    i hope to change the code, not use old 8.3 names.
     
  5. q_q

    q_q New Member

    Blog Posts:
    0
    Joined:
    Oct 5, 2003
    Messages:
    1,706
    dcskm4200
    Code (Text):
    1. m2m sei.lpParameters ,CTXT(34,"C:\Documents and Settings\TEST.bmp",34)
     
  6. dcskm4200

    dcskm4200 New Member

    Blog Posts:
    0
    Joined:
    Oct 12, 2004
    Messages:
    173
    Location:
    China
    Hello,q_q
    that's all

    Thank you very much.