How to identify ECOM plugin caller ?
hi friends,
I need to know some way to identify the calling application/process of my ECOM plugin.
Is there any API to know the UID of calling process.
My purpose is to limit the use of my plugin to my know applications only.
I want to keep this as a security check.
looking forward for you guidance.
regards
nEo
Re: How to identify ECOM plugin caller ?
Instantiate a RProcess object and you will have a handle to the current process with its SecureID, VendorID and of course capability info.
[CODE]RProcess loaderProcess;
if(loaderProcess.VendorID() != KMyVendorId)
return KErrPermissionDenied;[/CODE]
Re: How to identify ECOM plugin caller ?
hi itomuta,
thanks for your reply,
tell me how i can get a handle or reference to current process.
thanks a lot,
regards
nEo
Re: How to identify ECOM plugin caller ?
Select the sample code above, hit CTRL+C on your keyboard then move to your IDE, find the method where you would like to know in which process the code is running, place the cursor carefully on an empty line and hit CTRL+V on the keyboard. Add the required header and library and build your project ... ;)
Another revolutionary idea could be to read the SDK documentation about RProcess. :)
Re: How to identify ECOM plugin caller ?
hi Itomuta,
i got your point man , good way of suggesting.
i got the SID of application,
i got the clue from the following description as quotted from symbain docs.
-------------------------------------------------------------------------
RProcess()
inline RProcess();
Description
Default constructor.
The constructor exists to initialise private data within this handle;
it does not create the process object.Specifically, it sets the
handle-number to the value KCurrentProcessHandle. In effect, the
constructor creates a default process handle.
--------------------------------------------------------------------------
this was very simple. but thanks for guiding me , i was thinking of some other complex ways.
thanks man,
regards
nEo
Re: How to identify ECOM plugin caller ?
Hi guys,
Using RProcess i can get the caller SID or VID but there is no APIs in RProcess class on OS 7.0 Series60 SDK 1st Edition .
So how can i determine in my dll , the UID of the calling application.
My purpose here is to identify the calling application ,
by UID or by some other information.
your suggestions are welcomed.
thanking in anticipation,
regards
nEo
Re: How to identify ECOM plugin caller ?
[QUOTE=navjotsingh1979]Using RProcess i can get the caller SID or VID but there is no APIs in RProcess class on OS 7.0 Series60 SDK 1st Edition.[/QUOTE]I guess RProcess class on Symbian 6-7-8.x also contains "API".[QUOTE]So how can i determine in my dll , the UID of the calling application.[/QUOTE]Have you tested RProcess::Type, available in every single Symbian release?
Re: How to identify ECOM plugin caller ?
thanks wizard_hu,
i have read the docs for type() function,
i hope this will definitely work,
thanks man !
regards
nEo