Using ShellExecute
-
I have two questions. 1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder? 2. I do not want it to be in the hard disk, but would like to include the activex control within my program as a resource and then I want to register it. I imported it as a resource. How can I proceed? Regards, Aljechin Alexander :rose:
-
I have two questions. 1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder? 2. I do not want it to be in the hard disk, but would like to include the activex control within my program as a resource and then I want to register it. I imported it as a resource. How can I proceed? Regards, Aljechin Alexander :rose:
Use
DllRegisterServer
Check this article for some help. http://www.codeproject.com/macro/openvc.asp?df=100&forumid=1254&exp=0&select=809393[^] Appu.. "If you judge people, you have no time to love them." -
I have two questions. 1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder? 2. I do not want it to be in the hard disk, but would like to include the activex control within my program as a resource and then I want to register it. I imported it as a resource. How can I proceed? Regards, Aljechin Alexander :rose:
- u can use ShellExecute(NULL, NULL, "regsvr32.exe", , NULL, SW_HIDE); 2) you cant keep an ocx in the resourse and use it if you are doing static linking. if u are doing only dynamic lnking then, one thing you can do is to store the binaries from reourse into the harddisk and register from there. cheers..milton kb
-
I have two questions. 1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder? 2. I do not want it to be in the hard disk, but would like to include the activex control within my program as a resource and then I want to register it. I imported it as a resource. How can I proceed? Regards, Aljechin Alexander :rose:
-
Use
DllRegisterServer
Check this article for some help. http://www.codeproject.com/macro/openvc.asp?df=100&forumid=1254&exp=0&select=809393[^] Appu.. "If you judge people, you have no time to love them."NiceNaiduUse DllRegisterServer
Exactly how is this of any help outside of the ActiveX file?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
I have two questions. 1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder? 2. I do not want it to be in the hard disk, but would like to include the activex control within my program as a resource and then I want to register it. I imported it as a resource. How can I proceed? Regards, Aljechin Alexander :rose:
Aljechin wrote:
1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder?
While you can use
ShellExecute()
orCreateProcess()
for this, you could also useLoadLibrary()
andGetProcAddress()
to call the exportedDllRegisterServer()
function.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
Aljechin wrote:
1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder?
While you can use
ShellExecute()
orCreateProcess()
for this, you could also useLoadLibrary()
andGetProcAddress()
to call the exportedDllRegisterServer()
function.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
Halo sir, I went through your article which demonstrates the usage of
UpdateResource()
. Nice one. But from that I am unable to understand how do I do the same when I have imported it as a Binary resource into my MFC app. Its like I have an activeX DLL imported as a binary resource and it is a part of my executable now. I need to register the control to any machine on which the executable is run. I have understood that I could do it withShellExecute()
But I do not know how to use this resource!! Is copying this data to a file on the machine and registering it the only possible way? Can I not register it from within my program itself without copying this binary and creating a replica of the actual file? Thanks for your help. Aljechin. :rose: -
Halo sir, I went through your article which demonstrates the usage of
UpdateResource()
. Nice one. But from that I am unable to understand how do I do the same when I have imported it as a Binary resource into my MFC app. Its like I have an activeX DLL imported as a binary resource and it is a part of my executable now. I need to register the control to any machine on which the executable is run. I have understood that I could do it withShellExecute()
But I do not know how to use this resource!! Is copying this data to a file on the machine and registering it the only possible way? Can I not register it from within my program itself without copying this binary and creating a replica of the actual file? Thanks for your help. Aljechin. :rose:Aljechin wrote:
Is copying this data to a file on the machine and registering it the only possible way?
It's the only way that I am familar with.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb