Quantcast
Channel: VMware Communities : Popular Discussions - VMware Server Archives
Viewing all articles
Browse latest Browse all 69891

I cant start easy VIX program under Linux from man ! Please help!!!

$
0
0

Hello from Moscow!

I have troble width C API programming. I get example from "Server C API Preview Programming", but he not working! Please help! Give me, please, simple VIX example, desired width compiling instruction...

This is my example:

 

#include <stdio.h>

#include "vix.h"

 

int main()

{

 

    VixHandle hostHandle = VIX_INVALID_HANDLE;

    VixHandle jobHandle = VIX_INVALID_HANDLE;

    VixError err;

    jobHandle = VixHost_Connect(VIX_API_VERSION,

                       VIX_SERVICEPROVIDER_VMWARE_SERVER,

                    NULL,

                    0,

                    NULL,

                    NULL,

                    0,

                    VIX_INVALID_HANDLE,

                    NULL,

                    NULL);

                     

    err = VixJob_Wait(jobHandle,

                VIX_PROPERTY_JOB_RESULT_HANDLE,

                &hostHandle,

                VIX_PROPERTY_NONE);

          

     

    if (VIX_OK != err)     {

     printf ("\nERROR\n");

     goto abort;

    }

 

    jobHandle = VixVM_Open(hostHandle, "//home//temp//vmware//1.vmx",

               NULL,

               NULL);

 

    Vix_ReleaseHandle(jobHandle);

     printf ("All ok");

abort:

    Vix_ReleaseHandle(jobHandle);

    Vix_ReleaseHandle(hostHandle);

 

}

 

P.S.

Server was running correctly, and vmware server console is working...

 

Message was edited by:

        UFO


Viewing all articles
Browse latest Browse all 69891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>