List Info

Thread: how to retrieve min password length of local system which is not in network




how to retrieve min password length of local system which is not in network
country flaguser name
United States
2007-10-10 01:31:47
hi every body,

I am trying to retrieve the min password length of a local
system
which is not in network(purely a standalone system).

Here is my code:

CString ADSPath;

ADSPath=_T("WinNT://TS114"); //TS114 is my
computer name
IADsDomain *pDomain;

//GET Domain INTERFACE POINTER From IADSDomain
 HRESULT hr=ADsGetObject( ADSPath.AllocSysString(),
IID_IADsDomain,
(void**)&pDomain);

if(SUCCEEDED(hr))
	{
		LONG lngPswdLen=0;
		pDomain->get_MinPasswordLength(&lngPswdLen);

		CString strLen=_T("");
		strLen.Format(_T("min password len is
%ld"),lngPswdLen);
		AfxMessageBox(strLen);
	}

	if(FAILED(hr))
		AfxMessageBox(_T("failed"));


I am not able to get the min password length ,and i am
getting the
hresult value as E_NOINTERFACE which i could trace it out in
debugging
mode.

Anybody please help me out.

With Regards,
Sravan.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: how to retrieve min password length of local system which is not in network
user name
2007-10-11 02:46:56
Are you using managed C++?

On 10/10/2007, sravan <local.sravangmail.com> wrote:
>
> hi every body,
>
> I am trying to retrieve the min password length of a
local system
> which is not in network(purely a standalone system).
>
> Here is my code:
>
> CString ADSPath;
>
> ADSPath=_T("WinNT://TS114"); //TS114 is my
computer name
> IADsDomain *pDomain;
>
> //GET Domain INTERFACE POINTER From IADSDomain
>  HRESULT hr=ADsGetObject( ADSPath.AllocSysString(),
IID_IADsDomain,
> (void**)&pDomain);
>
> if(SUCCEEDED(hr))
>         {
>                 LONG lngPswdLen=0;
>                
pDomain->get_MinPasswordLength(&lngPswdLen);
>
>                 CString strLen=_T("");
>                 strLen.Format(_T("min password len
is %ld"),lngPswdLen);
>                 AfxMessageBox(strLen);
>         }
>
>         if(FAILED(hr))
>                 AfxMessageBox(_T("failed"));
>
>
> I am not able to get the min password length ,and i am
getting the
> hresult value as E_NOINTERFACE which i could trace it
out in debugging
> mode.
>
> Anybody please help me out.
>
> With Regards,
> Sravan.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: how to retrieve min password length of local system which is not in network
user name
2007-10-12 11:19:46
Yes i am using managed c++

On 10/11/07, Jamie Fraser < jamie.frasergmail.com">jamie.frasergmail.com> wrote:

Are you using managed C++?

On 10/10/2007, sravan < local.sravangmail.com">local.sravangmail.com> wrote:
>;
> hi every body,
>
> I am trying to retrieve the min password length of a local system
&gt; which is not in network(purely a standalone system).
&gt;
> Here is my code:
>
> CString ADSPath;
&gt;
> ADSPath=_T("WinNT://TS114&quot;); //TS114 is my computer name
> IADsDomain *pDomain;
>
> //GET Domain INTERFACE POINTER From IADSDomain
 HRESULT hr=ADsGetObject( ADSPath.AllocSysString(), IID_IADsDomain,
> (void**)&amp;pDomain);
>
> if(SUCCEEDED(hr))
>; &nbsp; &nbsp; &nbsp; &nbsp; {
>&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   LONG lngPswdLen=0;
>&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; pDomain-&gt;get_MinPasswordLength(&lngPswdLen);
&gt;
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; CString strLen=_T("";);
>&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; strLen.Format (_T(&quot;min password len is %ld"),lngPswdLen);
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; AfxMessageBox(strLen);
; &nbsp; &nbsp; &nbsp;  }
>
>; &nbsp; &nbsp; &nbsp; &nbsp; if(FAILED(hr))
>&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   AfxMessageBox(_T(&quot;failed&quot;));
&gt;
>
>; I am not able to get the min password length ,and i am getting the
> hresult value as E_NOINTERFACE which i could trace it out in debugging
> mode.
>
> Anybody please help me out.
>;
> With Regards,
&gt; Sravan.
&gt;
>
>; >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting&quot; group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )