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. QueryStatus of IOleCommandTarget implemented... errors?

QueryStatus of IOleCommandTarget implemented... errors?

Scheduled Pinned Locked Moved C / C++ / MFC
comcsharpvisual-studiohelpquestion
1 Posts 1 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.
  • T Offline
    T Offline
    Tommy Svensson
    wrote on last edited by
    #1

    Hi everybody, I've implemented QueryStatus of the IOleCommandTarget interface. It looks like this:

    interface IOleCommandTarget : IUnknown
    {
    [helpstring("method Exec")]
    HRESULT Exec(
    [in] const GUID *pguidCmdGroup,
    [in] DWORD nCmdID, [in] DWORD nCmdExecOpt,
    [in] VARIANTARG *pvaIn,
    [in,out] VARIANTARG *pvaOut);
    [helpstring("method QueryStatus")]
    HRESULT QueryStatus(
    [in] const GUID *pguidCmdGroup,
    [in] ULONG cCmds,
    [in,out] OLECMD *prgCmds,
    [in,out] OLECMDTEXT *pCmdText);
    };

    But, when I try to compile the idl file I receive this error;

    Creating Type Library...
    Microsoft (R) MIDL Compiler Version 5.01.0164
    Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
    Processing E:\development\COM experiments\ProxyObj\ProxyObj.idl
    ProxyObj.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oaidl.idl
    oaidl.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\objidl.idl
    objidl.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\unknwn.idl
    unknwn.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\wtypes.idl
    wtypes.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl
    ocidl.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oleidl.idl
    oleidl.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\servprov.idl
    servprov.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\urlmon.idl
    urlmon.idl
    Processing D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\msxml.idl
    msxml.idl
    E:\development\COM experiments\ProxyObj\ProxyObj.idl(59) : error MIDL2025 : syntax error : expecting a type specification near "OLECMD"
    E:\development\COM experiments\ProxyObj\ProxyObj.idl(59) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
    Error executing midl.exe.

    ProxyObj.tlb - 2 error(s), 0 warning(s)

    Any idea why? Should I include something special? Thx, /Tommy

    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