FreeLibrary() has no string parameters, so there are no A and W versions. Take off the "A" and it should work for you.

I still think it may be a lot less clunky to just call something like IsUserAnAdmin() instead of doing the Load/Free though:

FreeLibrary Function
Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count. When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid.
So if you Load and then immediately Free during Sub Main() you're trhashing around excessively. If you defer the Free you have an extra handle to keep around and to deal with later.

Note that even using this "cause shell32.dll to be loaded first" approach InitCommonControls/Ex ahould be called prior to the main Form being loaded. I've had failures even when this is done from within Form_Initialize, let alone Form_Load.