I've done it in VB6 and it works fine...
You must use daveReadSZL(PLC.dConn, ID, SLZ_index, buffer(0))...
where PLC.dConn is the pointer to your PLC connection, ID is the SLZ_ID (search on Siemens documentation the list of SZL_ID), SLZ_index what you want to read.....
If you try with ID=0019h (25 dec) you will read LEDS of CPU (SLZ_index = 0 means all):
on buffer you will receive:
0,1,0,0,0,4,1,0,0,5,0,0,0,6,0,0,0,B,0,0,
--|-------|-------|-------|-------|
--|-------|-------|-------|------ B,0 -> BF = 0 -> Led BF off
--|-------|-------|------ 6,0 -> FRCE = 0 -> led FRCE off
--|-------|------ 5,0 -> STOP = 0 -> led STOP off
--|------ 4,1 -> RUN = 0 -> led RUN on
--1,0 -> SF = 0 -> led SF off
bye
BR1