<?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: VixHost_Connect    Problem in VIX API Discussions</title>
    <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477459#M1700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this exact problem with any api.&lt;/P&gt;&lt;P&gt;I am running the latest VMWare Server 1.0.3 and the VIX 1.1 API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using DEV-C++, the Perl interface and the Com interface all crash on me.&lt;/P&gt;&lt;P&gt;On Com and Perl it crashes when getting the error codes.&lt;/P&gt;&lt;P&gt;The error returned after connect is 6 (cant translate to err msg because the API crashes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not matter the connection strings used or ports&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample codes all compile fine but crash on execution after the connect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* \----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; BEGIN CODE SNIPPET&lt;/P&gt;&lt;P&gt;\----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "vix.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define  CONNTYPE VIX_SERVICEPROVIDER_VMWARE_SERVER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define  HOSTNAME ""&lt;/P&gt;&lt;P&gt;#define  HOSTPORT 0&lt;/P&gt;&lt;P&gt;#define  USERNAME ""&lt;/P&gt;&lt;P&gt;#define  PASSWORD ""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define  VMPOWEROPTIONS VIX_VMPOWEROP_NORMAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Global variables.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static char *progName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;static void&lt;/P&gt;&lt;P&gt;usage()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;   fprintf(stderr, "Usage: %s  1) {&lt;/P&gt;&lt;P&gt;        vmxPath = argv[1];&lt;/P&gt;&lt;P&gt;        fprintf(stderr, "received: %s \n", argv[1]);&lt;/P&gt;&lt;P&gt;    } else {&lt;/P&gt;&lt;P&gt;        usage();&lt;/P&gt;&lt;P&gt;        exit(EXIT_FAILURE);&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;    jobHandle = VixHost_Connect(VIX_API_VERSION,&lt;/P&gt;&lt;P&gt;                                CONNTYPE,&lt;/P&gt;&lt;P&gt;                                HOSTNAME, // *hostName,&lt;/P&gt;&lt;P&gt;                                HOSTPORT, // hostPort,&lt;/P&gt;&lt;P&gt;                                USERNAME, // *userName,&lt;/P&gt;&lt;P&gt;                                PASSWORD, // *password,&lt;/P&gt;&lt;P&gt;                                0, // options,&lt;/P&gt;&lt;P&gt;                                VIX_INVALID_HANDLE, // propertyListHandle,&lt;/P&gt;&lt;P&gt;                                NULL, // *callbackProc,&lt;/P&gt;&lt;P&gt;                                NULL); // *clientData);&lt;/P&gt;&lt;P&gt;    return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* \----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; END CODE SNIPPET&lt;/P&gt;&lt;P&gt;\----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This crashes in the same manner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 May 2007 15:05:41 GMT</pubDate>
    <dc:creator>zerovoid</dc:creator>
    <dc:date>2007-05-21T15:05:41Z</dc:date>
    <item>
      <title>VixHost_Connect    Problem</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477455#M1696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi from Austria,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i want to run the following code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include "vix.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VixHandle hostHandle = VIX_INVALID_HANDLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;VixError err;&lt;/P&gt;&lt;P&gt;VixHandle jobHandle = VIX_INVALID_HANDLE;&lt;/P&gt;&lt;P&gt;VixHandle vmHandle = VIX_INVALID_HANDLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;printf("before");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jobHandle = VixHost_Connect(VIX_API_VERSION,&lt;/P&gt;&lt;P&gt;VIX_SERVICEPROVIDER_VMWARE_SERVER,&lt;/P&gt;&lt;P&gt;"localhost", // *hostName,&lt;/P&gt;&lt;P&gt;902, // hostPort,&lt;/P&gt;&lt;P&gt;"localadmin", // *userName,&lt;/P&gt;&lt;P&gt;"thepassword", // *password,&lt;/P&gt;&lt;P&gt;0, // options,&lt;/P&gt;&lt;P&gt;VIX_INVALID_HANDLE, // propertyListHandle,&lt;/P&gt;&lt;P&gt;NULL, // *callbackProc,&lt;/P&gt;&lt;P&gt;NULL); // *clientData);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;printf("after");&lt;/P&gt;&lt;P&gt;err = VixJob_Wait(jobHandle,&lt;/P&gt;&lt;P&gt;VIX_PROPERTY_JOB_RESULT_HANDLE,&lt;/P&gt;&lt;P&gt;&amp;amp;hostHandle,&lt;/P&gt;&lt;P&gt;VIX_PROPERTY_NONE);&lt;/P&gt;&lt;P&gt;if (VIX_OK != err) {&lt;/P&gt;&lt;P&gt;goto abort;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code does compiles, but during the runtime the program doesn't&lt;/P&gt;&lt;P&gt;come to print "after".&lt;/P&gt;&lt;P&gt;There is an error thrown at runtime, which looks like this&lt;/P&gt;&lt;P&gt;&lt;A href="http://666kb.com/i/am63ukv2oljdavh6v.jpg" target="test_blank"&gt;http://666kb.com/i/am63ukv2oljdavh6v.jpg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excuse for the german language, but the bold text says:&lt;/P&gt;&lt;P&gt;asdf.exe has made a problem, and it has to be closed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;under it stands the stereotyp message from windows, which says that if the program has not been saved, some data will be lost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the buttons : debug &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;and the other: close&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my operation system is : win XP profession serivce pack 2&lt;/P&gt;&lt;P&gt;and the vm server works as it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me because i don't know what to do to solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 11:29:37 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477455#M1696</guid>
      <dc:creator>grubernd</dc:creator>
      <dc:date>2007-02-28T11:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: VixHost_Connect    Problem</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477456#M1697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to connect to the VirtualCenter running on your system? the connection  parameter  "localhost" implies that..isn't it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 11:59:13 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477456#M1697</guid>
      <dc:creator>sugatha</dc:creator>
      <dc:date>2007-03-05T11:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: VixHost_Connect    Problem</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477457#M1698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option is, you could use a tcpmon between the client and the server (VC or ESX) and chk out the SOAP XML - the reason will be much clearer for the crash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 12:00:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477457#M1698</guid>
      <dc:creator>sugatha</dc:creator>
      <dc:date>2007-03-05T12:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: VixHost_Connect    Problem</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477458#M1699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's nothing obivously wrong here.  But I have a suggestion and some questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\- first, it may be crashing in the VixJob_Wait(), since the printf() may not be flushing -- can you tweak the code to be sure its flushing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\- where does  the debugger say the crash is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\- what version of VMware server (and Vix) are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\- I don't know anything about Dev-C++ -- is there a chance its got any incompatibilities with MS VC 2003 libraries?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 22:09:02 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477458#M1699</guid>
      <dc:creator>lemke</dc:creator>
      <dc:date>2007-03-09T22:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: VixHost_Connect    Problem</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477459#M1700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this exact problem with any api.&lt;/P&gt;&lt;P&gt;I am running the latest VMWare Server 1.0.3 and the VIX 1.1 API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using DEV-C++, the Perl interface and the Com interface all crash on me.&lt;/P&gt;&lt;P&gt;On Com and Perl it crashes when getting the error codes.&lt;/P&gt;&lt;P&gt;The error returned after connect is 6 (cant translate to err msg because the API crashes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not matter the connection strings used or ports&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample codes all compile fine but crash on execution after the connect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* \----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; BEGIN CODE SNIPPET&lt;/P&gt;&lt;P&gt;\----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "vix.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define  CONNTYPE VIX_SERVICEPROVIDER_VMWARE_SERVER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define  HOSTNAME ""&lt;/P&gt;&lt;P&gt;#define  HOSTPORT 0&lt;/P&gt;&lt;P&gt;#define  USERNAME ""&lt;/P&gt;&lt;P&gt;#define  PASSWORD ""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define  VMPOWEROPTIONS VIX_VMPOWEROP_NORMAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Global variables.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static char *progName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;static void&lt;/P&gt;&lt;P&gt;usage()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;   fprintf(stderr, "Usage: %s  1) {&lt;/P&gt;&lt;P&gt;        vmxPath = argv[1];&lt;/P&gt;&lt;P&gt;        fprintf(stderr, "received: %s \n", argv[1]);&lt;/P&gt;&lt;P&gt;    } else {&lt;/P&gt;&lt;P&gt;        usage();&lt;/P&gt;&lt;P&gt;        exit(EXIT_FAILURE);&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;    jobHandle = VixHost_Connect(VIX_API_VERSION,&lt;/P&gt;&lt;P&gt;                                CONNTYPE,&lt;/P&gt;&lt;P&gt;                                HOSTNAME, // *hostName,&lt;/P&gt;&lt;P&gt;                                HOSTPORT, // hostPort,&lt;/P&gt;&lt;P&gt;                                USERNAME, // *userName,&lt;/P&gt;&lt;P&gt;                                PASSWORD, // *password,&lt;/P&gt;&lt;P&gt;                                0, // options,&lt;/P&gt;&lt;P&gt;                                VIX_INVALID_HANDLE, // propertyListHandle,&lt;/P&gt;&lt;P&gt;                                NULL, // *callbackProc,&lt;/P&gt;&lt;P&gt;                                NULL); // *clientData);&lt;/P&gt;&lt;P&gt;    return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* \----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; END CODE SNIPPET&lt;/P&gt;&lt;P&gt;\----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This crashes in the same manner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 15:05:41 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477459#M1700</guid>
      <dc:creator>zerovoid</dc:creator>
      <dc:date>2007-05-21T15:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: VixHost_Connect    Problem</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477460#M1701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it does appear to work fine with VC+&lt;EM&gt;6 but not VC&lt;/EM&gt;+ 2005 or DevC++&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 15:27:24 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477460#M1701</guid>
      <dc:creator>zerovoid</dc:creator>
      <dc:date>2007-05-21T15:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: VixHost_Connect    Problem</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477461#M1702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some of the issues are probably caused by using the 1.1 API with the 1.0 server.  The constant VIX_API_VERSION has been bumped, and server doesn't deal well with the '2' from 1.1 instead of the '1' it expects.  Passing in a '1' might solve many of your problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, that doesn't make a lot of sense that the different compilers have different results, so the other possibility is a C runt-time mismatch.  The Vix library expects a mutil-threaded, non-debug CRT.  If you're letting Visual Studio set up the project, it may be setting you to use a debug CRT, and the threading model could also be incorrect.  Unfortunately, if you mix CRT versions, you tend to get ugly crashes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And errcode 6 is 'not supported'.  This is probably because you're trying to use the version 2 API with a version 1 back end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're working with server 1.03, you can stay with the Vix 1.0 that shipped with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 18:26:00 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/VixHost-Connect-Problem/m-p/1477461#M1702</guid>
      <dc:creator>lemke</dc:creator>
      <dc:date>2007-05-21T18:26:00Z</dc:date>
    </item>
  </channel>
</rss>

