antiblock
Elveron
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
V¡®u§

Obter nome do usuário logado (C/C++)

3 posts in this topic

Imagem colocada

Logo abaixo segue o código de um pequeno programa feito em C++ Builder 6 que captura o nome do usuário logado:



//---------------------------------------------------------------------------

#include
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LPTSTR usuario;
unsigned long uns_lg = 256;
char ch[256];
usuario = ch;
if( GetUserName(usuario, &uns_lg) )
Label1->Caption = usuario;
}
//---------------------------------------------------------------------------

Download Source:

http://www.4shared.com/rar/4hBtz8RY/get_user-Cyber-Gamers.html

http://www.badongo.com/file/26694466

http://www.filejungle.com/f/hyqemz

http://rapidshare.com/files/2789341640/get_user-Cyber-Gamers.rar

http://www.sendspace.com/file/r590e6

http://turbobit.net/2rml4eehzm08.html

http://ul.to/1jv5ht1t

http://www.ziddu.com/download/19053615/getuser-Cyber-Gamers.rar.html

Share this post


Link to post
Share on other sites
antiblock
https://i.imgur.com/aJ17bf7.gif

Usuario que esta logado no Windos acho euImagina tens o Administrador e o Convidado, ele indica se és o admin ou o Convidado.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this