Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
This page was last modified 07:07, 30 September 2007.

限制ECom插件只在已知客户端使用

From Forum Nokia Wiki

  • 设备, 软件 版本:

S60 3rd Edition

S60 3rd Edition, FP1


  • 详细描述

要限制一个DLL或ECom插件只在已知/受信任的客户端使用,可以通过调用RProcess::SecureID()或RProcess::VendorID()来辨识。


  • 解决方案

配置好SecureID和VendorID值参数,实例化一个RProcess对象,生成句柄指向当前进程(加载该DLL的客户端)

RProcess loaderProcess;
 
    if( loaderProcess.VendorID() != KMyVendorId )
 
        {
 
        return KErrPermissionDenied;
 
        }
 
    RProcess loaderProcess;
 
    if( loaderProcess.SecureID() != KMySecureId )
 
        {
 
        return KErrPermissionDenied;
 
        }
 
Powered by MediaWiki
RDF Facets: qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX