can an app in protected mode use filemapping?

Hi,

My ActiveX(which runs in protected mode) does
CreateFileMapping(,,"Local\\MyMap",,)
and spawns another process with ShellExecuteEx

the spawned process tries
OpenFileMapping(,,"Local\\MyMap",,)
but it fails.


I tested opening the file mapping from the same activeX and it succeeds.
Is there a special setting that allows seperate process(could be low/medium/high privileged)
to open the file mapping object

Thank you


Answer this question

can an app in protected mode use filemapping?

  • WayneSpangler

    I think these links will answer your questions on PM
    Take special note of IEInstall.exe and IEUser.exe There isn't a lot of great information on these, but they shouldn't be to difficault to use.

    To IE7 using an ActiveX & protection mode:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/IETechCol/dnwebgen/ProtectedMode.asp
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/IETechCol/cols/dnexpie/activex_security.asp



  • epsilon_ro

    The access denied is solved by supplying FILE_MAP_READ flag when OpenFileMapping..
    Although , the process can't write on it..



  • Saibal Goswami

    Hi,

    GetLastError after OpenFileMapping returns 5... which is ERROR_ACCESS_DENIED




  • Nfrf

    Isn't local process specific You'd need to use global. And then you'd need admin privs.



  • Pockey

    Thanks again, Oliver

    Actually, I've read the articles mentioned many times even before I posted the original question..

    IEInstal and IEUser are brokers which provides elevation supports.

    I fear thoese are not relevant to what I need, I can actually starts IEInstal or IEUser like broker through manifest file or shellexecuteex(,,"runas",,)
    The problem is that those elevated process doesn't seem to be able to access the shared memory created by ActiveX

    Local is session specific, and I confirmed that Local objects can be shared between user level processes. I also tested low level process such as ActiveX can not create Global object.

    It seems that there are such lack of supports or documents for low privileged processes.

    Thank you


  • Ben Taylor

    It requires admin rights to use global mapping.

    You might try specifying protection explicitly using PAGE_READWRITE.



  • Woody_In_Sheffield

    What's the error code returned by the seperate process' call to OpenFileMapping

  • can an app in protected mode use filemapping?