简体   繁体   中英

Calls to the FreeSid() function crashes my MFC application on Windows 7

FreeSid() crashes frequently on Windows 7 in our MFC application. It has been working perfectly fine in Windows XP for years.

Does anyone know the workaround for this?

Someone else had this same problem in VB , but it is not clear how to fix it in C++.

There are different ways to free a SID. If you get it from ConvertStringSidToSid , use LocalFree . If you get it from AllocateAndInitializeSid , use FreeSid . Mixing the two will give undefined results which may differ between Windows versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM