CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: inside ATLCOM

  1. #1
    Join Date
    May 2003
    Location
    Madurai, India
    Posts
    3

    inside ATLCOM

    hi

    this is the function i have i n c++.
    AcceptConnections(SOCKET sock);

    but i want to add this method to ATL Object.
    There i am getting error saying that
    error MIDL2025 : syntax error : expecting a type specification near "SOCKET"

    that file is .idl file.

    please help me in this.
    basically i want to pass a structure to interface method.

    bye
    seshu
    Longing for a peaceful world,
    Muthiah.C

  2. #2
    Join Date
    Apr 2003
    Posts
    1,755

    Smile

    error MIDL2025 : syntax error : expecting a type specification near "SOCKET"
    This means that the MIDL compiler cannot recognize "SOCKET". Actually when you look at the declaration of SOCKET in WINSOCK.H, it is declared this way
    Code:
    typedef unsigned int    u_int;
    typedef u_int           SOCKET;
    So in this way, SOCKET is just a C 32 bit unsigned int. So you will do is just change your declaration to long
    Code:
    AcceptConnections(long sock);
    Hope it will help you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured