a dial up logging program

This is a discussion on a dial up logging program within the Windows Programming forums, part of the Platform Specific Boards category; i am about to start to try and write a program i want to log who makes a dial up ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    21

    a dial up logging program

    i am about to start to try and write a program
    i want to log who makes a dial up connection
    i would like it to log the user (i have no idea how to do this)
    the time (i was think could do this with the time cmd but how do i stop it saying enter new time? and how do i write that in c?)
    and the same for the date.

    while typing this i realised i dont no where to start, all i could do is save the log

    help

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    21
    win xp

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    21
    *bump*

    does anyone know how i can print the current logged on user?

  4. #4
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    Code:
    #include <windows.h>
    #include <stdio.h>
    
    
    int main() 
    { 
    	TCHAR buff[256];
    	DWORD size = 256;
    
    	GetUserName(buff,&size);
    
    	printf("User: %s\n",buff);
    
    	return 0;
    	
    }

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    21
    thank you Sorensen
    and thanks to Salem for moving it for me (did not think of win pro. DOH!)

    would anyone like to give me the cmd for time and date

    UPDATE: I worked out time is GetSystemTime <--- i think
    it says this is a long <--- stuck

    thx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  2. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 01:27 PM
  3. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  4. Replies: 2
    Last Post: 05-10-2002, 05:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21