Bug 8235 – IsUserAnAdmin not in shell32.lib

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
tools
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-06-13T11:48:00Z
Last change time
2015-06-09T04:37:39Z
Assigned to
nobody
Creator
stefan.sonnenberg

Comments

Comment #0 by stefan.sonnenberg — 2012-06-13T11:48:43Z
Given this code snippet: 8-< import std.c.stdio; import std.c.windows.windows; extern (Windows) BOOL IsUserAnAdmin(); int main(string[] args) { return IsUserAnAdmin(); } >-8 and compiling it with dmd test.d shell32.lib OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html test.obj(test) Error 42: Symbol Undefined _IsUserAnAdmin@0 --- errorlevel 1 IsUserAdmin is exported by shell32.dll and so this might be a bug ? Bug reproducable on Windows Vista 32 Bit, DMD32 D Compiler v2.059
Comment #1 by yebblies — 2012-07-03T09:57:55Z
This usually happens because the lib included with dmd is out of date. It can be worked around by generating a new import lib from the dll (using implib) or by using LoadLibrary/GetProcAddress manually.
Comment #2 by andrej.mitrovich — 2012-12-26T15:39:15Z
*** This issue has been marked as a duplicate of issue 6625 ***