Are you using GetEx() to get the "memberOf" groups? in my code I call:
hr = objObject->GetEx(L"memberOf", &var);
if(!SUCCEEDED(hr))
{
hr = objObject->Get(L"memberOf", &var); //GetEx might not work for just one group
}
then I convert var to a SAFEARRAY and print all of the values
if(col.dwADsType == ADSTYPE_DN_STRING)
{
sprintf(tOP, "%S\n", col.pADsValues->CaseIgnoreString);
WriteMessageChar(tOP);
}
you might want to handle CaseExactString, CaseIgnoreString and DNString seperatly. The code above didn't work for me until I changed the print to use...
// Search for all objects with the 'cn' property that start with c.
hr = pDSSearch->ExecuteSearch(L"(&(objectClass=user)(objectCategory=person)(sAMAccountName=jjknack))",
pszAttr ,dwAttrNameSize,&hSearch );
I'm guessing that the comment isn't right? That query will return the...
when you preview your post checkout the code tags at the bottom of the "editing tips" section. I can't seem to figure out how to print the tag literals in my post, sorry.
my bad, I can't compile code on my internet box, so I can't run your code. The prototype was right:
void mult(double *fr_array2)
but you need to pass the array like this:
mult(&fr_array2);
I think in your mult prototype you need to pass by reference:
void mult(double &fr_array2)
otherwise you are just copying the global fr_array2 array to the local array fr_array2, modifying the local fr_array2, and then printing the elements of the unchanged global fr_array2. Note that...
I need help using the Get() function from IWbemClassObject. I've used this function before to return single values, but the problem I'm having is I can't seem to figure out how to handle multi-valued results. My query looks like this:
hr = objWMIService->ExecQuery(L"WQL", L"Select * From...
Ok, then somebody explain the c++ example given here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiodirectoryclasstopic.asp
I think what is messing me up is this http://weblogs.asp.net/kennykerr/archive/2004/07/21/190070.aspx
Also, when I try System:: it still says System isn't a namespace.
I'm trying to use the Directory class to do some enumeration and the example code I found contains:
#include <stdafx.h>
#using <mscorlib.dll>
using namespace System;
my code looks like:
#define _WIN32_DCOM
#include <Wbemidl.h>
#include <iostream>
#include <string>
#include <Windows.h>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.