An earlier post, Retrieving SID using LookupAccountName ( started 01/20/2013 - 6:22), dealt with the issue of getting a SID using advapi32's LookupAccountName. A solution was posted and is attached.
That solution, as a console app, does not work now in a Win10 x64 environment.
I have Visual Studio Professional 2019 v 16.1.3 using Net Framework 4.7.03062
Configuration Manager is release and x64.
I've used default settings for the project. I've tried many sid.f90 variations using LOC and pointers, but none seem to work as well as inserting TYPE *, or PRINT * statements randomly.
Any help is appreciated.
Just a comment that if/when Intel updates module ADVAPI32, you'll need to remove the additional interfaces and the ONLY from the USE - you'll know because you'll get compile-time errors. You should not have to change the application code. I will also ask them to add ConvertStringSidToSid and will look to see what else seems reasonable to add. I am sure there are hundreds of new definitions - before I left Intel I spent months mainly adding to KERNEL32, but a few snuck into other modules. I didn't get into this set of APIs and it is grueling, manual work, so I'm not going to go crazy here.
I submitted ticket 04249991 with my updates to ADVAPI32.
Attached is a module ADVAPI32_NEW which can be used instead of ADVAPI32 for now. I also added the functions from sddi.h that were used in Cliff's example. I also attach a revised version of sid.f90 that uses the updated definitions.
Almost there. The 19.1 compiler fixes the incorrect declarations in ADVAPI32. Unfortunately they did not also add the sddi.h declarations I asked for (and supplied!), so ConvertSidToStringSid is not found.