Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling Cryptor DLL functions
Message
De
20/05/2003 06:44:07
 
 
À
20/05/2003 05:03:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00789915
Message ID:
00790347
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Hi,

Here's some sample code from Xitech. It's for VFP8 so you may need a couple of minor tweaks if you're using an earlier version
* use of Cryptor 4.0 DLL from VFP 8.0

DECLARE INTEGER CRYIni_InitializeEx	IN XiCrCore.dll INTEGER Mode, INTEGER Module, STRING Exclusions
DECLARE INTEGER CRYIni_UnInitialize	IN XiCrCore.dll
DECLARE INTEGER CRYUtl_Version		IN XiCrCore.dll
DECLARE INTEGER CRYMan_Register		IN XiCrCore.dll STRING strFilename, STRING strPassword, INTEGER dwFlags, INTEGER dwMethod
DECLARE INTEGER CRYMan_Unregister	IN XiCrCore.dll STRING strFilename
DECLARE INTEGER CRYUtl_Encode		IN XiCrCore.dll STRING strFilename, STRING strPassword, STRING strBackUpExt, INTEGER lKeepBackup, INTEGER dwMethod
DECLARE INTEGER CRYUtl_DeCode 		IN XiCrCore.dll STRING strFilename, STRING strPassword, STRING strBackUpExt, INTEGER lKeepBackup, INTEGER dwMethod


* names are case sensitive
DECLARE Integer GetModuleHandle in win32api String Modulename

IF VERSION(2)=0 && runtime 
	HookModule = GetModuleHandle("VFP8R.DLL")
	if HookModule # 0 
		Result = CRYIni_InitializeEx( 2, HookModule, ";" )
		if Result # 0
			Wait Wind "1 Cryptor failed to initialize."
		endif
	else	
		Wait Wind "Failed to get module handle."
	endif
ELSE
	* command line environment
	Result = CRYIni_InitializeEx( 2, 0, ";" )
	if Result # 0
		Wait Wind "2 Cryptor failed to initialize."
	endif
	ENDIF


* example registration 
= CRYMan_Register("TEST.DBF","TEST_PW",0,8)

*USE TEST
*BROWSE

*USE



= CRYIni_UnInitialize()
HTH,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform