public uint SetDevicePropValue(uint cameraHandle, DevicePropCode propCode, object value) { int size = Marshal.SizeOf(value); IntPtr ptr = Marshal.AllocHGlobal(size); Marshal.StructureToPtr(value, ptr, true); return(PR_SetDevicePropValue(cameraHandle, (ushort)propCode, (uint)size, ptr)); }
public uint SetDevicePropValue(uint cameraHandle, DevicePropCode propCode, object value) { int size = Marshal.SizeOf(value); IntPtr ptr = Marshal.AllocHGlobal(size); Marshal.StructureToPtr(value, ptr, true); return PR_SetDevicePropValue(cameraHandle, (ushort)propCode, (uint)size, ptr); }