[vb_ro] Re: ASM in VB6.0 SP5

Cred ca ar trebui sa scrii un Dll clasic (nu COM) folosind Visual C, apoi sa 
referi acest Dll in clientul VB folosind decalare.
Asta daca nu vrei sa faci bizarii (absolut nerecomandate) - cum ar fi sa scrii 
codul asm intr-un array oarecare si apoi sa te folosesti de vreun callback 
pentru a pune windowsu sa-l execute :-).
Cosmin

        -----Original Message-----
        From: Gabriel-Dumitrel MOSCALU [mailto:gabriel.moscalu@xxxxxxxx] 
        Sent: Monday, February 23, 2004 7:29 PM
        To: vb_ro@xxxxxxxxxxxxx
        Subject: [vb_ro] ASM in VB6.0 SP5
        
        
        Salutare,
        
        Stie cineva daca se poate si daca da, cum pot face sa introduc o 
secventa ASM intr-o functie VB6.0?
        
        Mai exact, am urmatorul cod ASM (ca sa obtin detalii despre CPU):
        
        

                                pushfd                                 ; save 
EFLAGS to stack.
                                pop eax                               ; store 
EFLAGS in eax.
                                mov edx, eax                       ; save in 
ebx for testing later.
                                xor eax, 0200000h                ; switch bit 
21.
                                push eax                             ; copy 
"changed" value to stack.
                                popfd                                   ; save 
"changed" eax to EFLAGS.
                                pushfd
                                pop eax
                                xor eax, edx                         ; See if 
bit changeable.
                                jnz short cpuid_present         ; if so, mark 
                                mov eax, -1                          ; CPUID 
not present - disable its usage
                                jmp no_features

                        cpuid_present:
                                    mov eax, 0                         ; CPUID 
capable CPU - enable its usage.
                        
                        no_features:
                                     mov CPUIDPresent, eax ; Save the value in 
eax to a variable.
                        

         
        Va multumesc anticipat,

        Cu respect/Cordialement/Best regards/Mit freundlichen Grüssen/Com os 
melhores cumprimentos/Le saluda atentamente
        Gabriel Moscalu
        Support Expert
        Ferma S.A.
        www.ferma.fr
        +33 (0)1 46 12 58 80

Other related posts: