Jump to content

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


Abrolen
 Share

Recommended Posts

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!

Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...

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?

Link to comment
Share on other sites

  • 4 weeks later...
  • 11 months later...

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