Microstation C# Update 14 C++: Issue with mdlSystem_enterGraphics() API

Hello Experts,

As a part of our process, we have a MDL application which takes input in the form a buffer and write the data to DGN files. But recently observed that it is working fine when being run as an administrator, but is not working when being invoked as a user.

On deeper analysis observed that the API "mdlSystem_enterGraphics()" seems to be not returning back and hence the issue. And when we tested on v8 it is working fine for both the user as well we administrator.

Could anyone let us know if the behaviour of the mentioned API is changed from V8 to CE and started looking for some kind of permissions?

Thanks in Advance.

Regards,

Harish.

Parents
  • Thanks Robert Hook.

    We'll look into making use of the "mdlSystem_enterGraphicsExtended" API as suggested. 

    Thanks Jan Slegr.

    By not returning, we mean the control is going into the method and exiting from there instead of coming back into the .ma applcation so that further process can continue.

    Another point I missed to mention is, the issue is seen only on few machines, but working fine on others i.e., in few machines, it works fine both as admin and as user, but in few it works only if run as admin. Could it have anything to do with the security levels or the installation privileges.

    Thanks and Regards,

    Harish.

  • Could it have anything to do with the security levels or the installation privileges

    That depends on your MicroStation configuration.  If a default configuration, MicroStation CONNECT configuration variable MS_MDLAPPS points to folder something like C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\mdlapps.   That folder (along with most of the C: drive) is a Windows protected folder.  You must have Windows admin rights to make any change to that folder.

    In your case, what is the definition of MS_MDLAPPS

    How do you build your app.?

    1. Using Viz Studio?
      • You must run Viz Studio with 'elevated permission' (a.k.a. 'as Administrator'?) to write the result of the build to the C: drive
      • Viz Studio
      • You can create a Windows shortcut that automatically elevates Viz Studio
    2. Using bmake?
      • You should run bmake from the SDK command shell started as a Windows administrator

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon Summers,

    Thanks for the reply.

    We have checked and found that the "MS_MDLAPPS" variable is not pointing to any path. It is blank.

    We are building our application by running bmake .in the Microstation SDK as adminstrator.

    If my understanding is correct, in case we are building the .ma application as a user(not as admin) we should have a problem while creating the .ma application itself where as in our case, the problem is while using the .ma application.

    Thanks and Regards,

    Harish.

  • We have checked and found that the "MS_MDLAPPS" variable is not pointing to any path. It is blank.

    Check again.  Many MicroStation tools & utilities are delivered as AddIns or Applications, and are installed in that folder.  The MS_MDLAPPSvariable is required so that MicroStation can find those tools.  It is set during installation.  If it is blank then MicroStation won't function correctly.

    MS_MDLAPPS

    If my understanding is correct, in case we are building the .ma application as a user(not as admin) we should have a problem while creating the .ma application

    MicroStation and its sub-folders, including the \MicroStation\mdlapps folder, are installed to the C:\Program Files folder (unless you choose otherwise).  That's a Windows protected folder.  The installer must be run with Windows administration rights to create the MicroStation installation.

    If you want to create an AddIn or Application that builds MDL or DLL files then those files must be copied to the \MicroStation\mdlapps folder.  Because it's a Windows protected folder, the build tool (bmake or Viz Studio) must be run with Windows administrator privilege.

    our case, the problem is while using the .ma application

    Once an AddIn or Application has been copied to the \MicroStation\mdlapps folder, a user may invoke the app. using MicroStation key-in mdl load appname.  You don't need to be an administrator to run MicroStation, nor do you need to be an administrator to load an app.

    Thread Hijack

    You've hijacked your own thread, because Windows permissions and software installation have nothing to do with mdlSystem_enterGraphics().

    Consider starting a new post.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • We have checked and found that the "MS_MDLAPPS" variable is not pointing to any path. It is blank.

    Check again.  Many MicroStation tools & utilities are delivered as AddIns or Applications, and are installed in that folder.  The MS_MDLAPPSvariable is required so that MicroStation can find those tools.  It is set during installation.  If it is blank then MicroStation won't function correctly.

    MS_MDLAPPS

    If my understanding is correct, in case we are building the .ma application as a user(not as admin) we should have a problem while creating the .ma application

    MicroStation and its sub-folders, including the \MicroStation\mdlapps folder, are installed to the C:\Program Files folder (unless you choose otherwise).  That's a Windows protected folder.  The installer must be run with Windows administration rights to create the MicroStation installation.

    If you want to create an AddIn or Application that builds MDL or DLL files then those files must be copied to the \MicroStation\mdlapps folder.  Because it's a Windows protected folder, the build tool (bmake or Viz Studio) must be run with Windows administrator privilege.

    our case, the problem is while using the .ma application

    Once an AddIn or Application has been copied to the \MicroStation\mdlapps folder, a user may invoke the app. using MicroStation key-in mdl load appname.  You don't need to be an administrator to run MicroStation, nor do you need to be an administrator to load an app.

    Thread Hijack

    You've hijacked your own thread, because Windows permissions and software installation have nothing to do with mdlSystem_enterGraphics().

    Consider starting a new post.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data