Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call VFP function from .NET C# code?
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01612997
Message ID:
01617807
Vues:
53
>>>>I opened a text doc with Notepad, entered the above characters (using Alt-197 and so on). But when I try to save the text file, I get message that the characters in Unicode format will be lost. I believe the this function that Viv translated from VFP has to work on plain text. So maybe your colleague is right. How do you create a plain text document with the characters as above?
>>>
>>>This is what my colleague told me:
>>>
>>>Try encrypting a string in VFP using the Cipher50.fll with a key that is Chr(191) + chr(130) + chr(189) + chr(150)
>>>You'll find that the C# result is not a match for the VFP result.
>>>
>>>If you encrypt with regular low ascii, it works beautifully, though. Unfortunately, the way we encrypt the license files takes the client number, and encrypts it - then uses that result to encrypt the file. The chr() vaues I gave you above are the results of encrypting the client number 8151.
>>>
>>>Do you or Viv know what needs to be adjusted in that code to be able to work with high ascii chars as well?
>>
>>I don't use Cipher50.fll to encrypt the string in VFP. I use a function created by Sergey B. So maybe this is why your colleague is not getting the results he/you want.
>
>It's possible that Sergey's function didn't work with high ascii values either. Can you just test it with high ascii values?

I tested your string with Sergey's function and it works in VFP.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform