-
March 26th, 2010, 12:19 PM
#1
NetStatisticsGet fails in Windows 7
We have been having trouble with a program running on Windows 7 and we have traced it to this code.
Code:
CT2W szwService(SERVICE_WORKSTATION);
#if (_MSC_VER == 1500)
// XXXX The following weirdness is because Microsoft forgot that
// The signature for NetStatisticsGet should *always* be unicode!
LPTSTR szService = (LPTSTR)(LPWSTR)szwService;
#else
LPWSTR szService(szwService);
#endif
STAT_WORKSTATION_0 *pStatistics;
if (::NetStatisticsGet(NULL, szService, 0, 0, (LPBYTE*)&pStatistics) != NERR_Success)
...
The call to NetStatisticsGet returns NERR_Success on Windows XP (both 32 and 64 bits) but on Windows 7 (64-bit) it returns 0xC000000D (STATUS_INVALID_PARAMETER). Has anyone got an idea what to do next?
-
April 3rd, 2010, 09:43 AM
#2
Re: NetStatisticsGet fails in Windows 7
Most promising way is to find out which parameter is invalid.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|