string mcrypt_encrypt ( string $cipher , string $key , string $data , string $mode [, string $iv ] )
ret = LoadLibrary(App.Path & "\" & LibName)
pa = GetProcAddress(ret, "mcrypt_encrypt")
MCRYPT mcrypt_module_open(char *algorithm,
char *a_directory, char *mode,
char *m_directory);
int mcrypt_module_close(MCRYPT td);
int mcrypt_generic_init(const MCRYPT td, void *key, int lenofkey,
void *IV);
int mcrypt_generic_deinit(const MCRYPT td);
int mdecrypt_generic(MCRYPT td, void *plaintext, int len);
int mcrypt_generic(MCRYPT td, void *plaintext, int len);
#define RTCALL _stdcall
[
uuid(C6799410-4431-11d2-A7F1-00A0C91110C3),
lcid (0), version(6.0), helpstring("McryptSupport for VB6")
]
Я не пойму откуда взять uuid ?
library
{
module
{
function
}
}
library
{
#define LONG int
#define INTEGER short
typedef [uuid(C976801A-64E5-4c51-A94D-F4BB74363CD0)] short IntByVal;
typedef [uuid(68F3A023-A663-4bac-A666-449F16223E5B)] short* IntByRef;
typedef [uuid(EA1387E8-F516-460f-9E45-97F835426AE1)] int LongByVal;
typedef [uuid(CA7559FA-0DE6-456d-92C0-8EAB8D59BD87)] int* LongByRef;
typedef [uuid(3D57696A-BFC4-46f6-9F8C-6BE64F7FA76D)] BSTR StrByVal;
typedef [uuid(4B44C940-89CD-4960-B7FF-5788E08BEC85)] BSTR* StrByRef;
typedef [uuid(A10DA8C9-80CA-456b-AAE3-B5ACCA4C29F8)] LPSTR StrAnsiByVal;
typedef [uuid(14A19CF8-3FC9-4167-AF70-2A2893EDAB02)] LPSTR* StrAnsiByRef;
typedef [uuid(BBE81479-95BB-4ff5-900F-12DB1A72E03E)] unsigned char BYTE;
typedef [uuid(20A967B7-DB8C-4d28-8815-ED42DA923967)] void* ANY;
module
{
LONG mcrypt_module_open(StrAnsiByRef algorithm, StrAnsiByRef a_directory, StrAnsiByRef mode, StrAnsiByRef m_directory);
LONG mcrypt_module_close(LongByVal td);
LONG mcrypt_generic_init(LongByVal td, StrAnsiByRef key, LongByVal lenofkey);
LONG mcrypt_generic_deinit(LongByVal td);
LONG mdecrypt_generic(LongByVal td, StrAnsiByRef plaintext, LongByVal len);
LONG mcrypt_generic(LongByVal td, StrAnsiByRef plaintext, LongByVal len);
}
}
Bad dll calling convention
Private Declare Function mUpperCase Lib "Mydll.DLL" Alias "UpperCase" (ByVal lpStr As String) As Long
call UpperCase,offset Mystring
Option Explicit
Private Declare Function mUpperCase Lib "E:\vb\prog\TASM_VB_test\Mydll.DLL" Alias "UpperCase" (ByVal lpStr As String) As Long
Private Sub Form_Load()
Dim tmpStr As String
tmpStr = "привет"
mUpperCase tmpStr
MsgBox tmpStr '
End
End Sub
StrConv(tmpStr, vbFromUnicode)
alibek писал(а):Прям тут, в FAQ перенесем.
Сейчас этот форум просматривают: AhrefsBot, Google-бот и гости: 6