Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

brilliant101

@brilliant101
About
Posts
32
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Some questions about ADO
    B brilliant101

    Hello all I am making a client server application in which client will call system calls and send the information to server. I want to store that information into database e.g Access using ADO( in VC++). Plz guide me what should i do? Do i have to do serialization of data? e.g From client i have to send the the computer name and user name to server. how will i do this ? how will i serialize data? how will i use ADO? I am newbie plz be aptient with me and also tell me examples as well Thanks a lot

    C / C++ / MFC c++ database sysadmin json tutorial

  • Begineer 's questions:using ADO
    B brilliant101

    Hello all I am making a client server application in which client will call system calls and send the information to server in VC++. I want to store that information into database e.g Access using ADO( in VC++). Plz guide me what should i do? Do i have to do serialization of data? e.g From client i have to send the the computer name and user name to server. how will i do this ? how will i serialize data? how will i use ADO? I am newbie plz be aptient with me and also tell me examples as well Thanks a lot

    Database c++ database sysadmin json tutorial

  • Using ADO
    B brilliant101

    i am making a client server application in which client will call system calls and send the information to server. I want to store that information into database e.g Access using ADO. Plz guide me what should i do? Do i have to do serialization of data? e.g From client i have to send the the computer name and user name to server. how will i do this ? how will i serialize data? how will i use ADO? I am newbie plz be aptient with me and also tell me examples as well Thanks a lot

    C / C++ / MFC database sysadmin json tutorial question

  • Api that shows the status of NIC
    B brilliant101

    Plz tell me about an api that enlists the status of NIC?( keyboard ,Hard disk and RAM) Wheather they are installed or not ? Plz also provide its example

    C / C++ / MFC json tutorial question

  • List of applications runned by a user
    B brilliant101

    How can we get the list of applications runned by a particular user? like MS Word, MS powerpoint, notepad used by administrator and also provide examples. Plz help me out pals

    C / C++ / MFC help question

  • Non MFC :Client /Server
    B brilliant101

    i have converted the program into non MFC but it complies and runs but does not send the string. 1) Client: include "stdafx.h" #include iostream.h #include conio.h #include winsock2.h #include process.h #include stdio.h UINT WINAPI SendStatus(LPVOID pParam) { cout<<"\n I am in the thread!!\n"; SOCKET client; //socket is uint WSADATA wsaData; //WSADATA structure sockaddr_in serveraddr; //sockaddr_in int wsaret=WSAStartup(0x101,&wsaData); //Initialize wsaret variable if(wsaret!=0) { cout<<"Fail to initialize:"; return 0; } struct hostent *hp; unsigned int addr; struct sockaddr_in server; char servername [30] ="localhost"; SOCKET conn; conn=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); if(conn==INVALID_SOCKET) return 0; if(inet_addr(servername)==INADDR_NONE) { hp=gethostbyname(servername); } else { addr=inet_addr(servername); hp=gethostbyaddr((char*)&addr,sizeof(addr),AF_INET); } if(hp==NULL) { cout<<"Fail to get peer address:"; closesocket(conn); return 0; } server.sin_addr.s_addr=*((unsigned long*)hp->h_addr); server.sin_family=AF_INET; server.sin_port=htons(20248); if(connect(conn,(struct sockaddr*)&server,sizeof(server))) { cout<<"Fail to connect:"; closesocket(conn); return 0; } char buff[512]; sprintf(buff,"Client Process Status: \nBismillah he ar rahman ner raheem\n Allah is Great"); cout<<"\nClient Process status is being send:\n"; send(conn,buff,strlen(buff),0); closesocket(conn); cout<<"Process's Status sent:"<

    Collaboration / Beta Testing c++ sysadmin

  • Serious:Client Server User Tracking
    B brilliant101

    I am building a client server user tracking system that will get the username and computer name from the client kernel and send it to server via winsock. I have got the different pieces of the puzzle but now i want to combine them all. So help me out 1) i have the perfect running code of the system call GetComputerName( ). which uses windows.h #include #include int WINAPI WinMain(HINSTANCE h,HINSTANCE p,LPSTR c,int n) { TCHAR szName[256]; // pointer to system information string TCHAR szBuffer[512]; // buffer for expanded string unsigned long iTextLength; TCHAR szSystemInfo[5]; iTextLength = sizeof(szName)/sizeof(TCHAR); // number of characters, not bytes GetComputerName(szName, &iTextLength); iTextLength = sprintf(szBuffer, "Computer name: %s", szName); MessageBox(0, szBuffer, "Computer Name", 0); GetUserName(szName,&iTextLength);//Get User Name iTextLength = sprintf(szBuffer, "User name: %s", szName); MessageBox(0, szBuffer, "User Name", 0); return 0; } 2) I also have the perfect running code of client which uses MFC and sends the status of the client-- that is sends the string from the client which is received at the server. #include "stdafx.h" #include "client.h" #include windows.h #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // The one and only application object UINT sendStatus(); CWinApp theApp; using namespace std; int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { int nRetCode = 0; sendStatus(); return nRetCode; } UINT sendStatus() { SOCKET client; WSADATA wsaData; //data structure sockaddr_in serveraddr; //sockaddr_in int wsaret=WSAStartup(0x101,&wsaData); //Initialize wsaret variable if(wsaret!=0) { cout<<"Fail to initialize:"; return 0; } struct hostent *hp; unsigned int addr; struct sockaddr_in server; CString servername="localhost"; SOCKET conn; conn=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); if(conn==INVALID_SOCKET) return 0; if(inet_addr(servername)==INADDR_NONE) { hp=gethostbyname(servername); } else { addr=inet_addr(servername); hp=gethostbyaddr((char*)&addr,sizeof(addr),AF_INET); } if(hp==NULL) { cout<<"Fail to get peer address:"; closesocket(conn); return 0; } server.sin_addr.s_addr=*((unsigned long*)hp->h_addr); serve

    Collaboration / Beta Testing c++ sysadmin debugging help

  • C++ Builder/ Client Server
    B brilliant101

    DOes anyone of you know about the C++ bulider and its Client server Suit. I have got C++ builder 1997 edition but there is no serversocket and clientsocket item in the internet component tool kit. Plz help me out from where to download them ? or from where to activate them?

    C / C++ / MFC c++ sysadmin help question

  • web pages offline
    B brilliant101

    Hello i am using windows XP as administrator. The problem is that the exploerer does not save the pages offline. That is you can view them offline. I have tried the method told in the "f1" help to synchronize the web pages before offline but i do not like it and it sometimes does not work. Is there any way the exploer behave as in windows 98 and 2000 where u can see previous webpages by going to histroy . Is there some problem with installation? Plz help me out

    System Admin help question

  • MFC/Buiider
    B brilliant101

    I am making a client server application which for network monitoring in wwhich client will run as NT service. Now i am really in a fix should i do the project in MFC or C++ builder? In case of MFC What are the MFC 's classes and objects which encapsulates "GetUserName()","GetComputerName()","EnumProcess()" and "SetDiCreateDeviceList()" for device lists. Do u thinks C++ Builder's RAD environment will help in making the project faster? How different and difficult is it form Visual C++? Thanks

    C / C++ / MFC c++ sysadmin help question workspace

  • Thread Creation / Server
    B brilliant101

    1)I converted the MFC TCP server into non mfc TCP server using winsock.h. It complies and runs but it does not performs efficiently as the server thread is not created properly in the non mfc statment of _beginthread and CreateThread Plz modify the code so that it runs smoothly thanks 2) what i have to do to make UDP server? 3) how can i change it into mutithreaded server( that accpets connections from many threads?) #include process.h #include windows.h #include iostream.h #include conio.h #include winsock2.h /* _beginthread, _endthread */ #include stddef.h #include stdlib.h unsigned int ServerThread(LPVOID pParam); int main(int argc, char* argv[]) { HANDLE hThread; unsigned long iID; cout<<"!!hello world!!\n"; LPVOID var=0; //unsigned int block=0; //block=ServerThread(var); //Call to the function // _beginthreadex( ServerThread, 0, NULL ); hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE )ServerThread,NULL,0,&iID); //_beginthread(ServerThread, 0, NULL ); // hThread = (HANDLE)_beginthreadex( NULL, 0, &ServerThread, NULL, 0, // &iID ); cout<<"\n\nyahoo"; // while(getch()!=27); // getch(); return 0; } unsigned int ServerThread(LPVOID pParam) { cout<<"Hello from thread"; SOCKET server; //Socket is unsigned int WSADATA wsaData; sockaddr_in local; // Structure variable int wsaret=WSAStartup(0x101,&wsaData); //Initialization if(wsaret!=0) { return 0; }

    C / C++ / MFC question c++ sysadmin

  • WinSock Api tutorial
    B brilliant101

    Hello, i am trying to build i client server application using winsock library but i thinkit will be easy by not using MFC. Please give me tutorial about how to make a simple client and simple server. At the client end i will be using GETCOmPuterNAme() and Username apis and i want to transmit them to server. Please help me out in this regard.

    C / C++ / MFC tutorial c++ sysadmin json help

  • hardware enumeration
    B brilliant101

    i included the windows.h,setupapi.h,stdio.h i want the computer to enumerate the hardware devices like mouse,key board, NIC etc.... thanks

    C / C++ / MFC help docker hardware debugging

  • hardware enumeration
    B brilliant101

    it is a program of MSDN , which i have written in console win32 application because in win32 applicaiton it was also giving problems.It gives an error that SetDICreateDeviceInfoList() does not take 7 parameters....Plz help me out i also used debug mode still i was unable to derive the hardware list #include #include #include DWORD Err; HDEVINFO DoDeviceEnum( GUID InterfaceClassGuid) /* Routine Description: Retrieves the device information set that contains that contains the devices of the specified class. Parameters: InterfaceClassGuid - The interface class GUID. Return Value: If the function succeeds, the return value is a handle to the device information set. If the function fails, the return value is zero. */ { HDEVINFO DeviceInfoSet; HDEVINFO NewDeviceInfoSet; // Create a device information set that will be the container for // the device interfaces. DeviceInfoSet = SetupDiCreateDeviceInfoList(NULL, NULL); if(DeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiCreateDeviceInfoList failed: %lx.\n", Err ); return 0; } // Retrieve the device information set for the interface class. NewDeviceInfoSet=SetupDiGetClassDevsEx( InterfaceClassGuid,NULL,NULL,DIGCF_PRESENT | DIGCF_DEVICEINTERFACE,DeviceInfoSet,NULL,NULL); if(NewDeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiGetClassDevsEx failed: %lx.\n", Err ); return 0; } return NewDeviceInfoSet; } int main(int argc, TCHAR* argv[]) { DoDeviceEnum(NULL); return 0; }

    C / C++ / MFC help docker hardware debugging

  • It complies and links but ....
    B brilliant101

    It is a code from MSDN. It complies and links but does not executes giving the following error File:i386\chkesp.c line:48 The value of ESP was not properly saved across a fuction call.This is usually a result of calling function decleared with one calling convention with a funciton pointer decleared with a different calling convention. #include windows.h,Setupapi.h> #include stdio.h DWORD Err; HDEVINFO DoDeviceEnum( GUID InterfaceClassGuid) /* Routine Description: Retrieves the device information set that contains that contains the devices of the specified class. the devices of the specified class. Parameters: InterfaceClassGuid - The interface class GUID. Return Value: If the function succeeds, the return value is a handle to the device information set. If the function fails, the return value is zero. */ { HDEVINFO DeviceInfoSet; HDEVINFO NewDeviceInfoSet; // Create a device information set that will be the container for // the device interfaces. DeviceInfoSet = SetupDiCreateDeviceInfoList(NULL, NULL); if(DeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiCreateDeviceInfoList failed: %lx.\n", Err ); return 0; } // Retrieve the device information set for the interface class. NewDeviceInfoSet = SetupDiGetClassDevsEx( &InterfaceClassGuid, // address of guid required NULL, // no enumerator NULL, // no parent window handle (might not be a good idea…) DIGCF_PRESENT | DIGCF_DEVICEINTERFACE, // flags //DeviceInfoSet, // do not pass this in, not in function prototype NULL, // NULL implies local machine NULL // Reserved’ must be null ); if(NewDeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiGetClassDevsEx failed: %lx.\n", Err ); return 0; } return NewDeviceInfoSet; } int main(int argc, TCHAR* argv[]) { GUID var; DoDeviceEnum(var); return 0; }

    C / C++ / MFC docker help

  • Hardware list error
    B brilliant101

    It is the code from MSDN It complies and links but does not executes giving the following error File:i386\chkesp.c line:48 The value of ESP was not properly saved across a fuction call.This is usually a result of calling function decleared with one calling convention with a funciton pointer decleared with a different calling convention. #include #include #include DWORD Err; HDEVINFO DoDeviceEnum( GUID InterfaceClassGuid) /* Routine Description: Retrieves the device information set that contains that contains the devices of the specified class. Parameters: InterfaceClassGuid - The interface class GUID. Return Value: If the function succeeds, the return value is a handle to the device information set. If the function fails, the return value is zero. */ { HDEVINFO DeviceInfoSet; HDEVINFO NewDeviceInfoSet; // Create a device information set that will be the container for // the device interfaces. DeviceInfoSet = SetupDiCreateDeviceInfoList(NULL, NULL); if(DeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiCreateDeviceInfoList failed: %lx.\n", Err ); return 0; } // Retrieve the device information set for the interface class. NewDeviceInfoSet = SetupDiGetClassDevsEx( &InterfaceClassGuid, // address of guid required NULL, // no enumerator NULL, // no parent window handle (might not be a good idea…) DIGCF_PRESENT | DIGCF_DEVICEINTERFACE, // flags //DeviceInfoSet, // do not pass this in, not in function prototype NULL, // NULL implies local machine NULL // Reserved’ must be null ); if(NewDeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiGetClassDevsEx failed: %lx.\n", Err ); return 0; } return NewDeviceInfoSet; } int main(int argc, TCHAR* argv[]) { GUID var; DoDeviceEnum(var); return 0; }

    C / C++ / MFC docker hardware help

  • SetDICreateDeviceInfoList()
    B brilliant101

    i have included windows.h, stdio.h, setupapi.h

    C / C++ / MFC help docker

  • SetDICreateDeviceInfoList()
    B brilliant101

    it is a program of MSDN , which i have written in console win32 application because in win32 applicaiton it was also giving problems.It gives an error that SetDICreateDeviceInfoList() does not take 7 parameters....Plz help me out #include #include #include DWORD Err; HDEVINFO DoDeviceEnum( GUID InterfaceClassGuid) /* Routine Description: Retrieves the device information set that contains that contains the devices of the specified class. Parameters: InterfaceClassGuid - The interface class GUID. Return Value: If the function succeeds, the return value is a handle to the device information set. If the function fails, the return value is zero. */ { HDEVINFO DeviceInfoSet; HDEVINFO NewDeviceInfoSet; // Create a device information set that will be the container for // the device interfaces. DeviceInfoSet = SetupDiCreateDeviceInfoList(NULL, NULL); if(DeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiCreateDeviceInfoList failed: %lx.\n", Err ); return 0; } // Retrieve the device information set for the interface class. NewDeviceInfoSet=SetupDiGetClassDevsEx( InterfaceClassGuid,NULL,NULL,DIGCF_PRESENT | DIGCF_DEVICEINTERFACE,DeviceInfoSet,NULL,NULL); if(NewDeviceInfoSet == INVALID_HANDLE_VALUE) { Err = GetLastError(); printf( "SetupDiGetClassDevsEx failed: %lx.\n", Err ); return 0; } return NewDeviceInfoSet; } int main(int argc, TCHAR* argv[]) { DoDeviceEnum(NULL); return 0; }

    C / C++ / MFC help docker

  • Applications and Hardware devices
    B brilliant101

    Do you know of any such api or function which enlists applications? eg, Internet explorer,Word,Power point etc. Also do you know of any api which enlists the the hardware devices like mouse,keyboard,NIC etc Please tell about these apis and their header files Thanks a lot

    C / C++ / MFC hardware json question

  • Event enumeration:compiles,links no output
    B brilliant101

    it uses windows.h and stdio.h headers

    C / C++ / MFC
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups