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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. COM
  4. transfer block-memory in com ,why only a byte

transfer block-memory in com ,why only a byte

Scheduled Pinned Locked Moved COM
comsysadminperformancequestion
3 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    i use [in]short nSisze,[in,size_is(nSize)]byte* pBuffer, or [in]short nSisze,[in,size_is(nSize)]byte pBuffer[], but on the server i only get the first byte allocated in the client. why??? Thanks in advance

    P 1 Reply Last reply
    0
    • L Lost User

      i use [in]short nSisze,[in,size_is(nSize)]byte* pBuffer, or [in]short nSisze,[in,size_is(nSize)]byte pBuffer[], but on the server i only get the first byte allocated in the client. why??? Thanks in advance

      P Offline
      P Offline
      Pros Chum
      wrote on last edited by
      #2

      This is just a guess since I'm a COM newbie, but if you created your ATL object with a "dual" interface then the above IDL won't work. You'll need to either use a VARIANT safearray to pass the data in, or create your object with a "custom" interface when you're on the ATL object wizard dialog. Hope that helps, Pros :)

      L 1 Reply Last reply
      0
      • P Pros Chum

        This is just a guess since I'm a COM newbie, but if you created your ATL object with a "dual" interface then the above IDL won't work. You'll need to either use a VARIANT safearray to pass the data in, or create your object with a "custom" interface when you're on the ATL object wizard dialog. Hope that helps, Pros :)

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

        Oh,thanks a lot .and also thanks for your reply in the previous message I posted as cg. I've tried again . I use [in]short nSize,[in,size_is(nSize)]byte buffer[]. I found that it works both in the "dual" interface and custom interface . But I don't know now why it failed before .a little confused cg:)

        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