Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crypto API and COM+
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Crypto API and COM+
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows 2000
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
00966239
Message ID:
00966239
Vues:
64
I'm having problems trying to use the Windows Crypto API on a COM Server. I've built a MTL dll (basically copied the code from www.feldstein.net/CodeCryptoArticle.htm) using the VFP _crypto wrapper class. If I install the .dll on the COM server and register it manually via the cmd line, it works fine if I call the class from VFP development on the same machine. However if I install it as a COM application via the Component Services Manager and then call it from the same machine, the COM application starts and the icon spins, however the only thing returned from the method is false.

Here's an excerp of code that is returning .F.
PROCEDURE encrypt(tcString	AS String,;
		  tcPassword 	AS String) AS Character
	
LOCAL lcEncryptedString	AS String
	
IF NOT THIS.oCrypto.encryptsessionstreamstring(tcString, tcPassWord, @lcEncryptedString )
   lcEncryptedString = .F.
ENDIF
	
RETURN lcEncryptedString
If I call the encryptsessionstreamstring() method within the _cryptapi class directly from VFP it works fine. It's rather difficult to debug since it works fine in development mode, only when It's running as a COM application do I get this problem.

Thanks,
Kurt
Répondre
Fil
Voir

Click here to load this message in the networking platform