Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Using ActiveX controls and DLLs directly from memory buffer (C#)


  • Please log in to reply
10 replies to this topic

#1 Abrolen

Abrolen

    Seeker

  • New Members
  • 2 posts

Posted 26 May 2009 - 02:18 PM

Hi!
Didn't find related topic, so creating new one.
Is it possible to use ActiveX controls and dynamic libraries without installing an application, by simply running EXE file? It’s means there is no temporary files, all ActiveX controls and DLLs are used from memory buffer. And there is no need to register DLLs.

Thanks!







#2 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 10,296 posts

Posted 26 May 2009 - 02:33 PM

ActiveX can be used without being registered but the technology was designed to be registered first.

Use standard dll functions if you don't want to register anything.

Edited by Richard Robertson, 26 May 2009 - 02:33 PM.


#3 Abrolen

Abrolen

    Seeker

  • New Members
  • 2 posts

Posted 25 July 2009 - 05:50 PM

Thanks, but I've found an easier solution: BoxedApp SDK
http://boxedapp.com/

#4 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 10,296 posts

Posted 25 July 2009 - 09:00 PM

The program you linked to is about virtualization. It doesn't affect how ActiveX objects still have to be registered.

#5 Creator

Creator

    Adventurer

  • Active Members
  • PipPip
  • 129 posts

Posted 26 July 2009 - 09:19 AM

I work with non-registerred dll's with the help of a little tool called ILMerge.

My Steps to succes >_< :

* Register the dll on your development system with regsvr32 (eg. AutoItX3.dll)
* Reference the dll from your project in a IDE of choice (i use sharpdevelop).
* Use the methods and properties you need from the dll in your code.
* After compiling your assembly there will be a interop.<dllclassname>.dll in your bin directory
* now comes the trick: you can merge the assembly and the interop dll into a new single executable with ILMerge.exe

From now on you exe will run from any system without having registered the dll on that system.

Get ILMerge here: http://www.microsoft.com/downloads/details.aspx?FamilyID=22914587-b4ad-4eae-87cf-b14ae6a939b0&displaylang=en


Cheers

-edit- example use for merging AutoItX3.dll:
"ilmerge" /target:winexe /out:New-Executable-Merged.exe Old-Exe-Name.exe Interop.AutoItX3Lib.dll(-> was created by referencing AutoItX3.dll)

Edited by Creator, 26 July 2009 - 09:23 AM.


#6 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 10,296 posts

Posted 26 July 2009 - 11:23 PM

I'm surprised that actually works. I was under the impression that the interop assembly still called the locally registered object and was just a wrapper for it.

#7 Creator

Creator

    Adventurer

  • Active Members
  • PipPip
  • 129 posts

Posted 27 July 2009 - 09:39 AM

I'm surprised that actually works. I was under the impression that the interop assembly still called the locally registered object and was just a wrapper for it.


I double checked that remark.
And you absolutely right. I wasnt aware that my target systems had AutoItX3 already registered (i believed it was not).

I did a regsvr32 /u and tried again.....after the tears had dried, i saw that the dll indeed must be registered.

/me gets a broom and puts together a broken dream... ;-)

Cheers

#8 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 10,296 posts

Posted 27 July 2009 - 08:45 PM

Combining the interop assembly with the main assembly does make it a bit cleaner though. Points for trying.

#9 aef03

aef03

    Seeker

  • Active Members
  • 33 posts

Posted 12 January 2011 - 01:56 AM

Thanks, but I've found an easier solution: BoxedApp SDK
http://boxedapp.com/


Are you used BoxedApp together with Autoit or instead of autoit ?

If you are using it together, do you know if an autoit exe can be instantiate the boxedapp apis so that anything it is doing and calling is virtualized?

#10 lovespell88

lovespell88

    Seeker

  • New Members
  • 1 posts

Posted 09 February 2011 - 03:25 AM

To fix activex controls, try uninstalling then re-installing it afterwards. To do this, click on Tools and select Manage Add-Ons > Enable/Disable Add-Ons. Choose Downloaded ActiveX Controls and highlight the ActiveX control you want to delete. Delete it and go to the website where you downloaded your ActiveX control and reinstall the it correctly.

#11 StarDrago

StarDrago

    Seeker

  • New Members
  • 1 posts

Posted 08 February 2012 - 07:21 PM

Interesting discuss :) it's powerful SDK for developers but few people have heard about it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users