aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/winproc.h2
-rw-r--r--src/util/win.cc12
2 files changed, 9 insertions, 5 deletions
diff --git a/src/include/winproc.h b/src/include/winproc.h
index a42418141..c036ba965 100644
--- a/src/include/winproc.h
+++ b/src/include/winproc.h
@@ -200,7 +200,7 @@ extern "C"
200 BOOL DereferenceShortcut (char *pszShortcut); 200 BOOL DereferenceShortcut (char *pszShortcut);
201 long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey, 201 long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey,
202 char *pszBuffer, long *pdLength); 202 char *pszBuffer, long *pdLength);
203 int ListNICs (void (*callback) (const char *, int, void *), void *cls); 203 int ListNICs (void (*callback) (void *, const char *, int), void *cls);
204 BOOL AddPathAccessRights (char *lpszFileName, char *lpszAccountName, 204 BOOL AddPathAccessRights (char *lpszFileName, char *lpszAccountName,
205 DWORD dwAccessMask); 205 DWORD dwAccessMask);
206 char *winErrorStr (const char *prefix, int dwErr); 206 char *winErrorStr (const char *prefix, int dwErr);
diff --git a/src/util/win.cc b/src/util/win.cc
index 8a168d238..df5f686b3 100644
--- a/src/util/win.cc
+++ b/src/util/win.cc
@@ -103,9 +103,11 @@ void EnumNICs(PMIB_IFTABLE *pIfTable, PMIB_IPADDRTABLE *pAddrTable)
103/** 103/**
104 * Lists all network interfaces in a combo box 104 * Lists all network interfaces in a combo box
105 * Used by the basic GTK configurator 105 * Used by the basic GTK configurator
106 * @param callback 106 *
107 * @param callback function to call for each NIC
108 * @param callback_cls closure for callback
107 */ 109 */
108 int ListNICs(void (*callback) (const char *, int, void *), void * cls) 110 int ListNICs(void (*callback) (void *, const char *, int), void * callback_cls)
109{ 111{
110 PMIB_IFTABLE pTable; 112 PMIB_IFTABLE pTable;
111 PMIB_IPADDRTABLE pAddrTable; 113 PMIB_IPADDRTABLE pAddrTable;
@@ -201,7 +203,9 @@ void EnumNICs(PMIB_IFTABLE *pIfTable, PMIB_IPADDRTABLE *pAddrTable)
201 if (pszIfName) 203 if (pszIfName)
202 free(pszIfName); 204 free(pszIfName);
203 205
204 callback(szEntry, pAddrTable->table[dwIfIdx].dwIndex == dwExternalNIC, cls); 206 callback(callback_cls,
207 szEntry,
208 pAddrTable->table[dwIfIdx].dwIndex == dwExternalNIC);
205 } 209 }
206 } 210 }
207 GlobalFree(pAddrTable); 211 GlobalFree(pAddrTable);
@@ -513,7 +517,7 @@ int CreateServiceAccount(char *pszName, char *pszDesc)
513 * @brief Grant permission to a file 517 * @brief Grant permission to a file
514 * @param lpszFileName the name of the file or directory 518 * @param lpszFileName the name of the file or directory
515 * @param lpszAccountName the user account 519 * @param lpszAccountName the user account
516 * @param the desired access (e.g. GENERIC_ALL) 520 * @param dwAccessMask the desired access (e.g. GENERIC_ALL)
517 * @return TRUE on success 521 * @return TRUE on success
518 * @remark based on http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q102102& 522 * @remark based on http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q102102&
519 */ 523 */