Click to See Complete Forum and Search --> : active-x and standard exe
chander
Sep 5th, 2001, 08:04 AM
i want to get clear some doubts abt active-x exe and standard exe. as far i know word is an standard exe and active-x exe as we can run it as standard and we can create its object and use . when i try to creat an active-x exe and use it in my other project it works fine but when i double click and try to use it as standard exe then it doesnt work... why so ? if i agree that active-x exe cant work as standard then how MS Word works ?? is there any property in project setting which makes this ? and any one can pls tell me more abt active-x exe that it cant have message boxes , about its threading model etc. and how it affects active-x exe .
thanks in advance
jim mcnamara
Sep 5th, 2001, 09:03 AM
No. Your assumptions are wrong.
winword.exe is the image file for Word. It is a standard .exe file.
It uses other ActiveX components for Word.
Background: .dll files, .exe files, .lib files, and object files all have their structure as COFF - common object file format. Image files, .exe files, have an image header which tells the OS to create process context & windows, etc., for the image. The other file types mentioned above do not do this.
When you double-click on an ActiveX image file it does actually start up, then immediately exits with no error. The SCM (server component manager) is the ONLY thing that can start an ActiveX image file going in a new process -- when you reference any object in the ActiveX exe. As long as their are outstanding references to the objects in the ActiveX exe image, the process remains running. When the reference count decrements to zero, the image exits. You cannot run an ActiveX exe outside of SCM context and have it run on it's own. Because there are no external references to COM objects in it, it automatically commits suicide.
chander
Sep 5th, 2001, 09:26 AM
thanx jim , i got ur point abt image file and standard exe. and as active-x exe cant run on its own , this fulfil my purpose as i want to use it from my other application and dont want to let it run on its own.
thanks
Edneeis
Sep 5th, 2001, 10:37 AM
I disagree you can have an activeX exe work as both a standard and activeX exe. I don't know if it is the best way of doing things or not, but it can be done. An activeX exe allows you to set the start up object as sub main and fro there you can launch as a normal exe. here is a sample.
chander
Sep 5th, 2001, 11:58 AM
well i too dont know its right way to do or not but i think it will depend on further working of application as we just cant say that whole application will work on just showing a form. but thats a good idea to run main form of application . and it can be used as active-x also ...
thanks for tip ...
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.