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. CoGetMalloc under Windows CE

CoGetMalloc under Windows CE

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelpquestionannouncement
6 Posts 4 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Netmeisters, I am trying to use OLEDB under Windows CE. To do this, apparently one has to use the Free method of the IMalloc interface to release memory returned by methods such as GetColumnInfo. I should be able to get a pointer to IMalloc with CoGetMalloc. However, when I try to use this function, I get an error of unresolved external. As far as I can tell, CoGetMalloc is supposed to be in ole32.lib, which is part of the project. This is with the emulator, incidentally. Does CoGetMalloc not exist under WinCE for some reason? If so, how does one get the IMalloc pointer? Any suggestions much appreciated.

    A B 2 Replies Last reply
    0
    • L Lost User

      Netmeisters, I am trying to use OLEDB under Windows CE. To do this, apparently one has to use the Free method of the IMalloc interface to release memory returned by methods such as GetColumnInfo. I should be able to get a pointer to IMalloc with CoGetMalloc. However, when I try to use this function, I get an error of unresolved external. As far as I can tell, CoGetMalloc is supposed to be in ole32.lib, which is part of the project. This is with the emulator, incidentally. Does CoGetMalloc not exist under WinCE for some reason? If so, how does one get the IMalloc pointer? Any suggestions much appreciated.

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      AFAIK CoGetMalloc is not supported under Windows CE... - Anders Money talks, but all mine ever says is "Goodbye!"

      L 1 Reply Last reply
      0
      • A Anders Molin

        AFAIK CoGetMalloc is not supported under Windows CE... - Anders Money talks, but all mine ever says is "Goodbye!"

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If CoGetMalloc is not supported under WinCE, how do you release the memory allocated by the various GetProperties and GetColumnInfo methods of OLEDB? Is there another way of getting to the IMalloc interface, or do you just use delete or free? Thanks, Matthew Fleming

        A 1 Reply Last reply
        0
        • L Lost User

          If CoGetMalloc is not supported under WinCE, how do you release the memory allocated by the various GetProperties and GetColumnInfo methods of OLEDB? Is there another way of getting to the IMalloc interface, or do you just use delete or free? Thanks, Matthew Fleming

          A Offline
          A Offline
          Anders Molin
          wrote on last edited by
          #4

          To be honest I don't know, I have not done COM programming under Windows CE. I could just see in MSDN that CoGetMalloc was not supported... - Anders Money talks, but all mine ever says is "Goodbye!"

          1 Reply Last reply
          0
          • L Lost User

            Netmeisters, I am trying to use OLEDB under Windows CE. To do this, apparently one has to use the Free method of the IMalloc interface to release memory returned by methods such as GetColumnInfo. I should be able to get a pointer to IMalloc with CoGetMalloc. However, when I try to use this function, I get an error of unresolved external. As far as I can tell, CoGetMalloc is supposed to be in ole32.lib, which is part of the project. This is with the emulator, incidentally. Does CoGetMalloc not exist under WinCE for some reason? If so, how does one get the IMalloc pointer? Any suggestions much appreciated.

            B Offline
            B Offline
            Bret Faller
            wrote on last edited by
            #5

            I've done this exact project and I used CoTaskMemAlloc/CoTaskMemFree and malloc/free for allocating buffer space. Bret Faller Odyssey Computing, Inc.

            T 1 Reply Last reply
            0
            • B Bret Faller

              I've done this exact project and I used CoTaskMemAlloc/CoTaskMemFree and malloc/free for allocating buffer space. Bret Faller Odyssey Computing, Inc.

              T Offline
              T Offline
              Tim Smith
              wrote on last edited by
              #6

              In all the years with COM, I don't think I have ever used IMalloc directly. Tim Smith Descartes Systems Sciences, Inc.

              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