# Name

VixVM_CreateTempFileInGuest

# Description

    VixHandle
    VixVM_CreateTempFileInGuest(VixHandle vmHandle,
                                int options,
                                VixHandle propertyListHandle,
                                VixEventProc *callbackProc,
                                void *clientData);

This function creates a temporary file in the guest operating system. The user is responsible for removing the file when it is no longer needed.

# Parameters

vmHandle
  Identifies a virtual machine. Call VixVM_Open() to create a virtual machine handle.
options
  Must be 0.
propertyListHandle
  Must be VIX_INVALID_HANDLE.
callbackProc
  A callback function that will be invoked when the operation is complete.
clientData
  A parameter that will be passed to the callbackProc function.

# Return Value

VixHandle. A job handle that describes the state of this asynchronous operation.

# Remarks

- You must call VixVM_LoginInGuest() before calling this function.
- The result of the call (in the form of a string containing the path to the temp file) is in the property VIX_PROPERTY_JOB_RESULT_ITEM_NAME on the returning jobHandle.

# Side Effects

None.

# Requirements

vix.h, since VMware Workstation 6.0
Minimum Supported Guest OS: Microsoft Windows NT Series, Linux

# Example

    char *tempFilePath;

    jobHandle = VixVM_CreateTempFileInGuest(vmHandle,
                                            0,
                                            VIX_INVALID_HANDLE,
    					NULL,
    					NULL);
    err = VixJob_Wait(jobHandle,
                      VIX_PROPERTY_JOB_RESULT_ITEM_NAME,
    		  &tempFilePath,
    		  VIX_PROPERTY_NONE);
    if (VIX_FAILED(err)) {
       // Handle the error...
    }

    // Use the file.

    Vix_FreeBuffer(tempFilePath);

Copyright (C) 2007-2018 VMware, Inc. All rights reserved.