Click here to Skip to main content
15,891,012 members
Home / Discussions / COM
   

COM

 
GeneralRe: Display custom image format in IE Pin
Pantelis Georgiadis20-Jul-05 3:08
Pantelis Georgiadis20-Jul-05 3:08 
GeneralRe: Display custom image format in IE Pin
vishalmore20-Jul-05 4:05
vishalmore20-Jul-05 4:05 
GeneralRe: Display custom image format in IE Pin
vishalmore20-Jul-05 4:10
vishalmore20-Jul-05 4:10 
GeneralActiveX in C# Web Service Pin
maskeen15-Jul-05 11:16
maskeen15-Jul-05 11:16 
GeneralWant to be COM programmer Pin
urssmiling14-Jul-05 3:21
urssmiling14-Jul-05 3:21 
GeneralRe: Want to be COM programmer Pin
Jörgen Sigvardsson16-Jul-05 10:32
Jörgen Sigvardsson16-Jul-05 10:32 
GeneralRe: Want to be COM programmer Pin
urssmiling17-Jul-05 23:03
urssmiling17-Jul-05 23:03 
GeneralUsing IADsNameTranslate Pin
AnkurGupta_198113-Jul-05 3:20
AnkurGupta_198113-Jul-05 3:20 
Hi,

I am using ADSI api and want to extract Net BIOS name from DNS using C++.
I got following sample from MSDN. But this sample is not compiling. I got following compilation error:
error C2065: 'IADsNameTranslate' : undeclared identifier

I have Included "activeds.h" and "Iads.h" in the header files but still I am not able to get the desired result.

If someone has worked on it then please sent me the working code.


#include "activeds.h"
#include "Iads.h"

int wmain( int argc, wchar_t *argv[] )
{
IADsNameTranslate *pNto;
HRESULT hr;
hr = CoCreateInstance(CLSID_NameTranslate,
NULL,
CLSCTX_INPROC_SERVER,
IID_IADsNameTranslate,
(void**)&pNto);
if(FAILED(hr)) { exit 1;}

hr = pNto->InitEx(ADS_NAME_INITTYPE_SERVER,
CComBSTR("aDsServer"),
CComBSTR("aUser"),
CComBSTR("userDomain"),
CComBSTR("passwd"));
if (FAILED(hr)) { exit 1;}

hr =pNto->Set(ADS_NAME_TYPE_1779,
CComBSTR("cn=jeffsmith,cn=users,dc=Fabrikam,dc=com"));
if(FAILED(hr)) {exit 1;}

BSTR bstr;
hr = pNto->Get(ADS_NAME_TYPE_NT4, &bstr);
printf("Translation: %S\n", bstr);

SysFreeString(bstr);
pNto->Release();
}


Thanks and Regards
Ankur
GeneralRegarding Basics Pin
Neelesh K J Jain13-Jul-05 1:31
Neelesh K J Jain13-Jul-05 1:31 
GeneralRe: Regarding Basics Pin
vishalmore13-Jul-05 18:35
vishalmore13-Jul-05 18:35 
Generalactivexc Pin
_tasleem12-Jul-05 8:47
_tasleem12-Jul-05 8:47 
GeneralRe: activexc Pin
Teeroo14-Jul-05 19:50
Teeroo14-Jul-05 19:50 
GeneralRe: activexc Pin
15-Jul-05 0:29
suss15-Jul-05 0:29 
GeneralRe: activexc Pin
Teeroo15-Jul-05 20:45
Teeroo15-Jul-05 20:45 
GeneralRe: activexc Pin
_tasleem16-Jul-05 2:28
_tasleem16-Jul-05 2:28 
GeneralRe: activexc Pin
Teeroo17-Jul-05 18:24
Teeroo17-Jul-05 18:24 
GeneralRe: activexc Pin
_tasleem18-Jul-05 3:53
_tasleem18-Jul-05 3:53 
GeneralRe: activexc Pin
Teeroo18-Jul-05 19:47
Teeroo18-Jul-05 19:47 
QuestionCOM function to retrieve highlighted text from IE? Pin
Melena12-Jul-05 7:02
Melena12-Jul-05 7:02 
AnswerRe: COM function to retrieve highlighted text from IE? Pin
vishalmore12-Jul-05 21:56
vishalmore12-Jul-05 21:56 
GeneralRe: COM function to retrieve highlighted text from IE? Pin
Melena13-Jul-05 5:41
Melena13-Jul-05 5:41 
GeneralOpenGL ActiveX Pin
Member 49426111-Jul-05 20:41
Member 49426111-Jul-05 20:41 
GeneralCoCreateInstance() returns the error saying "The specific module could not be found." Pin
urssmiling11-Jul-05 18:34
urssmiling11-Jul-05 18:34 
GeneralRe: CoCreateInstance() returns the error saying "The specific module could not be found." Pin
stonewall_200012-Jul-05 14:55
stonewall_200012-Jul-05 14:55 
GeneralRe: CoCreateInstance() returns the error saying "The specific module could not be found." Pin
urssmiling12-Jul-05 20:23
urssmiling12-Jul-05 20:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.