Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Muthukumar

@Muthukumar
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • mail server
    M Muthukumar

    If you are using MAPI try this. You should have a profile name supplied. HRESULT GetServerName(LPSTR rszProfileName) { HRESULT hRes = S_OK; LPPROFADMIN pAdminProfiles = NULL; LPSERVICEADMIN pSvcAdmin = NULL; LPPROFSECT pGlobalProfSect = NULL; LPSPropValue pProps = NULL; // Get a Profile admin object if ( FAILED ( hRes = MAPIAdminProfiles ( 0L, &pAdminProfiles ) ) ) return hRes ; // Get a ServiceAdmin object if ( FAILED ( hRes = pAdminProfiles -> AdminServices ( rszProfileName, NULL, 0L, // Your app's window handle 0L, &pSvcAdmin ) ) ) return hRes ; // Get the Global Profile Section by calling // IServiceAdmin::OpenProfileSection use pbGlobalProfileSectionGuid // defined in EDKMDB.H as the entry ID to request // The default return is an IProfSect interface. if ( FAILED ( hRes = pSvcAdmin -> OpenProfileSection ( (LPMAPIUID)pbGlobalProfileSectionGuid, NULL, 0L, &pGlobalProfSect ) ) ) return hRes ; // Call HrGetOneProp to get PR_PROFILE_HOME_SERVER if ( FAILED ( hRes = HrGetOneProp ( pGlobalProfSect, PR_PROFILE_HOME_SERVER, &pProps ) ) ) return hRes ; CString m_strServerName = pProps -> Value.lpszA ; if ( NULL != pAdminProfiles ) pAdminProfiles -> Release (); if ( NULL != pSvcAdmin ) pSvcAdmin -> Release ( ); if ( NULL != pGlobalProfSect ) pGlobalProfSect -> Release ( ); if ( NULL != pProps ) MAPIFreeBuffer ( &pProps ); pSvcAdmin = NULL; pGlobalProfSect = NULL; pProps = NULL; pAdminProfiles = NULL; // Return the HRESULT to the calling function return hRes; } The above code might have some variables not declared. Pls check it out before using. Muthukumar.V Home: WWW.CoderSource.Net

    C / C++ / MFC sysadmin tutorial question

  • Mapping of events -MFC Internals
    M Muthukumar

    Check out this place. This might probably give some ideas. http://www.codersource.net/mfc\_tutorial\_Part2.html Thanks Muthu Muthukumar.V

    C / C++ / MFC c++ database data-structures question

  • help!~Who can show a code of simulate network server?
    M Muthukumar

    U can check this link. http://www.codersource.net/winsock\_tutorial\_server\_event\_model.html May find this useful. Thanks

    C / C++ / MFC sysadmin help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups