Quantcast
Channel: Remote Desktop Services (Terminal Services) forum
Viewing all articles
Browse latest Browse all 1106

C++ code to print IADsTSUserEx properties

$
0
0

Hi,

I am trying to write a c++ code to print the Terminal services properties. I have added TSUserex.h but even then I get an error saying get_EnableRemoteControl identifier not found. Are there any references available for help?

My code:

        IADs *pObject;
	HRESULT hr;
	IADsTSUserEx *pTSUser = NULL; 
        Variant var;      
        LPWSTR pszAttrs[] = { L"EnableRemoteControl" };
	DWORD dwNumber = sizeof( pszAttrs ) /sizeof(LPWSTR);

	hr = ADsBuildVarArrayStr( pszAttrs, dwNumber, &var );
	hr = pObject->GetInfoEx(var, 0);
	LONG *pVal;
	hr = get_EnableRemoteControl(&pVal);


Viewing all articles
Browse latest Browse all 1106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>