Bonjour, Tsw avait énoncé:
Quote: is there any way to bind to msfpccom (fpcds.root) on Remote Machine from C #? On localhost Marshal.BindTomoniker ("new: fpc.root") Works OK, But I was not able to Figure outhow to connect Remote Machine ...
Someone on this forum give me tips to connect the fcp.root on A Remote Machine. Based on His Code, this Is How I've got it to work with VC 6.0 (AN VC 5.0): (IT's Part of A " work in progess "program to manage blacklists on ISA) m_local is BOOL mapped to check box wether I'm on the ISA or on remote machine m_Server is a CString mapped to EditBox that contains the name of the ISA server The remote machine should have the ISA Management Tools Installed, in Order to Have The Good Entries in The Register ----------------------------------- -------------------- // Some Declarations #include #include #define _win32_winnt 0x0400 #define uncode #define InitGuid #import "c: / program files / microsoft isa server / msfpccom.dll" Using namespace fpclib; .... / ... bool connection = false; wchar psz [100]; hRESULT HR; COSERVERINFO INFO; MULTI_QI QIS; IFPC * Punk = NULL; BOOL RESULTFOUND = false; ifpcordr fpcroot; ifpcarraysptr fpcarrays; IFPCARRAYPTR FPCARRAY; IFPCserversptr FPCServers; IFPCServerPtr fpcServer; IFPCEnterprisePtr fpcEnterprise; IFPCDestinationSetsPtr fpcDestinationSets; IFPCDestinationSetPtr fpcDestinationSet; IFPCDestinationPtr fpcDestination; .... / ... // Here is the connection part void CMyDialogDlg :: OnConnect () {// TODO: Add your control notification handler code here USES_CONVERSION ; BeginWaitCursor (); if (Connected!) {hr = CoInitializeEx (NULL, COINIT_APARTMENTTHREADED); if (SUCCEEDED (hr)) {wcscpy (psz, T2W ((LPCTSTR) m_Server)); memset (& info, 0, sizeof (info )); info.pwszname = psz; const IID IIDFPC = __UUIDOF (FPC); Const IID IID = __UUIDOF (IFPC); Qis.hr = 0; Qis.piID = & IID; QIS.PITF = NULL;