Jump to content

AutoIt Compiled Scripts and Side-by-Side ActiveX Controls


spm
 Share

Recommended Posts

Hi. I'm trying unsuccessfully to get a compiled AutoIt script to work with a side-by-side (SxS) ActiveX control. I removed the auto-generated manifest from the autoit-compiled exe and placed a suitable manifest file and the ActiveX .dll co-located with the exe. The exe still can't use the SxS control.

This process works with other languages (I have tried successfully with VB6, C++ and Delphi) - is there a restriction in the way AutoIt's ObjCreate() function is implemented that prevents SxS from working? If so, is there any workaround?

Link to comment
Share on other sites

your question is to hard to understand please explain it and try to past your project script from this is easy to understand what do you want......?and where you took place mistake in code?

Edited by adnanbaloch

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Link to comment
Share on other sites

I have explained the issue clearly, I believe. There is no 'mistake' in my code. It's simply that with a properly specified SxS configuration (using an external manifest file - it could equally be embedded in the exe resources, it makes no difference), an ObjCreate() call on one of the classes served by the ActiveX fails with the error 0x800401f3 (which is a 'class not found' error).

If the ActiveX dll is instead registered as a COM server, all works fine. The problem occurs when the ActiveX is used 'registration-free' (i.e., as a side-by-side component).

Link to comment
Share on other sites

  • Moderators

spm,

I will move this thread to "Developer Chat" - you might get an answer there. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

My Google-fu isn't working today and I can't seem to find any documentation on how to implement side by side ActiveX. Do you have a link to any reference material so I can read up on this to attempt assisting you?

There's a Wikipedia article here: http://en.wikipedia.org/wiki/Side-by-side_assembly

You might also like to look here, as it covers the particular ActiveX control I'm working with at this time: http://www.emailarchitect.net/easendmail/sdk/

In the Contents, see the topic "Registration-free COM with Manifest File" under "EASendMail ActiveX Object".

Using side-by-side DLLs has all sorts of advantages, as it allows each application to have its own copy of a COM (ActiveX) server DLL, which can be a different version to those used by other apps, and which can be installed and uninstalled without disturbing other apps.

Edited by spm
Link to comment
Share on other sites

I've written some code for AutoIt that enables users to create objects from servers (dll-s) without the need to do any kind of registration manually. I didn't document it back then so likely you won't find any references. To use it, you would do something like this:

Global Const $sCLSID_Mail = "{DF8A4FE2-221A-4504-987A-3FD4720DB929}"
Global $hDLL = DllOpen("EASendMailObj.dll") ; path to the dll

; Create object
$oObj = ObjCreate($sCLSID_Mail, Default, $hDLL)

; Do things with the object...
ConsoleWrite("Date thingy = " & $oObj.Date & @CRLF)

$oObj.BodyText = "Test Body"
;...
Does that work for you?

Oh and you need beta AutoIt for that.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Ah, thanks Trancexx - that looks very much like it will work. I am looking for this in a production AutoIt project, though, so I am very hesitant to 'go beta'. I can't judge from the Developer forum how close the next release of AutoIt is. No, I'm not pressing you - I know these things take the time they need, and I'd rather wait for a stable version.

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...