Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7855141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:17:46+00:00 2026-06-02T20:17:46+00:00

Consider the following code: uses {… } ComObj, ShlObj; type TContextMenu = class(TComObject, IShellExtInit,

  • 0

Consider the following code:

uses
  {... }
  ComObj,
  ShlObj;

type
  TContextMenu = class(TComObject, IShellExtInit, IContextMenu)
  private
  {(*}
  const
    GUID: TGUID = '{99D8B139-0855-4C5D-95E7-BC8EC6254B3D}';
  {*)}
  private
    FCmdCount: LongWord;
    FDm: Tdm_ContextMenu;
  protected
    function IShellExtInit.Initialize = IShellExtInit_Initialize;
    function IShellExtInit_Initialize(_pidlFolder: PItemIDList; _lpdobj: IDataObject;
      _HKeyProgID: HKEY): HResult; stdcall;
    function QueryContextMenu(_Menu: HMENU; _indexMenu, _idCmdFirst, _idCmdLast,
      _UFlags: UINT): HResult; stdcall;
    function InvokeCommand(var _ici: TCMInvokeCommandInfo): HResult; stdcall;
    function GetCommandString(_idCmd, _uType: UINT; _pwReserved: PUINT;
      _PszName: LPSTR; _cchMax: UINT): HResult; stdcall;
  public
    procedure Initialize; override;
    destructor Destroy; override;
  end;

This compiles fine in Delphi 2007 and XE but Delphi XE2 gives me the error:
“[DCC Error] u_ContextMenuHandler.pas(16): E2291 Missing implementation of interface method IContextMenu.GetCommandString”

This has me baffled. I checked the interface declaration and my GetCommandString function has the exactly the same declaration as the interface’s. Any hints?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:17:47+00:00Added an answer on June 2, 2026 at 8:17 pm

    ‘_idCmd’ is declared UINT_PTR (which is 8 bytes when targeting 64-bit) in XE2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following code sample that uses MEF to create an object of type
Consider the following code: @Entity @Table(name = a) public class A implements Serializable {
Consider the following code: public class MyClass { public static string MyStaticMethod() { //string
Consider the following code: class Program { static void Main(string[] args) { try {
Consider the following example code: class Foo { }; class Bar : public Foo
Consider the following sample code which uses a TrustManager to log whether an outgoing
Consider the following code (C++11), which uses the Eigen 3 library (http://eigen.tuxfamily.org): #include <iostream>
Consider the following code: template<size_t head,size_t ... Dims> struct make_vec { typedef typename make_vec<Dims...>::type
Consider the following code which uses non-blocking semantics to pop a stack: T Stack<T>::pop(
Consider the following Prolog code. It edits lines of a particular type in its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.