# ReplyProcProgram

### int ReplyProcProgram(int lMsgId, int nACK, string sErrText)

레시피(Process Program) 관련 메시지 수신 후, 그 결과에 대한 응답 메시지(S7F4)를 생성하여 호스트로 전송합니다. 성공 여부를 나타내는 승인 코드(`nACK`)와 상세 에러 메시지를 함께 보낼 수 있습니다.

Parameters

<table data-header-hidden><thead><tr><th width="157"></th><th width="138"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>lMsgId</td><td>int</td><td>응답을 보낼 대상 원본 메시지의 고유 ID</td></tr><tr><td>nACK</td><td>int</td><td>승인 결과 코드 (보통 0: 성공/수락, 그 외: 에러 코드)</td></tr><tr><td>sErrText</td><td>string</td><td>에러 발생 시 호스트에 전달할 상세 내용 (성공 시 빈 문자열)</td></tr></tbody></table>

```csharp
private void HostSentPPBody(int lMsgId) // S7F3 or S21F3 PPBODY를 받음
{
    int nCount = 0, nRet = 0, ACK = 0;
    ulong nFileSize = 0;
    string sPPID = "", sFilePath = "";
    string[] arrPPID = { };
    // 필요한 정보를 읽어옴. PPID, 파일크기, 임시로 저장된 경로
    nRet = m_gem.GetProcProgramFile(lMsgId, ref sPPID, ref sFilePath, ref nFileSize);
    
    // 응답을 내보냄
    // NACK처리할때는 ACK값을 0보다 큰값. (CODE는 스펙참고)
    ACK = 1;
    nRet = m_gem.ReplyProcProgram(lMsgId, ACK, "");
}
```


---

# 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/undefined-3/replyprocprogram.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.
