This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Forum
- :
- Re: lc_hostid returns save value with 2 different physical hard disks
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 18, 2018
01:59 AM
lc_hostid returns save value with 2 different physical hard disks
We have a problem with get hostid in our clients. We are using HostidDiskSernum as lc_hostid Parameter, our client has 2 PCs with 2 different physical hard disks but lc_hostId function return the same value. We don’t know why it happened.
Before we used HostidDefault but we got many problems if the user’s hardware is changed so we changed to HostidDiskSernum parameter.
Before we used HostidDefault but we got many problems if the user’s hardware is changed so we changed to HostidDiskSernum parameter.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 19, 2018
01:12 AM
HI,
Since the API lc_hosid provided with argument as "DISK_SERIAL_NUM" has been conventionally providing me with the (VSN) or say hard disk serial number. So, it would be interesting to know the environment in which you can observe this error.
What's the FNP API version? Also what's the environment (OS, VM/physical), if possible can you share the snippet of code ran which provides the similar outputs on 2 different systems?
Regards,
Abhay
Since the API lc_hosid provided with argument as "DISK_SERIAL_NUM" has been conventionally providing me with the (VSN) or say hard disk serial number. So, it would be interesting to know the environment in which you can observe this error.
What's the FNP API version? Also what's the environment (OS, VM/physical), if possible can you share the snippet of code ran which provides the similar outputs on 2 different systems?
Regards,
Abhay
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 19, 2018
01:14 AM
Hi ndphuong,
just noticed another query from you regarding "bootroom" setup. Where we don't have an actual hard disk on clients. Are you observing the reported behavior in same setup?
Regards,
Abhay
just noticed another query from you regarding "bootroom" setup. Where we don't have an actual hard disk on clients. Are you observing the reported behavior in same setup?
Regards,
Abhay
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 24, 2018
09:44 PM
Hi Abhay,
Thanks for your response.
We are using FNP 11.6. Both computers are running a 64-bit version of Windows 7, physical not VM, not BootRoom system.
The hostid is 200879 for 2 different physical hard disks (attached files)
Below is the code we are using:
private XmlResult GenerateMachineId()
{
var result = new XmlResult();
try
{
if (!Initialized || !JobCreated) Initialize();
IntPtr machineId = Marshal.AllocHGlobal(4096);
var returnEnum = (ResultEnum)Features.lc_hostid
(
_jobHandle,
FlexConstants.HostidDiskSernum,
machineId
);
result.success = returnEnum.Equals(ResultEnum.Success);
if (!result.success)
{
result.foreignData = GetForeignData(returnEnum);
}
else
{
var xmlData = new StringBuilder("");
foreach (string mId in Marshal.PtrToStringAnsi(machineId).Split(' '))
xmlData.Append("" + mId.Replace("\"", "") + " ");
xmlData.Append(" ");
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlData.ToString());
result.result = xmlDoc;
}
}
catch (Exception ex)
{
result.success = false;
result.error = -1;
result.errorMessage = ex.Message;
}
return result;
}
Thanks for your response.
We are using FNP 11.6. Both computers are running a 64-bit version of Windows 7, physical not VM, not BootRoom system.
The hostid is 200879 for 2 different physical hard disks (attached files)
Below is the code we are using:
private XmlResult GenerateMachineId()
{
var result = new XmlResult();
try
{
if (!Initialized || !JobCreated) Initialize();
IntPtr machineId = Marshal.AllocHGlobal(4096);
var returnEnum = (ResultEnum)Features.lc_hostid
(
_jobHandle,
FlexConstants.HostidDiskSernum,
machineId
);
result.success = returnEnum.Equals(ResultEnum.Success);
if (!result.success)
{
result.foreignData = GetForeignData(returnEnum);
}
else
{
var xmlData = new StringBuilder("
foreach (string mId in Marshal.PtrToStringAnsi(machineId).Split(' '))
xmlData.Append("
xmlData.Append("
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlData.ToString());
result.result = xmlDoc;
}
}
catch (Exception ex)
{
result.success = false;
result.error = -1;
result.errorMessage = ex.Message;
}
return result;
}
Aparashar wrote:
HI,
Since the API lc_hosid provided with argument as "DISK_SERIAL_NUM" has been conventionally providing me with the (VSN) or say hard disk serial number. So, it would be interesting to know the environment in which you can observe this error.
What's the FNP API version? Also what's the environment (OS, VM/physical), if possible can you share the snippet of code ran which provides the similar outputs on 2 different systems?
Regards,
Abhay
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 03, 2018
04:08 AM
Aparashar wrote:
HI,
Since the API lc_hosid provided with argument as "DISK_SERIAL_NUM" has been conventionally providing me with the (VSN) or say hard disk serial number. So, it would be interesting to know the environment in which you can observe this error.
What's the FNP API version? Also what's the environment (OS, VM/physical), if possible can you share the snippet of code ran which provides the similar outputs on 2 different systems?
Regards,
Abhay
Did you read my response?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 14, 2018
01:04 AM
there seems more to the issue here. Probably a formal support ticket would be the best way to get Flexera Engineering people involved.
Regards,
Abhay
Regards,
Abhay
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)