Skip to content

Commit

Permalink
Fix Wim.GetErrorString to report correct error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
ied206 committed Oct 13, 2018
1 parent ede0ce0 commit 9c2936c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 0 additions & 2 deletions ManagedWimLib/IterateCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,4 @@ private CallbackStatus NativeCallback(IntPtr entry_ptr, IntPtr user_ctx)
*/
}
#endregion


}
8 changes: 4 additions & 4 deletions ManagedWimLib/ManagedWimLib.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<metadata>
<id>ManagedWimLib</id>
<title>ManagedWimLib</title>
<version>1.1.0</version>
<version>1.1.1</version>
<owners>ied206</owners>
<authors>Eric Biggers, Hajin Jang</authors>
<licenseUrl>https://github.com/ied206/ManagedWimLib/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/ied206/ManagedWimLib</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>C# wrapper library for native wimlib.</description>
<summary>C# wrapper library for native wimlib.</summary>
<releaseNotes>- Update wimlib binaries to 1.13.0-BETA5 from 1.13.0-BETA2</releaseNotes>
<description>C# pinvoke library for wimlib.</description>
<summary>C# pinvoke library for wimlib.</summary>
<releaseNotes>- Fix Wim.GetErrorString() to report correct error message</releaseNotes>
<copyright>Copyright (c) 2018 Hajin Jang</copyright>
<tags>wimlib</tags>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion ManagedWimLib/ManagedWimLib.targets
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'@(WimLibInteropFiles)' != ''">
<None Include="@(WimLibInteropFiles)">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions ManagedWimLib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ManagedWimLib")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyCopyright("Copyright © Hajin Jang")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
2 changes: 1 addition & 1 deletion ManagedWimLib/WimStruct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public static string GetErrorString(ErrorCode code)
if (!NativeMethods.Loaded)
throw new InvalidOperationException(NativeMethods.MsgInitFirstError);

IntPtr ptr = NativeMethods.GetErrorString(ErrorCode.INVALID_IMAGE);
IntPtr ptr = NativeMethods.GetErrorString(code);
return Marshal.PtrToStringUni(ptr);
}

Expand Down
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Initialization

ManagedWimLib requires binary of wimlib to work.<br>
ManagedWimLib requires binary of wimlib to work.
Internally it is done by loading functions dynamically (using `LoadLibrary` and `GetProcAddress`).

`Wim.GlobalInit()` should be explicitly called before using `ManagedWimLib`.
Expand All @@ -20,7 +20,7 @@ else // This app is running on 32bit .Net Framework

### Embedded precompiled binary

ManagedWimLib comes with `libwim-15.dll`, precompiled binaries of `wimlib 1.13.0-BETA5`.<br>
ManagedWimLib comes with `libwim-15.dll`, precompiled binaries of `wimlib 1.13.0-BETA5`.
They will be copied into `$(OutDir)\x86\libwim-15.dll` and `$(OutDir)\x64\libwim-15.dll` automatically at build.

### Custom binary
Expand Down

0 comments on commit 9c2936c

Please sign in to comment.