Desktop Functions:

   Smart Device Functions:

Show Recent Changes
Subscribe (RSS)
Misc. Pages
Helpful Tools
Suggested Reading
Website TODO List
Download Visual Studio Add-In

MprAdminUserGetInfo (mpr)
Returns the state of the dialin and callback privileges.

C# Signature:

[DllImport("mprapi.dll", SetLastError = false)]
    static extern UInt32 MprAdminUserGetInfo(
        [MarshalAs(UnmanagedType.LPWStr)]  string serverName,
        [MarshalAs(UnmanagedType.LPWStr)]  string userName,
        UInt32 Level,
        ref RAS_1 buffer);

VB Signature:

Declare Function MprAdminUserGetInfo Lib "mpr.dll" (TODO) As TODO

User-Defined Types:


Alternative Managed API:

Do you know one? Please contribute it!


     private const byte RASPRIV_NoCallback = 1;
     private const byte RASPRIV_AdminSetCallback = 2;
     private const byte RASPRIV_CallerSetCallback = 4;
     private const byte RASPRIV_DialinPrivilege = 8;

Tips & Tricks:

Please add some!

Sample Code:

private bool getDialin()
        bool hasError = false;

        RAS_1 rasUser = new RAS_1();
        UInt32 result = MprAdminUserGetInfo(serverName, userId, 1, ref rasUser);
        if (result != 0)
            throw new Exception("MprAdminUserGetInfo failed with code " + result.ToString());

        if ((rasUser.bfPrivilege & RASPRIV_DialinPrivilege) == RASPRIV_DialinPrivilege)
            dialInEnabled = true;
            dialInEnabled = false;
        catch (Exception ex)
        hasError = true;
        errorDescription = "MgtLib, getDialin: Exception with userId=<" + userId + ">: " + ex.Message;

        return hasError;


Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

Access directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version