Originally posted by: Richard Wong
_variant_t vntName(COMPLUSAPPNAME);
LPTSTR Convert(BSTR pStr,LPTSTR szStr,INT nSize)
ICOMAdminCatalogPtr spCatalog("COMAdmin.COMAdminCatalog");
ICatalogCollectionPtr spApplications;
spApplications = spCatalog->GetCollection (L"Applications");
spApplications->Populate ();
_bstr_t bStr;
ICatalogObjectPtr spHelloWorldApplication;
LONG lCount=0;
spApplications->get_Count(&lCount);
TCHAR szTempStr[100];
for(INT i=0;i<lCount;i++)
{
spHelloWorldApplication =spApplications->GetItem(i);
spHelloWorldApplication->get_Value(L"Name", &vntName);
bStr=vntName;
Convert(bStr,szTempStr,100);
if(!strcmp(szTempStr,"TEST"))
{
spApplications->Remove(i);
break;
}
}
spApplications->SaveChanges ();
{
DWORD dwRet = WideCharToMultiByte(
CP_ACP,0,(LPCWSTR)pStr,-1,szStr,nSize,NULL,NULL);
return szStr;
}
Originally posted by: slava
fignia kakaia-to!!!
ReplyOriginally posted by: vinod bhawnani
Hi guys ,
have recently developed a component as per com+ specifications . This component is a transactional poolable component writen using ATL wizard.
I have beena ble to all except for the manual enlistment with transactions part
any one interested can join me in my research for that or help me if already done
thanks and regards
vinod
Reply
Originally posted by: Anchal
where can i find all .h files on internet and information on that, what commands they include.
please help me.
Originally posted by: Vinay
hi,
We are facing problem when installing MSI file on Client Mechine...Error is WinError 1928 RPC_S_GRP_ELT_NOT_ADDED
description...group element is not added.
can anyone know whats the cause for this and i appreciate if anyone can give me solution..
it good when installing on NT only problem is when installing the MSI file on win 2000 its giving problem
thanks,
Vinay
Originally posted by: DidyMorass
'Connection object cannot be explicitly closed while in a transaction.'
Development tools:Delphi.
Database:Oracle 8i.
Data provider:Oracle for OLE DB.
If u have good idea,please mail to me.thanks.
Originally posted by: Dmitri
Please, help me! Where can I get comscvs.h and *.lib files?
ReplyOriginally posted by: Richard Preston
I need the code to stop a COM+ application and delete it.
Here is my VB code for creating a COM+ application and adding a couple components.
Actually, I should really do this using a C++ DLL so if I could get the C++ code for deleting a COM+ app it would be even better.
Sub Main()
Sub InstallApplication()
Dim fulldllpath As String
End Sub
Function ApplicationExists(ByVal AppName As String) As Boolean
I wrote a VB app to create a COM+ app using Ted Pattison's article. Then I wrote an app that deleted it. Then I lost the code for deleting the app and for the life of me I can't remember how I did it. I hope I never do that again but I was hoping someone could help.
If (ApplicationExists("InSiteWebNavigator") = False) Then
Call InstallApplication
End If
End Sub
Dim dllpath As String
Const AppName = "InSiteWebNavigator"
Const AppDesc = "InSite web interface application."
Const DllName1 = "InSiteWebErrorInfo.dll"
Const DllName2 = "InSiteWebManagerCore.dll"
dllpath = Command()
' Add new library application
Dim cat As COMAdmin.COMAdminCatalog
Set cat = New COMAdmin.COMAdminCatalog
Dim apps As COMAdmin.COMAdminCatalogCollection
Set apps = cat.GetCollection("Applications")
Dim app As COMAdmin.COMAdminCatalogObject
Set app = apps.Add
app.Value("Name") = AppName
app.Value("Description") = AppDesc
app.Value("ApplicationAccessChecksEnabled") = False
app.Value("AccessChecksLevel") = COMAdminAccessChecksApplicationComponentLevel
app.Value("Activation") = COMAdminActivationLocal
apps.SaveChanges
' Install component(s) in DLLs into the new application
fulldllpath = dllpath & "\" & DllName1
cat.InstallComponent AppName, fulldllpath, "", ""
fulldllpath = dllpath & "\" & DllName2
cat.InstallComponent AppName, fulldllpath, "", ""
Dim cat As COMAdmin.COMAdminCatalog
Set cat = New COMAdmin.COMAdminCatalog
Dim apps As COMAdmin.COMAdminCatalogCollection
Set apps = cat.GetCollection("Applications")
apps.Populate
' enumerate through applications looking for AppName
Dim app As COMAdmin.COMAdminCatalogObject
For Each app In apps
If app.Name = AppName Then
ApplicationExists = True
Exit Function
End If
Next app
ApplicationExists = False
End Function
Originally posted by: Richard Preston
I thought I should add that ICatalogCollection has a method named Remove which I assume would delete the application but it takes the index of the item being removed and finding this index is what I haven't been able to figure out.
ReplyOriginally posted by: JuCeR
i think that it�s a good IDEA, and maybe can result too if you change de paramters in definition of VARIANT, for _variant, internal?