Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Loading data

Loading data

Scheduled Pinned Locked Moved COM
questioncomgraphicsgame-devsysadmin
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jacksonh
    wrote on last edited by
    #1

    This is probably a dumb question I am pretty new to ActiveX though. I built a simple ActiveX control using App wizard and got an OpenGL renderer running in my browser, but now I need to be able to load data. Can someone tell me how I am supposed to do this? I'd like to have a data file stored on the server and be able to open it in my ActiveX control. Any help would really be appreciated, Jackson

    M 1 Reply Last reply
    0
    • J Jacksonh

      This is probably a dumb question I am pretty new to ActiveX though. I built a simple ActiveX control using App wizard and got an OpenGL renderer running in my browser, but now I need to be able to load data. Can someone tell me how I am supposed to do this? I'd like to have a data file stored on the server and be able to open it in my ActiveX control. Any help would really be appreciated, Jackson

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      Check FILE Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
      Wish You Were Here-Pink Floyd-1975

      J 1 Reply Last reply
      0
      • M Mazdak

        Check FILE Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
        Wish You Were Here-Pink Floyd-1975

        J Offline
        J Offline
        Jacksonh
        wrote on last edited by
        #3

        Not sure I know what you mean. Could you give me a few more clues?

        M 1 Reply Last reply
        0
        • J Jacksonh

          Not sure I know what you mean. Could you give me a few more clues?

          M Offline
          M Offline
          Mazdak
          wrote on last edited by
          #4

          FILE is a structure and you can use it to open,read, or write files with it.You said you have a data file and you want to read it from your ACtiveX. This is an example from MSDN:

          /* FOPEN.C: This program opens files named "data"
          * and "data2".It uses fclose to close "data" and
          * _fcloseall to close all remaining files.
          */

          FILE *stream, *stream2;

          void main( void )
          {
          int numclosed;

          /* Open for read (will fail if file "data" does not exist) */
          if( (stream = fopen( "data", "r" )) == NULL )
          printf( "The file 'data' was not opened\n" );
          else
          printf( "The file 'data' was opened\n" );

          /* Open for write */
          if( (stream2 = fopen( "data2", "w+" )) == NULL )
          printf( "The file 'data2' was not opened\n" );
          else
          printf( "The file 'data2' was opened\n" );

          /* Close stream */
          if( fclose( stream ) )
          printf( "The file 'data' was not closed\n" );

          /* All other files are closed: */
          numclosed = _fcloseall( );
          printf( "Number of files closed by _fcloseall: %u\n", numclosed );
          }

          Is that what you want or I misunderstood your problem? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
          Wish You Were Here-Pink Floyd-1975

          J 1 Reply Last reply
          0
          • M Mazdak

            FILE is a structure and you can use it to open,read, or write files with it.You said you have a data file and you want to read it from your ACtiveX. This is an example from MSDN:

            /* FOPEN.C: This program opens files named "data"
            * and "data2".It uses fclose to close "data" and
            * _fcloseall to close all remaining files.
            */

            FILE *stream, *stream2;

            void main( void )
            {
            int numclosed;

            /* Open for read (will fail if file "data" does not exist) */
            if( (stream = fopen( "data", "r" )) == NULL )
            printf( "The file 'data' was not opened\n" );
            else
            printf( "The file 'data' was opened\n" );

            /* Open for write */
            if( (stream2 = fopen( "data2", "w+" )) == NULL )
            printf( "The file 'data2' was not opened\n" );
            else
            printf( "The file 'data2' was opened\n" );

            /* Close stream */
            if( fclose( stream ) )
            printf( "The file 'data' was not closed\n" );

            /* All other files are closed: */
            numclosed = _fcloseall( );
            printf( "Number of files closed by _fcloseall: %u\n", numclosed );
            }

            Is that what you want or I misunderstood your problem? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
            Wish You Were Here-Pink Floyd-1975

            J Offline
            J Offline
            Jacksonh
            wrote on last edited by
            #5

            I guess I wasn't clear, I do know how to open close and read files. My problem is getting the file. If the ActiveX control is embedded in a webpage and the file is on the server with that page how do I open that file? Basically what I am trying to setup is something like Macromedia Flash.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups