> For the complete documentation index, see [llms.txt](https://nviasoft.gitbook.io/nviasoft-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nviasoft.gitbook.io/nviasoft-docs/api-reference/item-parsing/gethostsetecid.md).

# GetHostSetECID

### int GetHostSetECID(int lMsgId, ref int ECID, ref string pszNewValue)

Host가 S2F15W메시지를 이용하여 ECID의 ECVALUE를 변경 시도할 때 Host가 변경을 시도하는 ECID와 변경을 원하는 ECVALUE를 읽어 옴.

{% hint style="info" %}
반환값은 함수 수행 후 남아있는 변경요청 수량을 의미합니다.

ReplyHostSetECID와 함께 사용합니다.
{% endhint %}

Parameters

<table data-header-hidden><thead><tr><th width="167" valign="top"></th><th width="141" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Name</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">lMsgId</td><td valign="top">int</td><td valign="top">수신한 메시지의 고유 ID</td></tr><tr><td valign="top">ECID</td><td valign="top">ref int</td><td valign="top">Host가 변경을 원하는 ECID</td></tr><tr><td valign="top">pszNewValue</td><td valign="top">ref string</td><td valign="top">Host가 변경하고자 하는 값(ECVALUE)</td></tr></tbody></table>

Return Value

<table data-header-hidden><thead><tr><th width="159" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Value</td><td valign="top">Description</td></tr><tr><td valign="top">>=0</td><td valign="top">ECID와 ECVALUE 반환 성공</td></tr><tr><td valign="top">&#x3C;0</td><td valign="top">ECID와 ECVALUE 반환 실패, 변경요청이 더 이상 남아있지 않음</td></tr></tbody></table>

```csharp
 public void OnNewHOST_ECID(int lMsgId)
 {
     int nECCount = 0;
     int nECID = 0;
     string strNewValue = "";


     nECCount = 0;
     while (nECCount > -1)
     {
         nECCount = m_gem.GetHostSetECID(lMsgId, ref nECID, ref strNewValue); // HOST에서 전송한 ECID, ECVALUE를 가져옴.

         if (nECCount < 0)
         {
             break;
         }
         AddLog(string.Format("ECID={0},VALUE={1}", nECID, strNewValue));
         m_gem.SetECValue(nECID, strNewValue); //해당 값을 ECID에 저장.
     }


     m_gem.ReplyHostSetECID(lMsgId, 0); // ECID에 대한 응답을 보냄.

 }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nviasoft.gitbook.io/nviasoft-docs/api-reference/item-parsing/gethostsetecid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
