All Frameworks  Class Hierarchy  This Framework  Indexes

VPMInterfaces Macro VPMCheckingGlobalMethod

Macro VPMCheckingGlobalMethod (iMeth,oHres)
Controls Access to a global secured function.

Role: This macro controls global access to a global function.
A global function relates to NO class (e.g: Print, etc)

Usage:

Example:
 void myServices::Print(...)
 {
   HRESULT hr = S_OK;
   VPMCheckingGlobalMethod(Print,&hr);
   if (VPM_ACCESS_GRANTED(hr)) {
     // access is granted!
   }
   else if (VPM_ACCESS_DENIED(hr)) {
     // access is denied!
   }
   else {
     // an error occured (global method not declared, etc).
   }
 }

Parameters:
iMeth
The global function's name.
Warning! It must be non-quoted string (symbol, e.g: Print, Tools, etc)
oHres
A pointer on the HRESULT code.
See also:
VPMGenericFactorySecuredMethod, VPMCheckingObjectSecuredMethod, VPMSecuredMethod, VPM_ACCESS_GRANTED, VPM_ACCESS_DENIED

This object is included in the file: VPMSecurity.h

Copyright © 2003, Dassault Systèmes. All rights reserved.