passer un programme de vb en vb.net

passer un programme de vb en vb.net - VB/VBA/VBS - Programmation

Marsh Posté le 17-02-2005 à 14:42:09    

Voila j'utilisais une dll en vb et mon programme qui suit en 2 parties marchait bien et lorsque je le passe en vb.net , ca marche plus , quelqu'un pourrait m aider ou me traduire en vb.net
 
programme de ma form

 
Private Sub CommandButton1_Click()
        Dim test As BIOVALIDATEUSER_INFOA
        Dim lResult As Long
        lResult = BioInit(0)
 
        test.lpstrUsername = "opleynet"
        test.lpstrDomain = "domaine"
        test.dwAuthProvider = 1
        test.dwStructSize = Len(test)
        'Call BioValidateUser Function
        '
        lResult = BioValidateUser(test)
End Sub
 
et mon.bas
 
Option Explicit
 
'
'BIOSDK Constants
'
 
'possible values for dwAuthProvider member
Global Const BIO_AUTHPROVIDER_WINDOWS = &H1
 
'possible values for dwDialogType member
Global Const BIO_DLGTYPE_BIOLOGON = &H0
 
'possible values for dwFlags member
Global Const BIO_APPEARANCE_READONLY = &H1
Global Const BIO_FUNCTION_ENABLEHOOK = &H10000
Global Const BIO_FUNCTION_RELOADWIZARD = &H20000
Global Const BIO_FUNCTION_THREADSAFE = BIO_FUNCTION_RELOADWIZARD
Global Const BIO_FUNCTION_DYNAMICLIBS = BIO_FUNCTION_RELOADWIZARD
 
'errors
Global Const BIOERR_GENERALCODES = &H8000
Global Const BIOERR_STRUCTSIZE = &H8001
Global Const BIOERR_INITIALIZATION = &H8002
Global Const BIOERR_BUFFERTOOSMALL = &H8003
Global Const BIOERR_NOHOOK = &H8004
Global Const BIOERR_ITCREDSINIT = &H8005
Global Const BIOERR_USERCANCEL = &H8006
 
'
'BIOSDK Structures
'
Public Type BIOVALIDATEUSER_INFOA
    dwStructSize As Long
    hwndOwner As Long
    hInstance As Long
    lpstrUsername As String
    lpstrDomain As String
    dwAuthProvider As Long
    dwDialogType As Long
    lpstrTitle As String
    dwFlags As Long
    dwExtendedResult As Long
    lCustData As Long
    lpfnHook As Long
    lpstrTemplateName As String
End Type
     
Public Type BIOTEXTOPTIONSA
    dwStructSize As Long
    lpstrProductName As String
End Type
 
'
'BIOSDK API
'
 
Public Declare Function BioValidateUser _
    Lib "BioSDK.dll" _
    Alias "BioValidateUserA" _
    (ByRef UserInfo As BIOVALIDATEUSER_INFOA) _
    As Long
 
Public Declare Function BioInit _
    Lib "BioSDK.dll" _
    (ByVal Flags As Long) _
    As Long
     
 
 

Reply

Marsh Posté le 17-02-2005 à 14:42:09   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed