Home Forums ActiveX components Other ActiveX components I am trying to use the Xceed Winsock Library in C++Builder 5 however when I try to compile the wrappers created by C++Builder I get compilation errors. Why?

Viewing 1 post (of 1 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #43153 |

    Unfortunately, the wrappers created by C++Builder 5 for the Xceed Winsock Library contain errors. The following is a list of the modifications that will need to be made to the wrappers in order to be able to use the Xceed Winsock Library in C++Builder 5.

    ***In the generated CPP file (XceedWinsockLib_OCX.cpp):
    1- In the TConnectionEvents::InvokeEvent method, for the last parameter, the address of the variant should be passed instead of its value.

    (OnDisconnected)(this, TVariant(params[0]), TVariant(params[1]), &TVariant(params[2]));

    2- In the TIncomingConnectionEvents::InvokeEvent method, the call to OnConnection is false. The line should be replaced with the following code:

    IDispatch* pdispDummy = NULL;
    (OnConnection)(this, TVariant(params[0]), TVariant(params[1]), TVariant(params[2]), TVariant(params[3]), &TVariant(params[4]), &pdispDummy, ( long* )( int* )TVariant(params[6]), TVariant(params[7]));

    ***In the generated H file (XceedWinsockLib_OCX.h):

    You will need to remove the underscore (_) in front of the “Set” methods of the following properties:

    __property Xceedwinsocklib_tlb::IdXWAddressPtr LocalAddress={ read=Get_LocalAddress, write=Set_LocalAddress, stored=false };

    __property Xceedwinsocklib_tlb::IdXWAddressPtr RemoteAddress={ read=Get_RemoteAddress, write=Set_RemoteAddress, stored=false };

    __property Xceedwinsocklib_tlb::IdXWFlowSpecPtr SendingFlowSpec={ read=Get_SendingFlowSpec, write=Set_SendingFlowSpec, stored=false };

    __property Xceedwinsocklib_tlb::IdXWFlowSpecPtr ReceivingFlowSpec={ read=Get_ReceivingFlowSpec, write=Set_ReceivingFlowSpec, stored=false };

    Imported from legacy forums. Posted by Xceed admin (had 1623 views)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.