supremainc / BioStar2_device_SDK

35 stars 25 forks source link

using BS2_ConnectDeviceViaIP with Intptr type of IPAddress #21

Open georgealbert2001 opened 2 years ago

georgealbert2001 commented 2 years ago

i am using SDK for BioStar 2 v 2.8 and i am trying to connect to the BioLite 2 Machine via IP address and Port but facing a problem adding my IPAddress of type IntPtr ,i used to declare the IP to string type !!! below is the signature of the function , extern public static int BS2_ConnectDeviceViaIP(IntPtr context, IntPtr deviceAddress, UInt16 devicePort, out UInt32 deviceId); thanks in advance

JBoerrigter commented 2 years ago

In C# you can use something like this: IntPtr someName = Marshal.StringToHGlobalAnsi("xxx.xxx.xxx.xxx")