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. how to make default parameters for method?

how to make default parameters for method?

Scheduled Pinned Locked Moved COM
c++tutorialquestion
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
    ashxly
    wrote on last edited by
    #1

    can anyone show me how to make some parameter of a method as default. Like this: STDMETHOD(Test)(BSTR bsValue); how to make "bsValue" as a default parameter like in c++(Test(BSTR bsValue=NUU) Many many thx

    V 1 Reply Last reply
    0
    • A ashxly

      can anyone show me how to make some parameter of a method as default. Like this: STDMETHOD(Test)(BSTR bsValue); how to make "bsValue" as a default parameter like in c++(Test(BSTR bsValue=NUU) Many many thx

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

      For C|C++ clients there is no sense for this - they must always specify the parameter. Though MIDL has two keys to do it - [defaultvalue] and [optional]. The [optional] applies to the VARIANT parameter. The [defaultvalue] applies to other types. 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