1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33:
here are the error I get when trying to compile it. loggedon.c loggedon.c(44) : warning C4133: 'function' : incompatible types - from 'LPWSTR' to 'LPSTR' loggedon.c(178) : warning C4133: 'function' : incompatible types - from 'LPWSTR' to 'LPCSTR' loggedon.c(190) : warning C4133: 'function' : incompatible types - from 'TCHAR [1024]' to 'const wchar_t *' loggedon.c(191) : warning C4133: 'function' : incompatible types - from 'TCHAR [1024]' to 'LPWSTR' loggedon.c(207) : warning C4133: 'function' : incompatible types - from 'TCHAR [260]' to 'const wchar_t *' loggedon.c(208) : warning C4133: 'function' : incompatible types - from 'TCHAR [260]' to 'const wchar_t *' loggedon.c(213) : warning C4133: 'function' : incompatible types - from 'TCHAR [260]' to 'const wchar_t *' loggedon.c(261) : warning C4133: 'function' : incompatible types - from 'LPWSTR' to 'LPCSTR' loggedon.c(277) : warning C4133: 'function' : incompatible types - from 'TCHAR [1024]' to 'const wchar_t *' loggedon.c(282) : warning C4133: 'function' : incompatible types - from 'TCHAR [260]' to 'LPWSTR' loggedon.c(386) : warning C4133: 'function' : incompatible types - from 'LPWSTR' to 'LPCSTR' loggedon.c(387) : warning C4133: 'function' : incompatible types - from 'LPWSTR' to 'LPCSTR' Microsoft (R) Incremental Linker Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. /out:loggedon.exe loggedon.obj loggedon.obj : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function _GetLocalLogonTime loggedon.obj : error LNK2019: unresolved external symbol __imp__RegQueryInfoKeyA@48 referenced in function _GetLocalLogonTime loggedon.obj : error LNK2019: unresolved external symbol __imp__RegOpenKeyA@12 referenced in function _GetLocalLogonTime loggedon.obj : error LNK2019: unresolved external symbol __imp__FreeSid@4 referenced in function _DisplayLocalLogons loggedon.obj : error LNK2019: unresolved external symbol __imp__LookupAccountSidA@28 referenced in function _DisplayLocalLogons loggedon.obj : error LNK2019: unresolved external symbol __imp__AllocateAndInitializeSid@44 referenced in function _DisplayLocalLogons loggedon.obj : error LNK2019: unresolved external symbol __imp__RegEnumKeyExA@32 referenced in function _DisplayLocalLogons loggedon.obj : error LNK2019: unresolved external symbol __imp__RegConnectRegistryA@12 referenced in function _DisplayLocalLogons loggedon.obj : error LNK2019: unresolved external symbol _NetApiBufferFree@4 referenced in function _DisplaySessionLogons loggedon.obj : error LNK2019: unresolved external symbol __imp__LookupAccountNameA@28 referenced in function _DisplaySessionLogons loggedon.obj : error LNK2019: unresolved external symbol _NetSessionEnum@36 referenced in function _DisplaySessionLogons loggedon.obj : error LNK2019: unresolved external symbol _NetServerEnum@36 referenced in function _wmain loggedon.exe : fatal error LNK1120: 12 unresolved externals
afxres.h is an MFC header.
Rather than try to fix the paths or fix problems with or without the SDK... You might try just deleting the VERSION resource (in the RC file). It does not seem to be critical to the program.