Common Tasks :Connecting to the Local Host as a Specified User
来源:互联网 发布:巫女服 知乎 编辑:程序博客网 时间:2024/06/06 02:58
This allows your client to run on any host machine running VMware Server that has a given user account. For example, you could create a client script that a system administrator could use on any machine to shut down all virtual machines owned by a given user. The example shown below allows you to choose a user account when you run the script.
This form of connection is supported by VMware Server. If the host is running VMware Workstation, you must use the procedure Connecting to the Local Host as the Current User.
Example 3-2.
#include "vix.h" int main(int argc, char * argv[]){ VixHandle hostHandle = VIX_INVALID_HANDLE; VixHandle jobHandle = VIX_INVALID_HANDLE; VixError err; // Connect as specified user on local host. jobHandle = VixHost_Connect(VIX_API_VERSION, VIX_SERVICEPROVIDER_VMWARE_SERVER, NULL, // hostName 0, // hostPort argv[1], // userName argv[2], // password, 0, // options VIX_INVALID_HANDLE, // propertyListHandle NULL, // callbackProc NULL); // clientData err = VixJob_Wait(jobHandle, VIX_PROPERTY_JOB_RESULT_HANDLE, &hostHandle, VIX_PROPERTY_NONE); if (VIX_OK != err) { // Handle the error... goto abort; } Vix_ReleaseHandle(jobHandle); jobHandle = VIX_INVALID_HANDLE; // Other code goes here... abort: VixHost_Disconnect(hostHandle);}
- Common Tasks :Connecting to the Local Host as a Specified User
- Common Tasks :Connecting to the Local Host as the Current User
- Common Tasks :Connecting to a Specified Host
- Common Tasks :Connecting to a Host
- Unable to post the review. &&The user specified as a definer ('admin'@'localhost') does not exist
- The user specified as a definer (@'''') does not exist
- The user specified as a definer ('root'@'%') does not exist。
- The user specified as a definer ('root'@'%') does not exist
- The user specified as a definer ('root'@'%') does not exist。 .
- The user specified as a definer ('root'@'%') does not exist。
- The user specified as a definer ('XXXXX'@'%') does not exist
- The user specified as a definer ('root'@'%') does not exist
- The user specified as a definer ('monitor'@'%') does not exist
- The user specified as a definer (''@'') does not exist
- The user specified as a definer ('montor'@'%') does not exist
- The user specified as a definer ('test'@'%') does not exist
- The user specified as a definer ('root'@'%') does not exist
- The user specified as a definer ('root'@'%') does not exist
- Common Tasks :Connecting to a Specified Host
- Html2Pdf:C调用wkhtmltopdf的API来将Html转换为pdf文件
- Androdi Droid Fu(第三方库介绍)
- JNI 常用API
- 数据结构中串部分,对于一些问题的认识
- Common Tasks :Connecting to the Local Host as a Specified User
- 类的实例与record在指针上的本质不同
- 高精度加法
- 技术不如你,但老板就是赏识他,为什么?
- SQL Tips:兼顾检索速度和精确性
- SQL Server与Oracle对比学习:表的管理和组织
- struts2——ServletActionContext
- Common Tasks :Connecting to the Local Host as the Current User
- SQL Tips:大数据量下的数据库日期操作问题