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. What means F(const _variant_t& OptArgs) at import TLB into С++ ?

What means F(const _variant_t& OptArgs) at import TLB into С++ ?

Scheduled Pinned Locked Moved C / C++ / MFC
comtestingtoolshelpquestion
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.
  • V Offline
    V Offline
    vgrigor1
    wrote on last edited by
    #1

    I have TLB of JScript component (.wsc file), I make Import from it, and import creates prototype for functions with one more argument than in JScript "const _variant_t & OptionalArgs" What I must insert into it, once I newer used it in JScript ?? (zero or just pointer - results ti error "invalid poiter") Thanks inline _variant_t Automation::CreateMenu ( const _variant_t & strChoices, //string const _variant_t & strPrompt, //string const _variant_t & nMaxAttempts, // int const _variant_t & nTimeout, // int const _variant_t & OptionalArgs ) // -- ??? which type { VARIANT _result; VariantInit(&_result); _com_dispatch_method(this, 0x2, DISPATCH_METHOD, VT_VARIANT, (void*)&_result, L"\x000c\x000c\x000c\x000c\x000c", &strChoices, &strPrompt, &nMaxAttempts, &nTimeout, &OptionalArgs); return _variant_t(_result, false); }

    J 1 Reply Last reply
    0
    • V vgrigor1

      I have TLB of JScript component (.wsc file), I make Import from it, and import creates prototype for functions with one more argument than in JScript "const _variant_t & OptionalArgs" What I must insert into it, once I newer used it in JScript ?? (zero or just pointer - results ti error "invalid poiter") Thanks inline _variant_t Automation::CreateMenu ( const _variant_t & strChoices, //string const _variant_t & strPrompt, //string const _variant_t & nMaxAttempts, // int const _variant_t & nTimeout, // int const _variant_t & OptionalArgs ) // -- ??? which type { VARIANT _result; VariantInit(&_result); _com_dispatch_method(this, 0x2, DISPATCH_METHOD, VT_VARIANT, (void*)&_result, L"\x000c\x000c\x000c\x000c\x000c", &strChoices, &strPrompt, &nMaxAttempts, &nTimeout, &OptionalArgs); return _variant_t(_result, false); }

      J Offline
      J Offline
      jan larsen
      wrote on last edited by
      #2

      I'm not quite sure what you're asking for. But if you don't want to send any optional args at all, then you could do like this:

      _variant_t strChoices("Some choices");
      _variant_t strPrompt("prompt");
      _variant_t nMaxAttempts((long) 1);
      _variant_t nTimeout((long) 1000);
      _variant_t OptionalArgs( (long) DISP_E_PARAMNOTFOUND, VT_ERROR);
      
      myAutomation->CreateMenu(strChoices, strPrompt, nMaxAttempts, nTimeout, OptionalArgs);
      

      "After all it's just text at the end of the day. - Colin Davies "For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus

      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