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. Visual Basic
  4. Examining bytes returned from an ATL component

Examining bytes returned from an ATL component

Scheduled Pinned Locked Moved Visual Basic
helpc++data-structures
2 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
    Aby Philip
    wrote on last edited by
    #1

    Hi, I am kind of a newbie in VB. The following is the problem description. I have an ATL component which has the following interface method. HRESULT GetBytes([out,retval] VARIANT* pvByteArray); As the name suggest the variant contains a byte array only. Now, I am trying to use this from VB, so that I may be able to examine the bytes returned. I have tried the folowing VB code - ///////////////////////////// Dim pkt As New SPGet Dim bytes As Variant Set bytes = pkt.GetBytes ///////////////////////////// But I get a Type Mismatch error. Can somebody show me how I may do this. Thank you Aby

    V 1 Reply Last reply
    0
    • A Aby Philip

      Hi, I am kind of a newbie in VB. The following is the problem description. I have an ATL component which has the following interface method. HRESULT GetBytes([out,retval] VARIANT* pvByteArray); As the name suggest the variant contains a byte array only. Now, I am trying to use this from VB, so that I may be able to examine the bytes returned. I have tried the folowing VB code - ///////////////////////////// Dim pkt As New SPGet Dim bytes As Variant Set bytes = pkt.GetBytes ///////////////////////////// But I get a Type Mismatch error. Can somebody show me how I may do this. Thank you Aby

      V Offline
      V Offline
      Vi2
      wrote on last edited by
      #2

      There is no reason to do "Set ...". Try to write bytes = pkt.GetBytes With best wishes, Vita

      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