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. C / C++ / MFC
  4. Serializing an object

Serializing an object

Scheduled Pinned Locked Moved C / C++ / MFC
questionjson
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.
  • A Offline
    A Offline
    Alex Cutovoi
    wrote on last edited by
    #1

    Hi fellows Someone tells me that the best way to send an object from a window to another is by serialization. How can I do this? I'm very new in this subject.... Someone have a sugggestion for me? Thanks a lot

    D 1 Reply Last reply
    0
    • A Alex Cutovoi

      Hi fellows Someone tells me that the best way to send an object from a window to another is by serialization. How can I do this? I'm very new in this subject.... Someone have a sugggestion for me? Thanks a lot

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Alex Cutovoi wrote:

      ...send an object from a window to another...

      What exactly are you wanting to send?


      "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

      "Judge not by the eye but by the heart." - Native American Proverb

      A 1 Reply Last reply
      0
      • D David Crow

        Alex Cutovoi wrote:

        ...send an object from a window to another...

        What exactly are you wanting to send?


        "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

        "Judge not by the eye but by the heart." - Native American Proverb

        A Offline
        A Offline
        Alex Cutovoi
        wrote on last edited by
        #3

        I have 2 windows. In these windows I have a class that I create. This class is exactly the same in both windows. I create the object and I need to send this object from one window to the another window to use it. Actually I'm using unsuccessfully WM_COPYDATA message to send the object. But this is written is MSDN: "The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data." Because this, some data in my object are empty. So, someone suggested me to use serialization, but I'm very very new in this topic...

        D 1 Reply Last reply
        0
        • A Alex Cutovoi

          I have 2 windows. In these windows I have a class that I create. This class is exactly the same in both windows. I create the object and I need to send this object from one window to the another window to use it. Actually I'm using unsuccessfully WM_COPYDATA message to send the object. But this is written is MSDN: "The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data." Because this, some data in my object are empty. So, someone suggested me to use serialization, but I'm very very new in this topic...

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Alex Cutovoi wrote:

          Actually I'm using unsuccessfully WM_COPYDATA message to send the object. But this is written is MSDN: "The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data." Because this, some data in my object are empty.

          See here and here.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          A 1 Reply Last reply
          0
          • D David Crow

            Alex Cutovoi wrote:

            Actually I'm using unsuccessfully WM_COPYDATA message to send the object. But this is written is MSDN: "The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data." Because this, some data in my object are empty.

            See here and here.


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            A Offline
            A Offline
            Alex Cutovoi
            wrote on last edited by
            #5

            Thanks man, it seems to be very useful for me. Thanks

            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