157
159
rc = MAPILogon(0, profileName, password, MAPI_LOGON_UI, 0, byref(pSession))
158
160
if rc != SUCCESS_SUCCESS:
164
166
rc = MAPILogoff(session, 0, 0, 0)
165
167
if rc != SUCCESS_SUCCESS:
169
171
def _resolveName(session, name):
170
172
pRecipDesc = lpMapiRecipDesc()
171
173
rc = MAPIResolveName(session, 0, name, 0, 0, byref(pRecipDesc))
172
174
if rc != SUCCESS_SUCCESS:
175
177
name, address = rd.lpszName, rd.lpszAddress
176
178
rc = MAPIFreeBuffer(pRecipDesc)
177
179
if rc != SUCCESS_SUCCESS: