Click here to Skip to main content
15,793,547 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Advice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
Eddy Vluggen14-Jun-21 10:18
professionalEddy Vluggen14-Jun-21 10:18 
AnswerRe: Advice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
Maximilien15-Jun-21 6:22
Maximilien15-Jun-21 6:22 
QuestionWindows 10 - find last logon time in C++ ?? Pin
Derell Licht5-Jun-21 17:28
professionalDerell Licht5-Jun-21 17:28 
QuestionRe: Windows 10 - find last logon time in C++ ?? Pin
David Crow5-Jun-21 17:53
David Crow5-Jun-21 17:53 
AnswerRe: Windows 10 - find last logon time in C++ ?? Pin
Derell Licht5-Jun-21 18:06
professionalDerell Licht5-Jun-21 18:06 
AnswerRe: Windows 10 - find last logon time in C++ ?? Pin
Derell Licht5-Jun-21 18:11
professionalDerell Licht5-Jun-21 18:11 
AnswerRe: Windows 10 - find last logon time in C++ ?? Pin
Randor 6-Jun-21 6:21
professional Randor 6-Jun-21 6:21 
GeneralRe: Windows 10 - find last logon time in C++ ?? Pin
Derell Licht6-Jun-21 7:27
professionalDerell Licht6-Jun-21 7:27 
Hey, @Randor, that works *great* !!!!!!!!!!! Thank you so much!!

I do have *one* minor issue with it, though...
Is this intended to be a 64-bit-only operation??

I use MinGW, not Visual C++, for all of my app development, and at this point, I still use a 32-bit compiler... However, I cannot build this with 32-bit MinGW:

> g++ -Wall -O2 login_lsa.cpp -o login_lsa.exe -lsecur32
login_lsa.cpp: In function 'INT main()':
login_lsa.cpp:14: error: 'LsaEnumerateLogonSessions' was not declared in this scope
login_lsa.cpp:17: error: 'PSECURITY_LOGON_SESSION_DATA' was not declared in this scope
login_lsa.cpp:17: error: expected ';' before 'pData'
login_lsa.cpp:19: error: 'pData' was not declared in this scope
login_lsa.cpp:19: error: 'LsaGetLogonSessionData' was not declared in this scope

I searched through *all* .h and .hpp files in c:\mingw, and these functions were not declared anywhere...

Mind ye, it *does* build and run just fine with 64-bit MinGW.
(in case anyone is not familiar with MinGW, it stands for Minimal Gnu for Windows, and is a port of the GNU toolchain to Windows, using Windows libraries for most services.)

My MinGW 32-bit toolchain *does* have netsecapi.h and secur32.lib (in its format), but these LSA functions appear to not be included...

I also tried current TDM build of MinGW, which is gcc 10.3.0, but it does not contain these functions either...
GeneralRe: Windows 10 - find last logon time in C++ ?? Pin
Randor 6-Jun-21 8:26
professional Randor 6-Jun-21 8:26 
GeneralRe: Windows 10 - find last logon time in C++ ?? Pin
Derell Licht6-Jun-21 8:44
professionalDerell Licht6-Jun-21 8:44 
GeneralRe: Windows 10 - find last logon time in C++ ?? Pin
Randor 6-Jun-21 9:11
professional Randor 6-Jun-21 9:11 
AnswerRe: Windows 10 - find last logon time in C++ ?? Pin
Derell Licht6-Jun-21 16:20
professionalDerell Licht6-Jun-21 16:20 
GeneralRe: Windows 10 - find last logon time in C++ ?? Pin
Richard MacCutchan6-Jun-21 22:16
mveRichard MacCutchan6-Jun-21 22:16 
GeneralRe: Windows 10 - find last logon time in C++ ?? Pin
Derell Licht7-Jun-21 4:14
professionalDerell Licht7-Jun-21 4:14 
GeneralRe: Windows 10 - find last logon time in C++ ?? Pin
Maximilien7-Jun-21 10:15
Maximilien7-Jun-21 10:15 
Questionurgent question Pin
MAHMOUD ALI Jun20215-Jun-21 2:03
MAHMOUD ALI Jun20215-Jun-21 2:03 
AnswerRe: urgent question Pin
Victor Nijegorodov5-Jun-21 2:24
Victor Nijegorodov5-Jun-21 2:24 
GeneralRe: urgent question Pin
MAHMOUD ALI Jun20215-Jun-21 2:37
MAHMOUD ALI Jun20215-Jun-21 2:37 
GeneralRe: urgent question Pin
Victor Nijegorodov5-Jun-21 2:41
Victor Nijegorodov5-Jun-21 2:41 
AnswerRe: urgent question Pin
Richard MacCutchan5-Jun-21 3:20
mveRichard MacCutchan5-Jun-21 3:20 
AnswerRe: urgent question Pin
David Crow5-Jun-21 5:03
David Crow5-Jun-21 5:03 
AnswerRe: urgent question Pin
Dave Kreskowiak5-Jun-21 5:22
mveDave Kreskowiak5-Jun-21 5:22 
AnswerRe: urgent question Pin
enhzflep10-Jun-21 22:13
enhzflep10-Jun-21 22:13 
AnswerRe: urgent question Pin
SeeSharp211-Jun-21 2:23
SeeSharp211-Jun-21 2:23 
QuestionC++/MFC Parameterizing a Recordset (ODBC), having problem with passing UNICODE parameter Value Pin
Zouaoui Billel31-May-21 9:05
Zouaoui Billel31-May-21 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.