LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting data out of a pointer created with DSNewPtr

Solved!
Go to solution

I believe I'm doing this right, but I am having trouble getting data out of a pointer. I can't post the code but I'll post what I can:
The following is a structure that i'm trying to get data from. It's 106 bytes. 

typedef struct {
  char name[64];
  char serial[32];
  uint64_t address;
  int16_t rssi;
} BluetoothDeviceDiscoveryInfo;

 

My function DiscoverPeripherals expects a pointer to this structure because it returns an array of BluetoothDeviceDiscoveryInfo.

 

Here is the calling convention:

int BluetoothDiscovery_DiscoverPeripherals(
    BluetoothDiscoveryHandle handle, int seconds,
    BluetoothDeviceDiscoveryInfo *outBuffer, int maxCount, int *outFoundCount);

 

I know it's executing because it's returning a value for outFoundCount. But I am trying to get data out of the outBuffer variable without any luck.

GregFreeman_0-1769117428285.png

Right now the dst array is just a bunch of 0's. So it seems my function is executing successfully but my pointer is either not populated correctly or I'm using moveblock incorrectly (yes i know i need to free my pointer).

 

Does anything jump out as being obviously incorrect?

 

0 Kudos
Message 1 of 2
(194 Views)
Solution
Accepted by topic author GregFreeman

Disregard...when i looked closer i was getting data back i was just seeing a bunch of the padding on the strings...

Message 2 of 2
(176 Views)