C++빌더 2010 프로젝트 입니다. ㅋㅋ
에러 뜨는 파일은 KeyBinding.cpp 에요
Lyn 님이 쓰신 글 :
: 그냥 프로젝트 통채로 올려주시는게 ^-^;
:
: 크레브 님이 쓰신 글 :
: : ToolsAPI 좀 보고 있는데..
: : 아래 델파이 코드를 C++빌더로 어떻게 바꾸어야 할까요?
: :
: :
: :
: : procedure Register;
: :
: : begin
: :
: : ( BorlandIDEServices as IOTAKeyBoardServices ).AddKeyboardBinding( XKeyBinding.Create );
: :
: : end;
: :
: :
: :
: :
: :
: : 제가 변환해본 소스
: :
: :
: : void __fastcall PACKAGE Register()
: : {
: :
: : // ( BorlandIDEServices as IOTAKeyBoardServices ).AddKeyboardBinding( TMyHotKey.Create );
: :
: : IOTAKeyboardServices *pKeyboard;
: :
: : if ((*BorlandIDEServices).QueryInterface(&pKeyboard) != S_OK)
: : return;
: :
: : System::DelphiInterface key;
: : pKeyboard->AddKeyboardBinding(key);
: :
: : }
: :
: :
: :
: :
: :
: : 위와 같이 했을때는 에러가 뜨네요
: : 에러는 아래와 같습니다.
: : systobj.h에서 뜨는 에러입니다.
: :
: :
: : [BCC32 Error] systobj.h(333): E2031 Cannot cast from 'XKeyBinding *' to 'IUnknown *'
: : [BCC32 Error] systobj.h(308): E2014 Member is ambiguous: 'TInterfacedObject::QueryInterface' and
: : |