473,385 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using C++.NET to find current User

Hi, I'm trying to use C++.NET to find which user is currently logged in. This is part of a bigger project for which I'll also need to retrieve visited URL's from the web browser as well...but one thing at a time I guess.

I'm trying to use the windowsIdentity function to get the name...but I can't get the syntax right

here's the little I've been able to figure out from the MSDN library...

Expand|Select|Wrap|Line Numbers
  1. // This is the main project file for VC++ application project 
  2. // generated using an Application Wizard.
  3.  
  4. #include "stdafx.h"
  5. #include <cstring>
  6. #include <iostream>
  7. #include <iomanip>
  8. #include <assert.h>
  9. #include <fstream>
  10. #include <math.h>
  11. #include <time.h>
  12. #include <stdlib.h>
  13. #include <conio.h>
  14. #include <stdio.h>
  15. using namespace std;
  16.  
  17. #using <mscorlib.dll>
  18.  
  19. using namespace System;
  20. //using namespace System.Security.Principal;
  21.  
  22. public:
  23. virtual property String^ Name {
  24.     String^ get ();
  25. }
  26.  
  27. int _tmain()
  28. {
  29.  
  30.     propertyDescription = String::Concat( propertyDescription, windowsIdentity->Name );
  31.  
  32.     return 0;
  33.  
Any help would be much appreciated. Thanks.
Sep 2 '06 #1
0 1753

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
0
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
4
by: Matthew Roche | last post by:
Greetings: I am developing an application that uses an ASP.NET Web Forms application for its UI and ASP.NET web services for its business tier, and I am looking for assistance in improving my...
17
by: Rico | last post by:
Hello, I am in the midst of converting an Access back end to SQL Server Express. The front end program (converted to Access 2003) uses DAO throughout. In Access, when I use recordset.AddNew I...
10
by: AZRebelCowgirl73 | last post by:
This is what I have so far: My program! import java.util.*; import java.lang.*; import java.io.*; import ch06.lists.*; public class UIandDB {
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.