38.9.4.15 Searches for definition information about symbol, group, symbol sheet

Searches for the definition information, such as the data format and data size, of the defined device symbol, group symbol, or symbol sheet.

Function Name

INT WINAPI GetSymbolInformation(LPCSTR sNodeName,LPCSTR sSymbolName,INT iMaxCountOfSymbolMember,LPSTR osSymbolSheetName,SymbolInformation* oSymbolInformation,INT* oiGotCountOfSymbolMember);

Argument

sNodeName: The station name is fixed as #WinGP.

sSymbolName: (In) Symbol, group name, sheet name

iMaxCountOfSymbolMember: (In) Define the maximum value (1 or more) for the search information. Defines the quantity in oSymbolInformation.

osSymbolSheetName: (Out) Returns the symbol sheet name belonging to sSymbolName. Please prepare a workspace of 66 bytes or more.

oSymbolInformation: (Out) Returns detailed information as an array.
Please prepare the quantity defined in iMaxCountOfSymbolMember for the workspace.

oiGotCountOfSymbolMember: (Out) Returns the information number actually returned to oSymbolInformation.

Return value (NULL)

Normal End: 0

Problem: Error code

Special Item

struct SymbolInformation
{
WORD m_wAppKind;// Data Type - When symbol 1 to 12, when Group 0x8000.
WORD m_wDataCount; // Number of data.
DWORD m_dwSizeOf; // Buffer number of bytes required only for access.
char m_sSymbolName[64+1];// Symbol or group name.
char m_bDummy1[3];// Reserved.
char m_sDeviceAddress[256+1]; // Device address (empty for group).
char m_bDummy2[3];// Reserved.
};

Information found in oSymbolInformation is returned as a SymbolInformation array when group, sheet, or symbol is set in the first setting.

In the second setting and onward, when sSymbolName is a group, sets the group members.

When sSymbolName is sheet, the entire sheet information is set.

When sSymbolName is symbol, there are no settings after the first.

When the object symbol is bit offset symbol, be careful about the following points.

(1) When bit offset symbol is used to directly specify the original symbol information (when sSymbolName is directly specified as bit offset symbol), in oSymbolInformation's first SymbolInformation field m_dwSizeOf, a byte count of 2 is set for accessing the bit symbol.
Because the original information is one symbol, there can be only one oSymbolInformation.

(2) Define the original information as group symbol, and when the group includes a bit offset symbol, the m_dwSizeOf property of the second oSymbolInformation and later is set to zero, because it defines the access size for group access of members.