How to read VB's udt files?
How to read VB's udt files?
In VB you can write a whole UDT into a file. Have anybody have experience in reading the udt files in purebasic?
			
			
									
									
						This doesn't work for Strings! Only the useless Pointer is written  
			
			
									
									PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

						Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

You can use FixStrings for that
			
			
									
									Code: Select all
Structure test
  text.s{255}
EndStructure
test.test
test\text = "Holla, purebasic rulez"
File = CreateFile(#PB_Any, "C:\test.dat")
If File
  WriteData(File, @test, SizeOf(test))
  CloseFile(File)
EndIfPureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

						Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Is more the answer to that:
			
			
									
									I haven't VB to test itKarLKoX wrote:UDT PB equivalent is the Structure, whatever language you use, writing structure is always done this way
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

						Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.



