[pywin32-checkins] pywin32/win32/src/win32net win32net.h,1.4,1.5 win32netmisc.cpp,1.10,1.11 win32net
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-07-29 01:33:20
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19483/win32net Modified Files: win32net.h win32netmisc.cpp win32netmodule.cpp Log Message: Allow things to build on VC6 without a platform SDK installed. Index: win32netmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmodule.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** win32netmodule.cpp 8 Jun 2005 01:34:25 -0000 1.19 --- win32netmodule.cpp 29 Jul 2005 01:33:08 -0000 1.20 *************** *** 39,43 **** --- 39,45 ---- #include "assert.h" + #if WINVER >= 0x0500 NetGetJoinInformationfunc pfnNetGetJoinInformation=NULL; + #endif /*****************************************************************************/ *************** *** 942,945 **** --- 944,949 ---- } + #if WINVER >= 0x0500 + // @pymethod <o PyUnicode>, int|win32net|NetGetJoinInformation|Retrieves join status information for the specified computer. static PyObject *PyNetGetJoinInformation(PyObject *self, PyObject *args) *************** *** 972,975 **** --- 976,981 ---- return ret; } + #endif // WINVER + /************************************************************************************************************* ** *************** *** 1046,1050 **** --- 1052,1058 ---- // @module win32net|A module encapsulating the Windows Network API. static struct PyMethodDef win32net_functions[] = { + #if WINVER >= 0x0500 {"NetGetJoinInformation", PyNetGetJoinInformation, 1}, // @pymeth NetGetJoinInformation|Retrieves join status information for the specified computer. + #endif {"NetGroupGetInfo", PyNetGroupGetInfo, 1}, // @pymeth NetGroupGetInfo|Retrieves information about a particular group on a server. {"NetGroupGetUsers", PyNetGroupGetUsers, 1}, // @pymeth NetGroupGetUsers|Enumerates the users in a group. *************** *** 1118,1122 **** --- 1126,1132 ---- {"NetFileGetInfo", PyNetFileGetInfo, 1}, // @pymeth NetFileGetInfo|Get info about files open on the server. {"NetStatisticsGet", PyNetStatisticsGet, 1}, // @pymeth NetStatisticsGet|Return server or workstation stats + #if WINVER >= 0x0500 {"NetValidateName", PyNetValidateName, 1}, // @pymeth NetValidateName|Verify that computer/domain name is valid for given context + #endif {NULL, NULL} }; *************** *** 1151,1154 **** --- 1161,1165 ---- HMODULE hmodule=GetModuleHandle(_T("netapi32")); + #if WINVER >= 0x0500 if (hmodule==NULL) hmodule=LoadLibrary(_T("netapi32")); *************** *** 1157,1159 **** --- 1168,1171 ---- pfnNetGetJoinInformation=(NetGetJoinInformationfunc)GetProcAddress(hmodule,"NetGetJoinInformation"); } + #endif } Index: win32net.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32net.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32net.h 8 Jun 2005 01:34:24 -0000 1.4 --- win32net.h 29 Jul 2005 01:33:08 -0000 1.5 *************** *** 61,64 **** --- 61,65 ---- PyObject *PyDoGroupDelMembers(PyObject *self, PyObject *args); + #if WINVER >= 0x0500 typedef NET_API_STATUS (NET_API_FUNCTION *NetValidateNamefunc)(LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, NETSETUP_NAME_TYPE); extern NetValidateNamefunc pfnNetValidateName; *************** *** 66,67 **** --- 67,69 ---- typedef NET_API_STATUS (NET_API_FUNCTION *NetGetJoinInformationfunc)(LPCWSTR, LPWSTR *, PNETSETUP_JOIN_STATUS); extern NetGetJoinInformationfunc pfnNetGetJoinInformation; + #endif // WINVER Index: win32netmisc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmisc.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** win32netmisc.cpp 12 Jan 2005 07:38:20 -0000 1.10 --- win32netmisc.cpp 29 Jul 2005 01:33:08 -0000 1.11 *************** *** 1270,1273 **** --- 1270,1275 ---- } + #if WINVER >= 0x0500 + extern "C" NetValidateNamefunc pfnNetValidateName=NULL; // @pymethod |win32net|NetValidateName|Checks that domain/machine/workgroup name is valid for given context *************** *** 1313,1314 **** --- 1315,1317 ---- return ret; } + #endif // WINVER |