Click here to Skip to main content
16,006,013 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DBConcurrencyException Pin
Mekong River21-May-06 22:14
Mekong River21-May-06 22:14 
QuestionSending large files using Asynchronous Socket Problem?Plz Help :( Pin
shelal21-May-06 21:46
shelal21-May-06 21:46 
AnswerRe: Sending large files using Asynchronous Socket Problem?Plz Help :( Pin
Mekong River21-May-06 22:11
Mekong River21-May-06 22:11 
GeneralRe: Sending large files using Asynchronous Socket Problem?Plz Help :( Pin
shelal22-May-06 22:54
shelal22-May-06 22:54 
GeneralRe: Sending large files using Asynchronous Socket Problem?Plz Help :( Pin
Mekong River23-May-06 5:12
Mekong River23-May-06 5:12 
QuestionGet binary data from MS Access database into VB.Net Pin
Loiste21-May-06 21:22
Loiste21-May-06 21:22 
AnswerRe: Get binary data from MS Access database into VB.Net Pin
Mekong River21-May-06 22:19
Mekong River21-May-06 22:19 
QuestionProblem in getting a reference [modified] Pin
narayanagvs21-May-06 21:15
narayanagvs21-May-06 21:15 
Hii,

I need to set minimumpasswordlength for my system Using Visual Basic .
For this Iam Using IADsDomain interface.

My code is as follows....


Private Declare Function GetComputerName Lib "Kernel32.dll" Alias "GetComputerNameA" (ByVal strString As String, strSize As Long) As Long

Private Sub Command1_Click()

On Error GoTo ErrorHandler
Dim dom As IADsDomain
Dim cls As IADsClass
Dim v
Dim x As Variant
Dim str As String

Set dom = GetObject("WinNT://" & ComputerName & " ")

Set cls = GetObject(dom.Schema)
For Each x In cls.OptionalProperties
v = dom.Get(x)
Iam getting an exception in the above line
If x = "MinPasswordLength" Then
dom.MinPasswordLength = 10
End If
Next

ErrorHandler:
MsgBox Err.Description
End Sub

Function ComputerName() As String
Dim buffer As String * 512, length As Long
length = Len(buffer)
'GetComputerName returns zero on failure
If GetComputerName(buffer, length) Then
ComputerName = Left$(buffer, length)
End If
End Function

'My computer is connected in domain. if I specify the domain name instead of ComputerName in
Set dom = GetObject("WinNT://" & mydomain & " ")
,i could execute the code successfuly.But i need to execute the code on a system which is connected to work group (can be local system also)

Can anyone please provide me the relevant information??


Thanx


-- modified at 3:17 Monday 22nd May, 2006
QuestionRemote Login Pin
nitin_ion21-May-06 20:24
nitin_ion21-May-06 20:24 
AnswerRe: Remote Login Pin
Mekong River21-May-06 22:21
Mekong River21-May-06 22:21 
GeneralRe: Remote Login [modified] Pin
nitin_ion21-May-06 23:38
nitin_ion21-May-06 23:38 
GeneralRe: Remote Login [modified] Pin
Mekong River22-May-06 15:38
Mekong River22-May-06 15:38 
QuestionCombo Box query Pin
penguin500021-May-06 19:38
penguin500021-May-06 19:38 
AnswerRe: Combo Box query Pin
Mekong River21-May-06 22:28
Mekong River21-May-06 22:28 
QuestionPrinting contents of a DataGrid +Printing Pin
jaded_angel21-May-06 18:18
jaded_angel21-May-06 18:18 
AnswerRe: Printing contents of a DataGrid +Printing Pin
Duncan Edwards Jones21-May-06 21:06
professionalDuncan Edwards Jones21-May-06 21:06 
Questionsending video files to PDA using infrared Pin
deepak121-May-06 12:59
deepak121-May-06 12:59 
AnswerRe: sending video files to PDA using infrared Pin
Mekong River21-May-06 22:06
Mekong River21-May-06 22:06 
QuestionGUI for applications Pin
Prafulla Kiran21-May-06 9:25
Prafulla Kiran21-May-06 9:25 
AnswerRe: GUI for applications Pin
Mekong River21-May-06 22:05
Mekong River21-May-06 22:05 
Questionopening web page Pin
jaded_angel21-May-06 8:26
jaded_angel21-May-06 8:26 
AnswerRe: opening web page [modified] Pin
dadax_8521-May-06 9:20
dadax_8521-May-06 9:20 
AnswerRe: opening web page Pin
Mekong River21-May-06 21:56
Mekong River21-May-06 21:56 
QuestionHow to change the colored Picture to black and white picture Pin
Murtuza Husain Miyan Patel21-May-06 5:07
professionalMurtuza Husain Miyan Patel21-May-06 5:07 
AnswerRe: How to change the colored Picture to black and white picture Pin
Mekong River21-May-06 6:16
Mekong River21-May-06 6:16 

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.