Click here to Skip to main content
16,017,264 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to control Controls' Enter Event? [modified] Pin
Peter, Chan3-Jun-07 19:55
Peter, Chan3-Jun-07 19:55 
GeneralRe: How to control Controls' Enter Event? Pin
Naveen6-Jun-07 21:37
Naveen6-Jun-07 21:37 
GeneralRe: How to control Controls' Enter Event? Pin
Peter, Chan6-Jun-07 21:46
Peter, Chan6-Jun-07 21:46 
QuestionRetrieve message arrival time Pin
JulienLemaitre1-Jun-07 0:02
JulienLemaitre1-Jun-07 0:02 
AnswerRe: Retrieve message arrival time Pin
Arman S.1-Jun-07 0:48
Arman S.1-Jun-07 0:48 
Questionproblem retrieving domain name [modified] Pin
Moonis Ahmed31-May-07 23:34
Moonis Ahmed31-May-07 23:34 
AnswerRe: problem retrieving domain name Pin
Arman S.31-May-07 23:56
Arman S.31-May-07 23:56 
GeneralRe: problem retrieving domain name Pin
Moonis Ahmed3-Jun-07 15:30
Moonis Ahmed3-Jun-07 15:30 
Hi,
I did the above settings to enable the macro but the problem still persists.Sigh | :sigh: My modified code is here:
#define _WIN32_WINNT 0x0500
#include "windows.h"
#include "stdio.h"
#include "iostream.h"
#include "tchar.h"

int main()
{
	LPTSTR lpszSystemInfo;// pointer to system information string

	DWORD cchBuff=sizeof(lpszSystemInfo);// size of domain name

	// Get domain.
	if (GetComputerNameEx(ComputerNameDnsDomain, lpszSystemInfo, &cchBuff))
	cout<<"Domain Name is : "<<cchBuff<<endl;

	// Get user name.

    char acUserName[100];
    DWORD nUserName = sizeof(acUserName);
    if (GetUserName(acUserName, &nUserName)) {
        cout << "User name is " << acUserName << "." << endl;
    }
    else {
        cerr << "Failed to lookup user name, error code " <<
                GetLastError() << "." << endl;
    }

	return 0;
}

I am new to VC++ programming so please point out any other errors if there are.

Moonis
GeneralRe: problem retrieving domain name Pin
Naveen6-Jun-07 20:26
Naveen6-Jun-07 20:26 
GeneralRe: problem retrieving domain name Pin
Moonis Ahmed6-Jun-07 20:31
Moonis Ahmed6-Jun-07 20:31 
GeneralRe: problem retrieving domain name Pin
Naveen6-Jun-07 21:37
Naveen6-Jun-07 21:37 
AnswerRe: problem retrieving domain name Pin
Naveen31-May-07 23:56
Naveen31-May-07 23:56 
AnswerRe: problem retrieving domain name Pin
Rajkumar R31-May-07 23:59
Rajkumar R31-May-07 23:59 
Questiondll for loading bitmap Pin
jannathali31-May-07 23:29
jannathali31-May-07 23:29 
QuestionRe: dll for loading bitmap Pin
Mark Salsbery1-Jun-07 5:56
Mark Salsbery1-Jun-07 5:56 
QuestionRe: dll for loading bitmap Pin
Hamid_RT1-Jun-07 6:27
Hamid_RT1-Jun-07 6:27 
QuestionMemory sharing Pin
anilkrupakar31-May-07 23:22
anilkrupakar31-May-07 23:22 
AnswerRe: Memory sharing Pin
CPallini31-May-07 23:26
mveCPallini31-May-07 23:26 
QuestionHow to authorize a dll loading. Pin
BusaBird31-May-07 23:09
BusaBird31-May-07 23:09 
GeneralRe: How to authorize a dll loading. Pin
Jeffrey Walton1-Jun-07 7:27
Jeffrey Walton1-Jun-07 7:27 
AnswerRe: How to authorize a dll loading. [modified] Pin
Rajkumar R1-Jun-07 0:12
Rajkumar R1-Jun-07 0:12 
AnswerRe: How to authorize a dll loading. Pin
Jeffrey Walton1-Jun-07 7:47
Jeffrey Walton1-Jun-07 7:47 
GeneralRe: How to authorize a dll loading. Pin
BusaBird5-Jun-07 2:21
BusaBird5-Jun-07 2:21 
GeneralRe: How to authorize a dll loading. Pin
Jeffrey Walton5-Jun-07 2:26
Jeffrey Walton5-Jun-07 2:26 
Questionerror C2061: Please Help Pin
Programm3r31-May-07 22:47
Programm3r31-May-07 22:47 

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.