ContentsIndex
Example
vm_tag_get_tag
VMINT appVersion = 0;     // Version is VMINT
VMWSTR appName = NULL;    // Application Name is VMWSTR
VMINT reqSize = 0;

// Application version is VMINT, always 4 bytes.
if(VM_IS_SUCCEEDED(vm_tag_get_tag(NULL,
                                  VM_TAG_ID_VERSION,
                                  &appVersion,
                                  sizeof(appVersion))))
{
  vm_log_info("version=%d.%d.%d", (appVersion >> 1) & 0xFF,
                                  (appVersion >> 2) & 0xFF,
                                  (appVersion >> 3) & 0xFF);
}

// Get required buffer size for Application Name information.
if (VM_IS_SUCCEEDED(vm_tag_get_tag(NULL,
                                   VM_TAG_ID_APP_NAME,
                                   NULL,
                                   &reqSize)))
{
  appName = (VMWSTR*)vm_calloc(reqSize);
  if(appName)
  {
      if(VM_IS_SUCCEEDED(vm_tag_get_tag(NULL,
                                        VM_TAG_ID_APP_NAME,
                                        appName,
                                        &reqSize)))
      {
          // You can then proceeed to
      }
  }
}
// free it when reserved
vm_free(tagName);
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.