Can C language be used on windows files??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blackgoat
    New Member
    • Jan 2010
    • 33

    #1

    Can C language be used on windows files??

    Its a really wierd question I guess.. but what I want to know is that can C language .. or any other language for that matter, be used to access, open and execute a file in a windows OS?? eg a power point slide show??

    thanks

    BG
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Well basically yes but there is a whole can or worms to sort out once the basic question is out of the way.

    What were you trying to do?

    Comment

    • blackgoat
      New Member
      • Jan 2010
      • 33

      #3
      Originally posted by Banfa
      Well basically yes but there is a whole can or worms to sort out once the basic question is out of the way.

      What were you trying to do?
      Thanks for replying.

      Well I have to execute a slide show basically.. but I want the file to open only if the system date satisfies the basic requirement like if date<01/01/2011 etc.

      How can I achieve this?

      Thanks again

      BG

      Comment

      • Jyoti Ballabh
        Banned
        New Member
        • Jul 2010
        • 115

        #4
        yea, it's possible but you will need to deal with a plenty of troubleshooting . If you need the file to be date responsive, you could set a numeric counter to begin with followed by conversion to string mode and then comparing it.
        Last edited by Jyoti Ballabh; Jul 22 '10, 06:54 AM. Reason: spell check

        Comment

        • blackgoat
          New Member
          • Jan 2010
          • 33

          #5
          Originally posted by Jyoti Ballabh
          yea, it's possible but you will need to deal with a plenty of troubleshooting . If you need the file to be date responsive, you could set a numeric counter to begin with followed by conversion to string mode and then comparing it.
          okay but I'am not really sure how to go about this.. could you pls help by explaining a bit elaborately.

          thanks

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            I don't think you need to use C to do this. Have you looked at the Task Scheduler in the Control Panel?

            Comment

            • weaknessforcats
              Recognized Expert Expert
              • Mar 2007
              • 9214

              #7
              You will need to use an SDK from Microsoft for this. That is, your slide show example requires a startup iof a PowerPoint process. There is an Office SDK for this.

              Be prepared to address a whole host of issues (not the least of which is learning Windows programming) if you try this.

              Comment

              • Oralloy
                Recognized Expert Contributor
                • Jun 2010
                • 988

                #8
                Let me understand this - you want to build a wrapper for your power-point presentation, which prevents showing the presentation after a given cut-off date.

                I assume that you would also like to prevent the user from accessing the raw file from power-point, and looking at it after the cut-off date.

                Or have I misunderstood your goals?

                Comment

                • blackgoat
                  New Member
                  • Jan 2010
                  • 33

                  #9
                  Originally posted by Oralloy
                  Let me understand this - you want to build a wrapper for your power-point presentation, which prevents showing the presentation after a given cut-off date.

                  I assume that you would also like to prevent the user from accessing the raw file from power-point, and looking at it after the cut-off date.

                  Or have I misunderstood your goals?
                  Yes, that is exactly what I need to do.. using C language or any other programming language was just a wild guess. Please also let me know if there is any other way of going about it.

                  Thanks

                  Comment

                  • Oralloy
                    Recognized Expert Contributor
                    • Jun 2010
                    • 988

                    #10
                    This is getting beyond my ability to code in Windows without research, but ....

                    Create a little program to run and check the date
                    if the date is bad, issue a message and exit.
                    otherwise
                    create a DDE or COM connection to PowerPoint.
                    shove the file across the link.

                    I'm not sure if your code will have to manage the window or not. As I said, this is a bit more complex than I've done before.

                    Comment

                    Working...