Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lost in the Land of DLL
Message
De
07/09/2009 17:48:40
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Lost in the Land of DLL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01422999
Message ID:
01422999
Vues:
268
Hi All:

I'm lost in the land of DLL.

I'm looking at a credit card package from Verifone Payware PC. Unfortunately, they have no sample code for VFP, only VB-like pseudocode. I have converted most of it to VFP and commented out the first 2 lines that instantiate the object:
*Dim charge1 As New SIM.Charge
*Set charge1 = New SIM.Charge

.....    Program code   .....


WITH charge1


	.LoggingLevel = 3
	.PaymentEngine = 'PaymentSoftware_RiTA_PAYware'

	.port = lcPort
	.IPAddress = lcIPAddress
	.ClientID = lcClientID


...  yada yada yada ...



	.PROCESS


	lcResult = .GETRESULT
	lcRsponse = .GetResponseText
	lcAuthNumber = .GetAuthCode


ENDWITH

*Set Charge1 = Nothing


RETURN
It's obviously making a reference to a module called "SIM.DLL", which they provided to me.

To make matters more complicated, the documentation says I need to run a batch file to make this SIM.DLL work with VFP, since it's designed for .NET!

This is the batch file:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm C:\cc\SIM.dll
pause
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm C:\cc\SIM.dll /tlb
pause
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm C:\cc\SIM.dll /codebase
pause
This is what their documentation says:
It is possible to have PAYware SIM run in Debug with Unmanaged Code. This is any environment outside .NET. The
environment could be Vb6, C++, FoxPro, etc. It is, however, necessary to run the COM-Dev.bat file on the development
machine. This .bat file will create a .tlb file in the SIM.DLL path. This is the file you will need to reference in your
code.
In the client environment the .tlb file is not necessary. SIM.DLL will still need to be registered on any client machine when
dealing with Unmanaged Code (anything other than .NET). Upon deployment, the integrator should run the COM.bat file
instead.
Not very helpful! How do I reference the .TLB file in my code??

Can anyone point me in the right direction so that I can learn how to get it to work in VFP?

I also need to know how to figure out the properties of the DLL.

Thanks,

Yossi
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform