home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Source / Vcl / SYSSUPP.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  1.1 KB  |  56 lines

  1. //
  2. // syssupp.cpp: System namespace support functions
  3. //
  4. // $Revision:   1.6  $
  5. //
  6.  
  7. #pragma inline
  8.  
  9. #include <system.hpp>
  10.  
  11. // ensure near is visible to TASM
  12. #if defined(near)
  13. #undef near
  14. #endif
  15.  
  16. namespace System
  17. {
  18.     AnsiString __fastcall LoadResourceString(ResourceString const * const rsrc)
  19.     {
  20.         AnsiString  result;
  21.         AnsiString  *tmp = &result;
  22.         asm
  23.         {
  24.             extrn   @System@LoadResString$qqrp20System@TResStringRec:near
  25.             mov     edx, tmp
  26.             mov     eax, rsrc
  27.             call    @System@LoadResString$qqrp20System@TResStringRec
  28.         }
  29.         return result;
  30.     }
  31.  
  32.     /* Links the FindDynaInst call the C++ compiler generates to
  33.        the pascal implementation living in system.pas
  34.     */
  35.     #pragma argsused
  36.     void * __fastcall FindDynaInst(void * vmt, int ID)
  37.     {
  38.         asm
  39.         {
  40.             extrn @System@@FindDynaInst$qqrv:near
  41.             call @System@@FindDynaInst$qqrv
  42.         }
  43.         return (void*)_EAX;
  44.     }
  45.  
  46.     #pragma argsused
  47.     void __fastcall CheckSafecallResult(HRESULT hr)
  48.     {
  49.         asm
  50.         {
  51.             extrn    @System@@CheckAutoResult$qqrv:near
  52.             call    @System@@CheckAutoResult$qqrv
  53.         }
  54.     }
  55. }
  56.