mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
Fix some build warnings.
This commit is contained in:
@@ -240,6 +240,7 @@ namespace NTwain.Data
|
||||
/// Set our value...
|
||||
/// </summary>
|
||||
/// <param name="a_sz"></param>
|
||||
/// <param name="a_blMayHavePrefix"></param>
|
||||
private void SetValue(string a_sz, bool a_blMayHavePrefix)
|
||||
{
|
||||
// If we're running on a Mac, tack on the prefix 'byte'...
|
||||
@@ -415,6 +416,7 @@ namespace NTwain.Data
|
||||
/// Set our value...
|
||||
/// </summary>
|
||||
/// <param name="a_sz"></param>
|
||||
/// <param name="a_blMayHavePrefix"></param>
|
||||
private void SetValue(string a_sz, bool a_blMayHavePrefix)
|
||||
{
|
||||
// If we're running on a Mac, tack on the prefix 'byte'...
|
||||
@@ -629,6 +631,7 @@ namespace NTwain.Data
|
||||
/// Set our value...
|
||||
/// </summary>
|
||||
/// <param name="a_sz"></param>
|
||||
/// <param name="a_blMayHavePrefix"></param>
|
||||
private void SetValue(string a_sz, bool a_blMayHavePrefix)
|
||||
{
|
||||
// If we're running on a Mac, tack on the prefix 'byte'...
|
||||
@@ -923,6 +926,7 @@ namespace NTwain.Data
|
||||
/// Set our value...
|
||||
/// </summary>
|
||||
/// <param name="a_sz"></param>
|
||||
/// <param name="a_blMayHavePrefix"></param>
|
||||
private void SetValue(string a_sz, bool a_blMayHavePrefix)
|
||||
{
|
||||
// If we're running on a Mac, tack on the prefix 'byte'...
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace NTwain.Data
|
||||
/// <summary>
|
||||
/// Reads pointer as UTF8 string.
|
||||
/// </summary>
|
||||
/// <param name="memMgr"></param>
|
||||
/// <param name="data">Pointer to string.</param>
|
||||
/// <param name="length">Number of bytes to read.</param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace NTwain
|
||||
/// Initializes a new instance of the <see cref="TransferErrorEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="code">The code.</param>
|
||||
/// <param name="status">Additional status info from TWAIN.</param>
|
||||
/// <param name="info">Additional status info from TWAIN.</param>
|
||||
public TransferErrorEventArgs(STS code, string? info)
|
||||
{
|
||||
Code = code;
|
||||
|
||||
@@ -8,11 +8,6 @@ namespace NTwain.Triplets.ControlDATs
|
||||
/// </summary>
|
||||
public class DeviceEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the device event detail.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC Get(ref TW_IDENTITY_LEGACY app, ref TW_IDENTITY_LEGACY ds, out TW_DEVICEEVENT data)
|
||||
{
|
||||
data = default;
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace NTwain.Triplets.ControlDATs
|
||||
/// Opens the TWAIN data source selector dialog
|
||||
/// to choose the default data source.
|
||||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <param name="ds"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC UserSelect(ref TW_IDENTITY_LEGACY app, out TW_IDENTITY_LEGACY ds)
|
||||
{
|
||||
@@ -35,6 +37,7 @@ namespace NTwain.Triplets.ControlDATs
|
||||
/// <summary>
|
||||
/// Sets the default data source.
|
||||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <param name="ds"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC Set(ref TW_IDENTITY_LEGACY app, ref TW_IDENTITY_LEGACY ds)
|
||||
@@ -44,6 +47,7 @@ namespace NTwain.Triplets.ControlDATs
|
||||
/// Gets the first available data source in an enumerating fashion
|
||||
/// (use <see cref="GetNext"/> for subsequent ones).
|
||||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <param name="ds"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC GetFirst(ref TW_IDENTITY_LEGACY app, out TW_IDENTITY_LEGACY ds)
|
||||
@@ -54,8 +58,9 @@ namespace NTwain.Triplets.ControlDATs
|
||||
|
||||
/// <summary>
|
||||
/// Gets the next available data source in an enumerating fashion (after using <see cref="GetFirst"/>).
|
||||
/// Ends when return values is <see cref="STS.ENDOFLIST"/>.
|
||||
/// Ends when return values is <see cref="TWRC.ENDOFLIST"/>.
|
||||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <param name="ds"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC GetNext(ref TW_IDENTITY_LEGACY app, out TW_IDENTITY_LEGACY ds)
|
||||
|
||||
@@ -9,11 +9,6 @@ namespace NTwain.Triplets.ControlDATs
|
||||
/// </summary>
|
||||
public class Status
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current status for the DSM.
|
||||
/// </summary>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC GetForDSM(ref TW_IDENTITY_LEGACY app, out TW_STATUS status)
|
||||
{
|
||||
status = default;
|
||||
@@ -44,11 +39,6 @@ namespace NTwain.Triplets.ControlDATs
|
||||
return rc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status for the current source.
|
||||
/// </summary>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC GetForDS(ref TW_IDENTITY_LEGACY app, ref TW_IDENTITY_LEGACY ds, out TW_STATUS status)
|
||||
{
|
||||
status = default;
|
||||
|
||||
@@ -11,10 +11,11 @@ namespace NTwain.Triplets.ControlDATs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the extended text info for a previously received <see cref="TW_STATUS"/>.
|
||||
/// If this is called you should try to extract the string value from it once
|
||||
/// with <see cref="TW_STATUSUTF8.ReadAndFree"/> or call <see cref="TW_STATUSUTF8.Free"/>
|
||||
/// If this is called you should try to extract the string value from it
|
||||
/// with <see cref="TW_STATUSUTF8.Read(IMemoryManager, bool)"/> or call <see cref="TW_STATUSUTF8.Free"/>
|
||||
/// so there's no memory leak.
|
||||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <param name="extendedStatus"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -8,22 +8,12 @@ namespace NTwain.Triplets.ControlDATs
|
||||
/// </summary>
|
||||
public class XferGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the transfer group used.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC Get(ref TW_IDENTITY_LEGACY app, ref TW_IDENTITY_LEGACY ds, out DG data)
|
||||
{
|
||||
data = default;
|
||||
return DoIt(ref app, ref ds, MSG.GET, ref data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the transfer group to be used.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public TWRC Set(ref TW_IDENTITY_LEGACY app, ref TW_IDENTITY_LEGACY ds, DG data)
|
||||
{
|
||||
return DoIt(ref app, ref ds, MSG.SET, ref data);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using NTwain.Triplets.AudioDATs;
|
||||
using NTwain.Data;
|
||||
using NTwain.Triplets.AudioDATs;
|
||||
|
||||
namespace NTwain.Triplets
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using NTwain.Triplets.ControlDATs;
|
||||
using NTwain.Data;
|
||||
using NTwain.Triplets.ControlDATs;
|
||||
|
||||
namespace NTwain.Triplets
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace NTwain
|
||||
/// Gets a CAP's help text (description).
|
||||
/// </summary>
|
||||
/// <param name="cap"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="help"></param>
|
||||
/// <returns></returns>
|
||||
public STS GetCapHelp(CAP cap, out string? help)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace NTwain
|
||||
/// Gets a CAP's text name label.
|
||||
/// </summary>
|
||||
/// <param name="cap"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <returns></returns>
|
||||
public STS GetCapLabel(CAP cap, out string? label)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ namespace NTwain
|
||||
/// Gets a CAP's value label texts.
|
||||
/// </summary>
|
||||
/// <param name="cap"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="labels"></param>
|
||||
/// <returns></returns>
|
||||
public STS GetCapLabelEnum(CAP cap, out string[]? labels)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ namespace NTwain
|
||||
/// <summary>
|
||||
/// Sets a CAP's current value.
|
||||
/// </summary>
|
||||
/// <param name="cap"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public STS SetCap(ref TW_CAPABILITY value)
|
||||
{
|
||||
@@ -139,7 +139,7 @@ namespace NTwain
|
||||
/// <summary>
|
||||
/// Sets a CAP's constraint values.
|
||||
/// </summary>
|
||||
/// <param name="cap"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public STS SetConstraint(ref TW_CAPABILITY value)
|
||||
{
|
||||
|
||||
@@ -110,7 +110,9 @@ namespace NTwain
|
||||
{
|
||||
IsBackground = true
|
||||
};
|
||||
#if WINDOWS || NETFRAMEWORK
|
||||
t.SetApartmentState(ApartmentState.STA); // just in case
|
||||
#endif
|
||||
t.Start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user