General information
Category:
COM/DCOM and OLE Automation
I have an app that I installed on a W XP. It's got an exe and a dll.
I published the component in Com+. All this in one single pc. And it works fine.
I tried to do the same thing on a W 7 pc. And I can´t even get started. When I try to add the dll to Component Services you have to choose the dll, but when I do it does not add it, instead I get an arror message saying that the dll file coul not be added. The .tlb file is in it's place.
I tried the same thing with code
*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*
* ####### ####### ####### # # ####### ####### ####### ####### ####### *
* # # # # # ## ## # # # # # # # # *
* # # # # # # # # # # # # # # # # # *
* # # # # # # # # ####### # # # # # # # *
* # # # # # # # # # # # # # # # *
* # # # # # # # # # # # # # # # *
* # # # # # # # # # # # # # # # *
* ####### #### ####### # # # #### # # # # # *
* # # # # # # # # # # # # # # # *
* # # # # # # # # # # # # # # # *
* # # # # # # # ####### # # ####### ####### # *
* *
* ° ° °°°°° °°°°° °°°°° ° °°°°°° ° ° °°°°° ° *
* ° ° ° ° ° ° ° ° ° °° ° ° ° ° *
* ° ° °°° °°°°° °°°°° ° ° ° ° ° ° °°°°° ° *
* ° ° ° ° ° ° ° ° ° ° °° ° ° *
* ° °°°°° ° ° °°°°° ° °°°°°° ° ° ° ° ° *
*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*
* Written by Hernan Baranda to the FRAMEROOT framework. *
* Registra una dll en com + para cualquier proyecto *
* a-este codigo supone ser ejecutado en c:\MiProyecto *
* b-tiene que estar creada la aplicacion MIProyectobiz en com+ antes de *
* ejecutar este codigo *
* OJO, tiene que estar la aplicacion CREADA antes de que este codigo ponga *
* servidores, en cristiano, que indique y agregue la dll y que reconozca *
* los metodos, que uno vea los metodos en com+ *
*---------------------------------------------------------------------------*
wait window "Cleaning memory" timeout 0.5
clear dlls
set talk off
set echo off
set safety off
local lcBizDLL as string ,;
lcProject as string
lcProject = "c:" + CURDIR() + "Biz\" + SUBSTR(CURDIR(), 2, LEN(ALLTRIM(CURDIR())) - 2) + "biz"
lcProject = lower( alltrim( lcProject ) )
lcBizDLL = lower( alltrim( lcProject ) ) + ".dll"
lcCOMApp = inputbox( "Enter the name of the COM+ application project", "Reinstall component", "" )
if not empty( lcCOMApp )
wait window "Shuting down the application in COM+" timeout 0.5
try
loCOMApp = createobject( "COMAdmin.COMAdminCatalog" )
catch
WAIT WINDOW "Me olvidé de poner el nombre de la dll para com +" TIMEOUT 2
endtry
endif
wait window "Unregistering DLL: " + lcBizDLL timeout 0.5
run /n regsvr32 /u /s ( lcBizDLL )
wait window "Registering the new DLL: " + lcBizDLL timeout 1.5
if file( lcBizDLL )
run /n regsvr32 /s ( lcBizDLL )
endif
if not empty( lcCOMApp )
wait window "Installing the component in COM+" timeout 1.5
try
loCOMApp.InstallComponent( lcCOMApp, lcBizDLL, "", "" )
loCOMApp.StartApplication( lcCOMApp )
release loCOMApp
catch
messagebox( "Cannot find the COM+ application named " + lcCOMApp, 64, SUBSTR(CURDIR(), 2, LEN(CURDIR()) - 2 ))
endtry
endif
it didn't work either.
The strange thing is that in another pc that same code run with no problemn at all, and I got the dll with all it's methods in Component Services.
Thanks for any idea.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only