Windows服務打造(四)

2021-08-15 12:25:30 字數 843 閱讀 2231

1。queryserviceconfig函式中沒有服務的描述資訊,得呼叫它的擴充套件函式queryserviceconfig2,用以獲取服務的描述資訊;

msdn如下:

bool winapi queryserviceconfig2(

__in sc_handle hservice

, __in dword dwinfolevel

, __out lpbyte lpbuffer

, __in dword cbbufsize

, __out lpdword pcbbytesneeded

);

輸出lpbyte型別資訊;

2。cservitem節點中新增成員cstring m_strdescription;表示描述資訊;

自定義函式cstring getservdescription(lpctstr lpszservname);封裝queryserviceconfig獲取字串描述資訊;

3。在自定義的enumservlist函式中呼叫getservdescription遍歷服務節點如下:

pservnext->m_strdescription = getservdescription(pservnext->m_strservname);

4。view檢視中新增報表:

getlistctrl().setitemtext(idx, 4, m_pheader->m_strdescription);

5。執行程式:

打造自己的Windows終端服務客戶端

打造自己的windows終端服務客戶端 2006 12 02 08 40 1.首先確保你的機器上存在mstscax.dll,如果沒有這個檔案,可以從http download.microsoft.com download whistler tools 1.0 wxp en us msrdpcli.e...

windows下git打造linux命令

在git中開啟應用程式,例如我想在git中輸入sub開啟sublime。d program files git usr bin在上面那個資料夾裡面建立sub檔案,輸入 試一試在git bash中輸入sub是不是就開啟sublime了?我的是可以的,注意你自己的安裝位置。檔案位置 c users ad...

Tomcat CGI 輕鬆打造 Web 服務

執行環境 步驟 安裝 jdk 1.8,python 步驟二 將 tomcat 壓縮包解壓到適當的位置,例如 yourpath apache tomcat 9.0.1 步驟三 設定環境變數 vim bash profile 將 tomcat 的 bin 目錄新增到 path 步驟四 首次啟動 tomc...