本文整理汇总了C#中System.IntPtr.AsString方法的典型用法代码示例。如果您正苦于以下问题:C# IntPtr.AsString方法的具体用法?C# IntPtr.AsString怎么用?C# IntPtr.AsString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IntPtr
的用法示例。
在下文中一共展示了IntPtr.AsString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PassThruGetLastError
public static J2534Err PassThruGetLastError(IntPtr errorDescription)
{
var result = Loader.Lib.PassThruGetLastError(errorDescription);
Log.WriteLine(" error: " + errorDescription.AsString());
return result;
}
示例2: PassThruReadVersion
public static J2534Err PassThruReadVersion(
int deviceId, IntPtr firmwareVersion, IntPtr dllVersion, IntPtr apiVersion)
{
Log.WriteTimestamp("", "PTReadVersion({0}, 0x{1}, 0x{2}, 0x{3})",
deviceId,
firmwareVersion.ToString("X8"),
dllVersion.ToString("X8"),
apiVersion.ToString("X8"));
var result = Loader.Lib.PassThruReadVersion(deviceId, firmwareVersion, dllVersion, apiVersion);
Log.WriteLine(" Firmware: " + firmwareVersion.AsString());
Log.WriteLine(" DLL: " + dllVersion.AsString());
Log.WriteLine(" API: " + apiVersion.AsString());
Log.WriteTimestamp(" ", "{0}: {1}", (int)result, result);
return result;
}
示例3: PassThruOpen
public static J2534Err PassThruOpen(IntPtr name, ref int deviceId)
{
Log.WriteLine("------------------------------------------");
Log.WriteLine("start log on {0} at {1}", Loader.Device.Name, DateTime.Now);
Log.WriteLine("------------------------------------------");
Log.WriteTimestamp("", "PTOpen({0}, {1})", name.ToString("X8"), deviceId);
Log.WriteLine(" name: ", name.AsString());
var result = Loader.Lib.PassThruOpen(name, ref deviceId);
Log.WriteTimestamp(" ", "{0}: {1}", (int)result, result);
return result;
}