PDA

View Full Version : Visual Basic Program, __vbavarsub, __vbavarmul


NB
July 27th, 2001, 22:31
hello, i've got a visual basic 5 programs seems it uses 3 functions to make serial, look what i got with smartcheck

__vbavarmul
-lhs (variant)
|-signed long.Lval = 658448104 0x273F1EE8 // 658448104 = my input
-rhs (variant)
|-double.dbval = 2.8678

then next instruction is

__vbavarsub

unsigned long pvar 6681540 0x0065F3C4
unsigned long lpsrc 6681444 0x0065F364
unsigned long argc 7007268 0x006AEC24

then __vbavarint
number(variant)
|-double.dbval = 1887750985 that is the serial

can anyone help me, i need to know whats being multiplied, my input with what ? i think my input * something = the values that are in __vbavarsub but dunno witch one of them

Tnx in advance

Solomon
July 28th, 2001, 03:11
OLE Automation use a common structure named VARIANT to process most kinds of variables. VB functions(such as __vbavarsub, __vbavarmul) also use this structure to pass parameters. The following declaration is cut from <oaidl.h> from VC++.


typedef /* [wire_marshal] */ struct tagVARIANT VARIANT;

struct tagVARIANT
{
union
{
struct __tagVARIANT
{
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union
{
LONG lVal;
BYTE bVal;
SHORT iVal;
FLOAT fltVal;
DOUBLE dblVal;
VARIANT_BOOL boolVal;
_VARIANT_BOOL bool;
SCODE scode;
CY cyVal;
DATE date;
BSTR bstrVal;
IUnknown __RPC_FAR *punkVal;
IDispatch __RPC_FAR *pdispVal;
SAFEARRAY __RPC_FAR *parray;
BYTE __RPC_FAR *pbVal;
SHORT __RPC_FAR *piVal;
LONG __RPC_FAR *plVal;
FLOAT __RPC_FAR *pfltVal;
DOUBLE __RPC_FAR *pdblVal;
VARIANT_BOOL __RPC_FAR *pboolVal;
_VARIANT_BOOL __RPC_FAR *pbool;
SCODE __RPC_FAR *pscode;
CY __RPC_FAR *pcyVal;
DATE __RPC_FAR *pdate;
BSTR __RPC_FAR *pbstrVal;
IUnknown __RPC_FAR *__RPC_FAR *ppunkVal;
IDispatch __RPC_FAR *__RPC_FAR *ppdispVal;
SAFEARRAY __RPC_FAR *__RPC_FAR *pparray;
VARIANT __RPC_FAR *pvarVal;
PVOID byref;
CHAR cVal;
USHORT uiVal;
ULONG ulVal;
INT intVal;
UINT uintVal;
DECIMAL __RPC_FAR *pdecVal;
CHAR __RPC_FAR *pcVal;
USHORT __RPC_FAR *puiVal;
ULONG __RPC_FAR *pulVal;
INT __RPC_FAR *pintVal;
UINT __RPC_FAR *puintVal;
struct __tagBRECORD
{
PVOID pvRecord;
IRecordInfo __RPC_FAR *pRecInfo;
} __VARIANT_NAME_4;
} __VARIANT_NAME_3;
} __VARIANT_NAME_2;
DECIMAL decVal;
} __VARIANT_NAME_1;
};