Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#7: VMWareTasks.proj's vixcom target needs to be updated to use Visual Studio 2005's tlbimp.exe #8

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
1.8 (TBD)
---------

*Misc*

* #7: VMWareTasks.proj's vixcom target needs to be updated to use Visual Studio 2005's tlbimp.exe - [@icnocop](https://github.com/icnocop)

1.7 (8/24/2012)
---------------

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In order to use the library you must install the following VMWare software.
Getting Started (C#)
--------------------

Download the latest version of this library [here](https://github.com/downloads/dblock/vmwaretasks/). Add a reference to `Vestris.VMWareLib.dll` to your project and a `using`.
Download the latest version of this library [here](http://code.dblock.org/downloads/vmwaretasks/VMWareTasks-1.7.zip). Add a reference to `Vestris.VMWareLib.dll` to your project and a `using`.

``` csharp
using Vestris.VMWareLib;
Expand Down
94 changes: 47 additions & 47 deletions Source/VMWareLib/VMWareException.cs
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
using System;
using System.Collections.Generic;
using System.Text;
using Interop.VixCOM;
namespace Vestris.VMWareLib
{
/// <summary>
/// A VMWare exception. Every VMWare operational failure is translated into
/// a <see cref="Vestris.VMWareLib.VMWareException" />.
/// </summary>
public class VMWareException : Exception
{
private ulong _errorCode = 0;
/// <summary>
/// The original VMWare error code.
/// </summary>
public ulong ErrorCode
{
get
{
return _errorCode;
}
}
/// <summary>
/// A VMWare exception with default error text in English-US.
/// </summary>
/// <param name="code">VMWare VixCOM.Constants error code.</param>
public VMWareException(ulong code)
: this(code, new VixLib().GetErrorText(code, "en-US"))
{
}
/// <summary>
/// A VMWare exception.
/// </summary>
/// <param name="code">VMWare VixCOM.Constants error code.</param>
/// <param name="message">Error description.</param>
public VMWareException(ulong code, string message)
: base(message)
{
_errorCode = code;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Interop.VixCOM;

namespace Vestris.VMWareLib
{
/// <summary>
/// A VMWare exception. Every VMWare operational failure is translated into
/// a <see cref="Vestris.VMWareLib.VMWareException" />.
/// </summary>
public class VMWareException : Exception
{
private ulong _errorCode = 0;

/// <summary>
/// The original VMWare error code.
/// </summary>
public ulong ErrorCode
{
get
{
return _errorCode;
}
}

/// <summary>
/// A VMWare exception with default error text in English-US.
/// </summary>
/// <param name="code">VMWare VixCOM.Constants error code.</param>
public VMWareException(ulong code)
: this(code, new VixLib().GetErrorText(code, "en-US"))
{
}

/// <summary>
/// A VMWare exception.
/// </summary>
/// <param name="code">VMWare VixCOM.Constants error code.</param>
/// <param name="message">Error description.</param>
public VMWareException(ulong code, string message)
: base(message)
{
_errorCode = code;
}
}
}
2 changes: 1 addition & 1 deletion VMWareTasks.proj
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@
</Target>
<Target Name="vixcom">
<Message Text="Importing VixCOM Type Library ..." />
<Exec Command="tlbimp.exe &quot;$(ProgramFiles)\VMWare\VMWare VIX\VixCOM.dll&quot; /keyfile:master.snk /out:Source\Interop.VixCOM\Interop.VixCOM.dll" />
<Exec Command="&quot;$(ProgramFiles)\Microsoft SDKs\Windows\v7.0A\Bin\TlbImp.exe&quot; &quot;$(ProgramFiles)\VMWare\VMWare VIX\VixCOM.dll&quot; /keyfile:master.snk /out:Source\Interop.VixCOM\Interop.VixCOM.dll" />
</Target>
</Project>