Board index » delphi » SAPI: COM interface method name is reserved word.

SAPI: COM interface method name is reserved word.

     Hi,

     I'm in the process of getting my feet wet with COM. I'm working on
     converting MSFT's SAPI. I have imported the TLB file that comes with
     the SDK and have successfully created a mini app that does some TTS.
     Here's my problem:

     One of the interfaces of SAPI implements a method named STDMETHOD
     (Set) (THIS_ LPCWSTR pszFile, DWORD dwID). Therefore, I can't use that
     method.

     It is my understanding that SET is a reserved word in Object Pascal
     (and the compiler agrees as he refuses to accept that statement ;-(

     What's the standard procedure? I've read about 'method resolution
     clauses' in the Object Pascal Language Guide, but I'm unsure as to how
     that applies to my problem.

     Anyone?

     Thanks,

     Sascha.

 

Re:SAPI: COM interface method name is reserved word.


Didn't the type library import rename Set to _Set (or Set_)?  Just use
that name in your code, rather than Set, and everything will be fine.
(At runtime, the names aren't used -- they're converted into offsets
into the VMT.)

--
 - J. Merrill jmerrill_nos...@mnsinc.com

Other Threads