From: Christian Grothoff Date: Sat, 10 Oct 2009 20:12:08 +0000 (+0000) Subject: document params properly: X-Git-Tag: initial-import-from-subversion-38251~23361 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f868a9954ae9d04784c1c0075373f3f27d841150;p=oweals%2Fgnunet.git document params properly: --- 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" BOOL DereferenceShortcut (char *pszShortcut); long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey, char *pszBuffer, long *pdLength); - int ListNICs (void (*callback) (const char *, int, void *), void *cls); + int ListNICs (void (*callback) (void *, const char *, int), void *cls); BOOL AddPathAccessRights (char *lpszFileName, char *lpszAccountName, DWORD dwAccessMask); 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) /** * Lists all network interfaces in a combo box * Used by the basic GTK configurator - * @param callback + * + * @param callback function to call for each NIC + * @param callback_cls closure for callback */ - int ListNICs(void (*callback) (const char *, int, void *), void * cls) + int ListNICs(void (*callback) (void *, const char *, int), void * callback_cls) { PMIB_IFTABLE pTable; PMIB_IPADDRTABLE pAddrTable; @@ -201,7 +203,9 @@ void EnumNICs(PMIB_IFTABLE *pIfTable, PMIB_IPADDRTABLE *pAddrTable) if (pszIfName) free(pszIfName); - callback(szEntry, pAddrTable->table[dwIfIdx].dwIndex == dwExternalNIC, cls); + callback(callback_cls, + szEntry, + pAddrTable->table[dwIfIdx].dwIndex == dwExternalNIC); } } GlobalFree(pAddrTable); @@ -513,7 +517,7 @@ int CreateServiceAccount(char *pszName, char *pszDesc) * @brief Grant permission to a file * @param lpszFileName the name of the file or directory * @param lpszAccountName the user account - * @param the desired access (e.g. GENERIC_ALL) + * @param dwAccessMask the desired access (e.g. GENERIC_ALL) * @return TRUE on success * @remark based on http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q102102& */