Jump to content

How to use Autoit COM to display AD Object Picker dialog -Please-


Stevo
 Share

Recommended Posts

Dear all,

I have posted this question in general forum without getting any answer back. So appologies posting it here again;

I would like to directly bring up the "AD object picker dialogbox".

When Desktop is part of a domian, this dialog box could be displayed by going to:

"Control panel" -> "User accounts" -> "Add" -> "Browse" to bring the dialogbox up. I have attached a screenshot of the dialog.

I read somewhere that objsel.dll is needed to run this dialogbox.

My question is about how to use DllCall to run "objsel.dll or use AutoIt COM to display this dialogbox?...

Many thanks for your kind support.

Thanks and kind regards,

Steven

Link to comment
Share on other sites

  • 9 months later...

Hi Steven,

Have you got the answer you were looking for? It seems no reply for so long....!!!! ^_^

I URGENTLY also need run objsel.dll on my Autoit scripts.

Please let me know how ASAP.

Kind of very urgent to get this going.

Cheers, Fred

Link to comment
Share on other sites

Hi Fred,

Unfortunetly I haven't seen any reply to my question. Actualy I was wondering for long time myself.

I have found some info on the web:

http://www.codeguru.com/cpp/i-n/network/ac...ticle.php/c5445

http://www.codeproject.com/KB/winsdk/bfobj...x?display=Print

http://msdn.microsoft.com/en-us/library/ms677102.aspx

Since I am an administrator with no programming skill, none the above helped. Basically C++, C# codes.

The closest I found using VB is here:

http://www.planet-source-code.com/vb/scrip...68&lngWId=1

I am copying the VB code bellow. Maybe you can help transalting it to au3. I am no good unfortunetly...

I still need this. Maybe we can make something happen or ask for help collectively... ^_^

Regards,

Steven

'**************************************
'Windows API/Global Declarations for :Ob
'    ject picker with dispcallfunc
'**************************************
Public pDsOPIntf As Long 
' IDsObjectPicker has two functions in t
'    he interface
Private Const sCLS_DsOP = "{17D6CCD8-3B7B-11D2-B9E0-00C04FD8DBF7}"
Private Const sIID_DsOP = "{0c87e64e-3b7a-11d2-b9e0-00c04fd8dbf7}"
'Vtbl - First 3 functions from IUnknown:
'    
' QueryInterface; AddRef; Release;
' Init - Sets scope, filter, etc. for 
' use with next invocation of dialog
' STDMETHOD(Initialize)( THIS_ 
' PDSOP_INIT_INFO pInitInfo) PURE;
' Invoke - Shows modal DS Object Picker 
'    dialog.
' STDMETHOD(InvokeDialog)( THIS_ HWND hw
'    ndParent,
' IDataObject **ppdoSelections) PURE;


Public Enum eVtblFunctionOffset
    vtblOffsetQueryInterface = 0 '2 Args
    vtblOffsetAddRef = 4 '0 Arg
    vtblOffsetRelease = 8 '0 Arg
    vtblOffsetInitialize = 12 '1 Arg : InitInfo *
    vtblOffsetInvokeDialog = 16 '2 Args: hW, DataObject **
End Enum


Private Declare Function CLSIDFromString Lib "ole32" ( _
    ByVal sCLSID As Long, ByRef pUUID As UUID) As Long


Private Declare Function CoCreateInstance Lib "ole32" ( _
    ByRef pCLSID As UUID, ByVal pUnkOuter As Long, ByVal dwClsContext As Long, _
    ByRef pIID As UUID, ByRef pIntfPtr As Long) As Long


Private Declare Function DispCallFunc Lib "oleaut32" (ByVal pvInstance As Long, _
    ByVal offsetinVft As Long, ByVal CallConv As Long, ByVal retTYP As VbVarType, _
    ByVal paCNT As Long, ByRef paTypes As Integer, _
    ByRef paValues As Long, ByRef retVAR As Variant) As Long ' from oleauto.h

Type DSOP_UPLEVEL_FILTER_FLAGS

Type DSOP_FILTER_FLAGS

Type DSOP_SCOPE_INIT_INFO

Type DSOP_INIT_INFO
    DSOP_SCOPE_INIT_INFO

Type DS_SELECTION

Type DS_SELECTION_LIST
    ' Now the DataObject:

Type STGMEDIUM

Type FORMATETC
Link to comment
Share on other sites

Steven,

Thank you for the quick reply. I was praying you have some answers.

I have started coding with Autoit myself. To date I was having no probem to make anything happen with Autoit. So I didn't see any reason to learn another language :(

Now I realized that I have no idea how to get COM objects working in Autoit. ;)

I don't know VB. Maybe we can ask for help together. YES....

Is there anyone out there to help.... pleaseeee.....??? ^_^

Frank

Link to comment
Share on other sites

Fred.

I understand.

Hopefuly we are in the right forum though.

Getting this working for me whould be fantastic.

I tried lots of diffrent ways. So far no joy....

Let's pray together.... ^_^;)

Regards,

Steven

Edited by Stevo
Link to comment
Share on other sites

Steven,

Yes. I think the ability of picking AD Objects is an important function for scripting language such as Autoit.

I am wondering why it didn't trigger any interest in the Autoit expert community.

Lets cross finger we get help together.

frank

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...