DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How to launch a local machine .EXE file

  1. #1
    Shen Guest

    How to launch a local machine .EXE file


    Hi

    I want to launch a local machine .Exe file (Say developed by vb6) form my
    aspx page. Is it possible?



  2. #2
    Silver Surfeur Guest

    Re: How to launch a local machine .EXE file


    Hi there

    Yes it is !

    use the sysimport attribute, as shown bellow:

    class InvokeW32Platform
    {
    [sysimport(dll="user32.dll"]
    public static extern in MessageBoxA(int hWnd, string strMsg, string caption,
    int nType);

    public static main void Main()
    {
    int result;
    result = MessageBoxA(0, "Hello from CLR in C#", "InvokeW32Platform", 0);
    }
    }

    hope this helps

    Silver
    visit us @ http://silverengineering.com


    "Shen" <jc_shen@hotmail.com> wrote:
    >


    >Hi
    >
    >I want to launch a local machine .Exe file (Say developed by vb6) form my
    >aspx page. Is it possible?
    >
    >



  3. #3
    David A. Rothgery Guest

    Re: How to launch a local machine .EXE file

    Shen <jc_shen@hotmail.com> wrote:
    >
    > Thank you for your help.
    >
    > Because I hardly understand C#.
    > Would you please give me some samples by Vb.net?


    Rather than fussing with API magic, just use
    System.Diagnostics.Process.Start

    --
    Dave Rothgery
    Picking nits since 1976
    drothgery@alum.wpi.edu
    http://drothgery.editthispage.com

  4. #4
    Shen Guest

    Re: How to launch a local machine .EXE file


    Thank you for your help.

    Because I hardly understand C#.
    Would you please give me some samples by Vb.net?



    "Silver Surfeur" <sn@silverengineering.com> wrote:
    >
    >Hi there
    >
    >Yes it is !
    >
    >use the sysimport attribute, as shown bellow:
    >
    >class InvokeW32Platform
    >{
    >[sysimport(dll="user32.dll"]
    >public static extern in MessageBoxA(int hWnd, string strMsg, string caption,
    >int nType);
    >
    >public static main void Main()
    >{
    > int result;
    > result = MessageBoxA(0, "Hello from CLR in C#", "InvokeW32Platform", 0);
    >}
    >}
    >
    >hope this helps
    >
    >Silver
    >visit us @ http://silverengineering.com
    >
    >
    >"Shen" <jc_shen@hotmail.com> wrote:
    >>

    >
    >>Hi
    >>
    >>I want to launch a local machine .Exe file (Say developed by vb6) form

    my
    >>aspx page. Is it possible?
    >>
    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center