Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEException errors after com object rebuids in ASP.net
Message
De
07/12/2005 06:39:15
 
 
À
07/12/2005 06:37:41
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01075555
Message ID:
01075639
Vues:
25
>Many thanks for your help,
>
>So should I be doing the following when updating my vfp com object:
>
>1)make changes to the com object: including adding and deleting methods, changing the order of the methods, signatures, etc.
>2)rebuild the vfp COM object
>3)recompile the asp.net application
>4)re-distribute the asp.net application and the vfp com object to the web server once again
>
>And... then am I good to go. Or... do I have to request a new indentifier each time I rebuild my com object from within vfp and then recompile the asp.net application. If so, do I have to re-register the vfp com object on the web server and redo com+ ?
>
>Regards,
>Neil
>
>
>>Hi,
>>
>>you're violating one of the basic rules of COM interface design.
>>That is once an interface is published, it should not change.
>>
>>We'll have to dig into lower level COM to understand why that is important.
>>
>>When you compile a COM object in VFP, each method and property you expose from it is given a unique identifier (a plain integer value).
>>
>>COM Automation objects can be early bound & late bound. What does that mean?
>>In the early binding scenario the compiler of the lanuguage you're using the COM object from, resolves the unique identifier of your methods/properties at compile time. When using late binding the Compiler emits code to resolve this unique identifier at runtime.
>>
>>see methods "Invoke" & "GetIDsOfNames" of the IDispatch interface for more details.
>>
>>Now what propably happens is that when you change the order of the methods
>>in your COM object, some methods are assigned different unique identifiers.
>>
>>And since ASP.Net early binds to your COM object, the code breaks.
>>
>>Normally you should be able to resolve this by recompiling the parts of your ASP.Net application that use your COM object.
>>
>>Regards
>>Christian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform