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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
V

vanip

@vanip
About
Posts
10
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • VB's chr() function equivalent in vc++
    V vanip

    Thanks for ur help! i tried the same way. But as i am not sure of correctness, i placed here.Thanks once again

    C / C++ / MFC c++ question

  • VB's chr() function equivalent in vc++
    V vanip

    can anybody tell abt the VB's chr() equivalent in VC++?

    C / C++ / MFC c++ question

  • VB's chr() equivalent in vc++
    V vanip

    Hi all, Can anybody tell abt the VB's chr() function equivalent in vc++ ?

    Visual Basic c++ question

  • socket-connection oriented-winsock
    V vanip

    here, i think there is no waiting problem.Because the external device sends message immediately after sending command code. Is there any other wrong in my code? For the first time it is responding immediately. For the second time not.

    C / C++ / MFC help

  • socket-connection oriented-winsock
    V vanip

    Hi , I am infancy to socket programming .I need to connect to an external device through terminalserver4 and i should be able to send command & receive output. Using the following code, i am able to send data to the external device from the two send functions and able to receive data from only the first recv function. The program is blocking at the second recv function. Please check the following code and help me if anywhere went wrong. #define DEST_IP "10.10.1.1" #define DEST_PORT 2001 void CSocktestDlg::process() { WSADATA wsaData; if(WSAStartup(MAKEWORD(1,1),&wsaData)!=0) { AfxMessageBox("WSAStartup failed",MB_OK); exit(1); } else { //AfxMessageBox("WSAStartup succeeded",MB_OK); } int sockfd; struct sockaddr_in dest_addr; //Establishing socket sockfd=socket(AF_INET,SOCK_STREAM,0); dest_addr.sin_family=AF_INET; dest_addr.sin_port=htons(DEST_PORT); dest_addr.sin_addr.s_addr=inet_addr(DEST_IP); memset(&(dest_addr.sin_zero),'\0',8); //For connecting if(connect(sockfd,(struct sockaddr *)&dest_addr,sizeof(struct sockaddr))==0) { //AfxMessageBox("Connected to remote system successfully",MB_OK); } else { AfxMessageBox("Unable to connect to remote machine",MB_OK); } //For sending data CString code= "2,76,69,68,77,73,44,73,77,68,69,73,77,68,69,0,217,105,3"; int len,bytes_sent,n,i; CTokenEx CtlArraySpliter; CStringArray strArray; CtlArraySpliter.Split(code,",",strArray,TRUE); for(i = 0; i < strArray.GetSize(); i++ ) { //len=strArray.GetAt(i).GetLength(); n = atoi(strArray.GetAt(i)); bytes_sent=send(sockfd,(char *) &n,sizeof(int),0); } strArray.RemoveAll(); AfxMessageBox("Sent message through socket to remote IP",MB_OK); Sleep(5000);

    C / C++ / MFC help

  • Accessing Activex control methods from static functions??
    V vanip

    Thanks Roger, The function is to be static because, i am calling this process function in a thread. How to pass the LPVOID parameter to this process function??

    C / C++ / MFC c++ com help tutorial question

  • Accessing Activex control methods from static functions??
    V vanip

    Thanks Vini, i implemented , but getting comple errors. Can u specify in more detail???? please!!!

    C / C++ / MFC c++ com help tutorial question

  • Accessing Activex control methods from static functions??
    V vanip

    Thanks nibu thomas, I tried this way. But getting run time assertion error. Any other way??

    C / C++ / MFC c++ com help tutorial question

  • Accessing Activex control methods from static functions??
    V vanip

    Thanks vinaya, How to make that static? I tried keeping static keyword in front of CPortController m_myportcontroller. But i am getting linker error. Do you know how to make that member as static??

    C / C++ / MFC c++ com help tutorial question

  • Accessing Activex control methods from static functions??
    V vanip

    Hi all, I am using an activex control which is registered under regsvr32. I created an MFC-dialog based aplication.I added activex control to the dialog box. And created a member-variable for the activex control thru class wizard.The member variable is m_myportcontroller.I called the activex method from a non-static member function of the dialog box using the member-variable as follows and worked fine. ex:- void CSampleDlg::process(void) { m_myportcontroller.Close(); } But i need to call the portcontroller methods from a static member function of a dialog based application (MFC). ex:- static void CSampleDlg::process(void) { m_myporcontroller.Close(); // Not accessible because static function } Please send sample code of how to access the methods from static function. Very urgently needed.Early reply is appreciatable. Awaiting for the reply, I had a problem in accessing Activex control methods from a static function

    C / C++ / MFC c++ com help tutorial question
  • Login

  • Don't have an account? Register

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