Hey guys first post here, I'll try to follow the forum standards.
So here is the thing, I'm in to PLC programming and as part of the whole deal I have to get familiar with C which is mainly used to create a more advanced and custom interface for HMI programs.
While poking around some code I got stuck at this part here highlighted.
don't worry about the header and those wierd names in it, I woud just like to know the part where it says &lpszPictureName[i+] I looked everywhere on the internet and I could not find a single thing about this wierd code (at least for me it is) it seems like a mix of pointers with pointers?¿
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
#pragma code ("UseAdmin.DLL")
#pragma code ()
int i, j, n;
n = strlen( lpszPictureName );
for ( i = n; i > 0; i-- )
if ( lpszPictureName[i] == '.' )
strncpy( pic_name, lpszPictureName, i );
strcpy( obj_name, &lpszPictureName[i+1] );
for ( j = 0; j < (n-i); j++)
if ( obj_name[j] == ':' )
obj_name[j] = '\0';
I got at least the purpuse of the code by looking at it, this code is used to call pictures (HMI screens for industrial process control) and those pictures have .PDL extention so it would extract the NameOfThePicture without the .PDL extention I think and the last part would set it to Invisible ( highlighted in blue).
Last but not least, I thank you all in advance.