Won't Compile in VS 2010

This code works in VS2008 but I can't get it to work in VS2010 Win 7. Any help appreciated. Thanks. I'm getting this error: Error C2039: '_InitNetworkAddressControl' : is not a member of 'CShellWrapper'

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "stdafx.h"
#include "afxwin.h"
#include <wtsapi32.h>
#include <iostream>
#include <iphlpapi.h>

#pragma comment(lib,"wtsapi32.lib")
 
using namespace std;
 
int main()
{
        DWORD pCount = 0; 
	PWTS_PROCESS_INFO ppProcessInfo,pProcess;
	WTSEnumerateProcesses(WTS_CURRENT_SERVER_HANDLE,0,1,&ppProcessInfo,&pCount);
	pProcess = ppProcessInfo;
        CString internet = "iexplore.exe";
 
	for(int i = 0; i < int(pCount); i++)
	{
		pProcess->pProcessName;
		if (internet.CompareNoCase ( pProcess->pProcessName) == 0)
		{
			cout<< "iexplore running";
		}
		pProcess++;
	}
}
Topic archived. No new replies allowed.