<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: C++ and system routines in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047255#M30999</link>
    <description>Instead of using QIO based code, why wouldn't you use the C socket functions such as at the following pointer&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[TCP/IP] Example-C++ World Wide Web HTML file reader. &lt;BR /&gt;&lt;BR /&gt;available at &lt;BR /&gt;(url may wrap)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h18000.www1.hp.com/support/asktima/communications/009E66D8-5F3A29A0-1C0096.html" target="_blank"&gt;http://h18000.www1.hp.com/support/asktima/communications/009E66D8-5F3A29A0-1C0096.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hoping this can help.</description>
    <pubDate>Wed, 01 Oct 2003 06:02:22 GMT</pubDate>
    <dc:creator>labadie_1</dc:creator>
    <dc:date>2003-10-01T06:02:22Z</dc:date>
    <item>
      <title>C++ and system routines</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047251#M30995</link>
      <description>HI&lt;BR /&gt;&lt;BR /&gt;I keep getting an incompatibility error when I try to use any of AST system routines :&lt;BR /&gt;&lt;BR /&gt;&amp;amp;ClientConnectAST,&lt;BR /&gt;.......................^&lt;BR /&gt;%CXX-E-INCOMPATIBLEPRM, argument of type "void (CSocketClient::*)()" is incompatible with parameter of type "void (*)(...) C"&lt;BR /&gt;&lt;BR /&gt;The sys$qio C prototype is defined as follows:&lt;BR /&gt;&lt;BR /&gt;int sys$qio (unsigned int efn, unsigned short int chan, unsigned int func, struct IOSB_T *iosb, void (*astadr)(__unknown_params), __int64 astprm, void *p1, __int64 p2,&lt;BR /&gt;__int64 p3, __int64 p4, __int64 p5, __int64 p6);&lt;BR /&gt;&lt;BR /&gt;I have a class called CSocketClient and a member function called void CSocketClient::ClientConnectAST() which submits the QIO as follows:&lt;BR /&gt;&lt;BR /&gt;status = sys$qio(  0,&lt;BR /&gt;                   TCPChannel,&lt;BR /&gt;          (IO$_SETMODE|IO$M_CTRL|IO$M_STARTUP),&lt;BR /&gt;          &amp;amp;connect_iosb,&lt;BR /&gt;          &amp;amp;ClientConnectAST,&lt;BR /&gt;           0,&lt;BR /&gt;           0,&lt;BR /&gt;           &amp;amp;ecb_dsc,                      &lt;BR /&gt;           0,0,0,0);&lt;BR /&gt;&lt;BR /&gt;My question is how do I get the above QIO to execute my member function ClientConnectAST !&lt;BR /&gt;&lt;BR /&gt;I have tried passing the member function as a pointer to the call but I still get the same error. The only work around I could get working was to declare ClientConnectAST  as a static method, but the problem with that is I lose all the memeber data unless I declare all the objects global - yuk !&lt;BR /&gt;&lt;BR /&gt;Please can anyone help ?? I need to use AST a lot in my programmes for timers as well.&lt;BR /&gt;&lt;BR /&gt;Thank-you for any help in advance.</description>
      <pubDate>Tue, 12 Aug 2003 13:16:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047251#M30995</guid>
      <dc:creator>Lai King Leung</dc:creator>
      <dc:date>2003-08-12T13:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: C++ and system routines</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047252#M30996</link>
      <description>Hi Lai,&lt;BR /&gt;I read my old C &amp;amp; VAX documentation; i think it is not changed the list parameters.&lt;BR /&gt;QIO system service require:&lt;BR /&gt;1) efn (event flag): you supply 0, it's right;&lt;BR /&gt;2) chan (I/O channel): you supply TCPChannel, it's right;&lt;BR /&gt;3) func (function code). you supply SETMODE with M_CTRL and M_STARTUP; ok i don't know the meaning for TCP/IP but SETMODE (that's active AST attention) require AST address to param P1 and I think M_CRTL is simila to M_CRTLCAST of TT driver.&lt;BR /&gt;4) iosb (I/O status block): you supply connect_iosb and i think it's right.&lt;BR /&gt;5) astadr (AST mask address): you supply ClientConnectAST and you declare it's a C/C++ function. But this is incorrect because you have supply a address of a mask of bits for activate AST (read documentation for format of this parameter). This is wrong!&lt;BR /&gt;6) astprm (AST parameter): I never used this, you supply 0, it's Ok.&lt;BR /&gt;7) P1 (parameter 1): you supply null but this parameter have to pointer to a your AST C/C++ function (I think ClientConnectAST).&lt;BR /&gt;8) P2 (parameter 2) devending by function: read documentation.&lt;BR /&gt;9) P3 etc, etc, read and read again your documentation.&lt;BR /&gt;This is a few notice I can help you.&lt;BR /&gt;Post the result a pay fee assign some points.&lt;BR /&gt;Bye&lt;BR /&gt;Antoniov&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Aug 2003 13:21:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047252#M30996</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2003-08-14T13:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: C++ and system routines</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047253#M30997</link>
      <description>Look in SYS$COMMON:[SYSHLP.EXAMPLES.TCPIP] for some C examples.  You might also have a look at the Mozilla sources -- there may be some relevant C++ examples in there.&lt;BR /&gt;&lt;BR /&gt;When do you want the AST routine to be called?  If you want it to fire as soon as the set-up I/O completes, then you have it in the correct location in your arg list.  If you want want it to fire whenever the CTRL or STARTUP events take place, then I think Antoniov's comment #5 is correct.&lt;BR /&gt;&lt;BR /&gt;I'm not that familiar with C++, but a static routine sounds like exactly what you'd need.  An AST could complete anytime your program is running, regardless of what's in or out of scope at the moment.</description>
      <pubDate>Thu, 14 Aug 2003 14:30:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047253#M30997</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2003-08-14T14:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: C++ and system routines</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047254#M30998</link>
      <description>The following two URLs have examples that should give you everything you need (though they don't deal with sockets specifically).  The second one has a title of "[DEC C++]  Discussion on Using Member Functions of a Class as ASTs" and shows three different ways of doing what you want.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h18000.www1.hp.com/support/asktima/appl_tools/CHAMP_SRC941115001693.html" target="_blank"&gt;http://h18000.www1.hp.com/support/asktima/appl_tools/CHAMP_SRC941115001693.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h18000.www1.hp.com/support/asktima/appl_tools/CHAMP_SRC950410005022.html" target="_blank"&gt;http://h18000.www1.hp.com/support/asktima/appl_tools/CHAMP_SRC950410005022.html&lt;/A&gt;</description>
      <pubDate>Thu, 14 Aug 2003 14:40:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047254#M30998</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2003-08-14T14:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: C++ and system routines</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047255#M30999</link>
      <description>Instead of using QIO based code, why wouldn't you use the C socket functions such as at the following pointer&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[TCP/IP] Example-C++ World Wide Web HTML file reader. &lt;BR /&gt;&lt;BR /&gt;available at &lt;BR /&gt;(url may wrap)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h18000.www1.hp.com/support/asktima/communications/009E66D8-5F3A29A0-1C0096.html" target="_blank"&gt;http://h18000.www1.hp.com/support/asktima/communications/009E66D8-5F3A29A0-1C0096.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hoping this can help.</description>
      <pubDate>Wed, 01 Oct 2003 06:02:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-and-system-routines/m-p/3047255#M30999</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2003-10-01T06:02:22Z</dc:date>
    </item>
  </channel>
</rss>

