Hi,
"WenJun Zhang[msft]" <v-wzhang@online.microsoft.com> a écrit :
There is an enum "type" for the return value
http://msdn.microsoft.com/library/en-us/isa/isaenum_9ecl.asp
So :
FpcDestinationAddressType Dtype ;
long l=1;
try {
while (fpcDestination = fpcDestinationSet->Item
(_variant_t(l),(BSTR) NULL ,(BSTR) NULL)){
Dtype=fpcDestination->Type;
// or fpcDestination->get_Type( &Dtype );
switch ( Dtype ){
case 0 :
Buff=(char*) fpcDestination->DomainName;
break;
case 1 :
Buff= (char*) fpcDestination->IP_From;
break;
default :
break;
}
...../....
l++
}
}catch ( _com_error& pCE ){
Display.Format("Failed: %x, source %s\n", pCE.Error, (char*)
pCE.Source());
// MessageBox(Display);
}
Using CoCreateInstanceEx() ?
In order to use my prog from a distant machine, I have to use this
method.
Of course when I use hr = fpcRoot.CreateInstance("FPC.Root")
and run the exe on the ISA itself, I've no speed problem at all
Looking at the task manager of the ISA while running the 2 methods, I
can observe that
- CoCreateInstanceEx()uses a dllhost.dll on the ISA that grows up to 300
Mo when using my huge destination set (470000 entries). The process is
slow as I said previously, even if I run from the ISA specifying
localhost as target.
- fpcRoot.CreateInstance("FPC.Root") runs on the ISA itself and is very
fast (also less than less than 1" to complete the export 1000 items
destination set. In that case, there is no dllhost that appears, but my
prg itself grows up to 300Mo when playing with the huge set.
But for now, I've removed the huge set, I run my test ISA server in a
vmware and my computer is only 512Mo RAM, so this huge set was causing
lots of swap on the VM and on my computer
What's happen if you use :
Set objFPC = CreateObject("FPC.Root", "YourISAServer")
from your ISA and eventually from a distant machine ?
I suppose that vbs translate : CreateObject("FPC.Root")
by fpcRoot.CreateInstance("FPC.Root") (whih is fast for me)
but I wonder how it will translate :
CreateObject("FPC.Root", "YourISAServer") and if it cause speeds
problems
If I've a little time I will try to use your script using this method.
Regards,