Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP COM access denied
Message
 
 
À
20/08/2004 14:57:38
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00934952
Message ID:
00939285
Vues:
19
Craig,
I've walked through your example using
*MTS multiply ox = CREATEOBJECT("Primedb.Math") single-threaded DLL 
DEFINE CLASS Math AS SESSION OLEPUBLIC
   FUNCTION Multiple(tnNum1, tnNum2)
      LOCAL lnResult, loMtx, loContext
      * Create a reference to the MTS object
      loMtx = CREATEOBJECT("MTXAS.APPSERVER.1")
      * Create a reference to the Context object
      loContext = loMtx.GetObjectContext()
      lnResult = tnNum1 * tnNum2
      * Commit the transaction if there is one and
      * tell MTS that we're done using the component
      loContext.SetComplete()
      RETURN lnResult
   ENDFUNC
ENDDEFINE
and calling with
ox = CREATEOBJECT("Primedb.Math")
? ox.Multiply(n5, n4)   
ox = NULL
n5 and n4 are int --- results in error
OLE error code 0x80020006: Unknown name.

This is window XP Pro OS

What am I doing wrong?

TIA

>Then VFPers haven't read my article at http://msdn.microsoft.com/library/en-us/dnfoxtk01/html/ft01e1.asp?frame=true
>
>>DCOMCNFG is something you don't need for VFP MT COM (thank god!). Use COM+ instead - here are some simple instructions that don't seem to be documented anywhere (at least for VFPers):
>>COM + Setup Instructions for a VFPmtdll on Windows2000
>>1.)go into Control Panel, Component Services
>>2.)right click COM+ applications and select New.
>>3.)going through the wizard, create an Empty Application,giving it a name, check server application, and select the appropriate account to run under.
>>4.)After the Empty Application is created, right click on 'Components' under the newly created application.
>>5.) select New/Component.
>>6.) The wizard starts - select 'Import components that are already registered.'
>>7.) select your Visual FoxPro mtdll from the list and it is added to this COM+ app.
>>8.) right click on your COM+ application name and select 'Start'. The COM+ icon is now revolving in the Components pane.
>>
Edgar L. Bolton, B.S. B.B.A.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform