[HELP] Is it possible?

This is a discussion on [HELP] Is it possible? within the C Programming forums, part of the General Programming Boards category; Hi all,i wannca ask something! There is a swf file, can i write a instruction in c to open it ...

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    41

    [HELP] Is it possible?

    Hi all,i wannca ask something!
    There is a swf file, can i write a instruction in c to open it instead of double click to open it by myself?
    because i'm making a hardware , i'll control it through C and i wanna receive the signal form that device to
    open the swf, is it possible?
    Thx !

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,175
    Check out the system() function.
    If you understand what you're doing, you're not learning anything.

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    If you're talking about a program in a microcontroller... you would have to write the code for .swf decoding on your own.

    It you're talking about a program on your PC... you can use ShellExecute() (or the linux equivalent) to launch the file for you.

  4. #4
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by CommonTater View Post
    If you're talking about a program in a microcontroller... you would have to write the code for .swf decoding on your own.

    It you're talking about a program on your PC... you can use ShellExecute() (or the linux equivalent) to launch the file for you.
    Yes! The program is running on my PC! Is ShellExecute() hard to use?

  5. #5
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by anthonyung View Post
    Yes! The program is running on my PC! Is ShellExecute() hard to use?
    ShellExecute Function (Windows)

    Google is your friend....

  6. #6
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by CommonTater View Post
    ShellExecute Function (Windows)

    Google is your friend....
    OK,i'm going to try it. Thank for your help!

  7. #7
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by CommonTater View Post
    ShellExecute Function (Windows)

    Google is your friend....
    I do it man! is there any way to detect if i close that program?

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by anthonyung View Post
    I do it man! is there any way to detect if i close that program?
    There is but it's a lot more complex than opening it...

    Are you working with GIU windows or console windows?

    If it's a gui window you can try to use FindWindow() and when that fails you'll know the program is closed.

    There is another, far more reliable method but I'm not going to explain it here. If I did I would be giving unscrupulous readers some of the core methods used in viruses... I certainly wouldn't want to be responsible for that. But you can see it working in my Remote Media Server as you open and close programs....
    Last edited by CommonTater; 02-19-2011 at 02:18 PM.

  9. #9
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    612
    Quote Originally Posted by anthonyung View Post
    I do it man! is there any way to detect if i close that program?
    Check out the system() function.
    Job done

    There is another, far more reliable method but I'm not going to explain it here.
    I wouldn't call them much if a virus writer if they weren't familiar with SetWindowsHookEx or RegisterShellHookWindow.

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    "adeyblue
    antagonizing is fun"

    Welcome to my ignore list.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [Help] Help me check my comments
    By exjames1991 in forum C Programming
    Replies: 10
    Last Post: 10-20-2009, 01:17 AM
  2. [HELP] syntax error at the end of imput
    By Zerthyl in forum C++ Programming
    Replies: 4
    Last Post: 06-16-2009, 05:36 AM
  3. [Help] About reverse string
    By kingofdcp in forum C Programming
    Replies: 3
    Last Post: 06-06-2009, 03:53 AM
  4. [HELP] functions to detect non-numerical
    By Dakaa in forum C Programming
    Replies: 17
    Last Post: 06-02-2009, 07:30 PM
  5. [HELP] key press
    By Dakaa in forum C Programming
    Replies: 6
    Last Post: 05-30-2009, 12:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21