Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit 3c0719b

Browse files
committed
Fix exceptions: cast exception, offset field aligned exception, MI RESUTL INVALID PARAMATER exception
revert filedOffset size
1 parent d8e0e36 commit 3c0719b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Microsoft.Management.Infrastructure/Native/MI_Application.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ internal MI_Result NewDestinationOptions(
132132
out MI_DestinationOptions options
133133
)
134134
{
135-
MI_DestinationOptions optionsLocal = MI_DestinationOptions.NewIndirectPtr();
135+
MI_DestinationOptions optionsLocal = MI_DestinationOptions.NewDirectPtr();
136136
MI_Result resultLocal = this.ft.NewDestinationOptions(this,
137137
optionsLocal);
138138

src/Microsoft.Management.Infrastructure/Options/Internal/CimOperationOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ public void SetCustomOption(string optionName, object optionValue, CimType cimTy
708708
}
709709
this.AssertNotDisposed();
710710

711-
MI_Value nativeLayerValue = ValueHelpers.ConvertToNativeLayer(optionValue);
711+
MI_Value nativeLayerValue = ValueHelpers.ConvertToNativeLayer(optionValue, cimType);
712712
try
713713
{
714714
ValueHelpers.ThrowIfMismatchedType(cimType.FromCimType(), nativeLayerValue);

0 commit comments

Comments
 (0)