pinters to structs etc...

BlitzMax Forums/BlitzMax Programming/pinters to structs etc...

I am returning a pointer to a type:
Type PmDeviceInfo
	Field	structVersion:Int
	Field	interf:Byte Ptr
	Field	name:Byte Ptr
	Field	Input:Int
	Field	output:Int
	Field	opened:Int
EndType


the values I get returned seem ok but I am having trouble accessing the fields interf and name. I use this code to print the returned strings:

Global deviceinfo:PmDeviceInfo = New PmDeviceInfo
MemCopy( Byte Ptr(deviceinfo), Pm_GetDeviceInfo(0), SizeOf(PmDeviceInfo) )
DebugLog "version = " + deviceinfo.structVersion
DebugLog "interf = " + String.FromCstring(Varptr(deviceinfo.interf))
DebugLog "name = " + String.FromCstring(Varptr(deviceinfo.name))


I think the debuglog is trying to print the variable and not the string pointed to by the variable? any suggestions? please.