Click here to Skip to main content
14,920,690 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
[]this is from the module of vb 6 and i wanted to convert it or make it work on vb.net.. can anyone help..?

ill mail you the project if i need to.. thanks..



CODE BELOW :::




VB
Attribute VB_Name = "NBioAPI"
' #################################################################################################
'
'   NBioAPI.bas   : Define constants for NBioAPI
'
'   Copyright     : NITGEN Co., Ltd.
'
' #################################################################################################

' -------------------------------------------------------------------------------------------------
'   Error code
' -------------------------------------------------------------------------------------------------

Global Const NBioAPIERROR_NONE = 0


' -------------------------------------------------------------------------------------------------
'   General
' -------------------------------------------------------------------------------------------------

' True / False
Global Const NBioAPI_TRUE = 1
Global Const NBioAPI_FALSE = 0

' -------------------------------------------------------------------------------------------------
'   Device
' -------------------------------------------------------------------------------------------------

' Constant for DeviceID
Global Const NBioAPI_DEVICE_ID_NONE = 0
Global Const NBioAPI_DEVICE_ID_FDP02_0 = 1
Global Const NBioAPI_DEVICE_ID_FDU01_0 = 2
Global Const NBioAPI_DEVICE_ID_OSU02_0 = 3
Global Const NBioAPI_DEVICE_ID_FDU11_0 = 4
Global Const NBioAPI_DEVICE_ID_FSC01_0 = 5
Global Const NBioAPI_DEVICE_ID_FDU03_0 = 6
Global Const NBioAPI_DEVICE_ID_AUTO_DETECT = 255

' Constant for Device Name
Global Const NBioAPI_DEVICE_NAME_FDP02 = 1
Global Const NBioAPI_DEVICE_NAME_FDU01 = 2
Global Const NBioAPI_DEVICE_NAME_OSU02 = 3
Global Const NBioAPI_DEVICE_NAME_FDU11 = 4
Global Const NBioAPI_DEVICE_NAME_FSC01 = 5
Global Const NBioAPI_DEVICE_NAME_FDU03 = 6

' -------------------------------------------------------------------------------------------------
'   BSP
' -------------------------------------------------------------------------------------------------

' Constant for Security Level
Global Const NBioAPI_FIR_SECURITY_LEVEL_LOWEST = 1
Global Const NBioAPI_FIR_SECURITY_LEVEL_LOWER = 2
Global Const NBioAPI_FIR_SECURITY_LEVEL_LOW = 3
Global Const NBioAPI_FIR_SECURITY_LEVEL_BELOW_NORMAL = 4
Global Const NBioAPI_FIR_SECURITY_LEVEL_NORMAL = 5
Global Const NBioAPI_FIR_SECURITY_LEVEL_ABOVE_NORMAL = 6
Global Const NBioAPI_FIR_SECURITY_LEVEL_HIGH = 7
Global Const NBioAPI_FIR_SECURITY_LEVEL_HIGHER = 8
Global Const NBioAPI_FIR_SECURITY_LEVEL_HIGHEST = 9

' Purpose for FIR
Global Const NBioAPI_FIR_PURPOSE_VERIFY = 1
Global Const NBioAPI_FIR_PURPOSE_IDENTIFY = 2
Global Const NBioAPI_FIR_PURPOSE_ENROLL = 3
Global Const NBioAPI_FIR_PURPOSE_ENROLL_FOR_VERIFICATION_ONLY = 4
Global Const NBioAPI_FIR_PURPOSE_ENROLL_FOR_IDENTIFICATION_ONLY = 5
Global Const NBioAPI_FIR_PURPOSE_AUDIT = 6
Global Const NBioAPI_FIR_PURPOSE_UPDATE = 10

' Finger ID
Global Const NBioAPI_FINGER_ID_UNKNOWN = 0
Global Const NBioAPI_FINGER_ID_RIGHT_THUMB = 1
Global Const NBioAPI_FINGER_ID_RIGHT_INDEX = 2
Global Const NBioAPI_FINGER_ID_RIGHT_MIDDLE = 3
Global Const NBioAPI_FINGER_ID_RIGHT_RING = 4
Global Const NBioAPI_FINGER_ID_RIGHT_LITTLE = 5
Global Const NBioAPI_FINGER_ID_LEFT_THUMB = 6
Global Const NBioAPI_FINGER_ID_LEFT_INDEX = 7
Global Const NBioAPI_FINGER_ID_LEFT_MIDDLE = 8
Global Const NBioAPI_FINGER_ID_LEFT_RING = 9
Global Const NBioAPI_FINGER_ID_LEFT_LITTLE = 10

' Window Style
Global Const NBioAPI_WINDOW_STYLE_POPUP = 0
Global Const NBioAPI_WINDOW_STYLE_INVISIBLE = 1     'only for NBioAPI_Capture()
Global Const NBioAPI_WINDOW_STYLE_CONTINUOUS = 2

Global Const NBioAPI_WINDOW_STYLE_NO_FPIMG = 65536
Global Const NBioAPI_WINDOW_STYLE_TOPMOST = 131072  ' currently not used (after v2.3)
Global Const NBioAPI_WINDOW_STYLE_NO_WELCOME = 262144
Global Const NBioAPI_WINDOW_STYLE_NO_TOPMOST = 524288

' -------------------------------------------------------------------------------------------------
'   Export Data
' -------------------------------------------------------------------------------------------------
Global Const MINCONV_TYPE_FDP = 0
Global Const MINCONV_TYPE_FDU = 1
Global Const MINCONV_TYPE_FDA = 2
Global Const MINCONV_TYPE_OLD_FDA = 3
Global Const MINCONV_TYPE_FDAC = 4
Global Const MINCONV_TYPE_FIM10_HV = 5
Global Const MINCONV_TYPE_FIM10_LV = 6
Global Const MINCONV_TYPE_FIM01_HV = 7
Global Const MINCONV_TYPE_FIM01_HD = 8
Global Const MINCONV_TYPE_FELICA = 9
Global Const MINCONV_TYPE_EXTENSION = 10
Global Const MINCONV_TYPE_TEMPLATESIZE_32 = 11
Global Const MINCONV_TYPE_TEMPLATESIZE_48 = 12
Global Const MINCONV_TYPE_TEMPLATESIZE_64 = 13
Global Const MINCONV_TYPE_TEMPLATESIZE_80 = 14
Global Const MINCONV_TYPE_TEMPLATESIZE_96 = 15
Global Const MINCONV_TYPE_TEMPLATESIZE_112 = 16
Global Const MINCONV_TYPE_TEMPLATESIZE_128 = 17
Global Const MINCONV_TYPE_TEMPLATESIZE_144 = 18
Global Const MINCONV_TYPE_TEMPLATESIZE_160 = 19
Global Const MINCONV_TYPE_TEMPLATESIZE_176 = 20
Global Const MINCONV_TYPE_TEMPLATESIZE_192 = 21
Global Const MINCONV_TYPE_TEMPLATESIZE_208 = 22
Global Const MINCONV_TYPE_TEMPLATESIZE_224 = 23
Global Const MINCONV_TYPE_TEMPLATESIZE_240 = 24
Global Const MINCONV_TYPE_TEMPLATESIZE_256 = 25
Global Const MINCONV_TYPE_TEMPLATESIZE_272 = 26
Global Const MINCONV_TYPE_TEMPLATESIZE_288 = 27
Global Const MINCONV_TYPE_TEMPLATESIZE_304 = 28
Global Const MINCONV_TYPE_TEMPLATESIZE_320 = 29
Global Const MINCONV_TYPE_TEMPLATESIZE_336 = 30
Global Const MINCONV_TYPE_TEMPLATESIZE_352 = 31
Global Const MINCONV_TYPE_TEMPLATESIZE_368 = 32
Global Const MINCONV_TYPE_TEMPLATESIZE_384 = 33
Global Const MINCONV_TYPE_TEMPLATESIZE_400 = 34
' -------------------------------------------------------------------------------------------------
'   Export Image
' -------------------------------------------------------------------------------------------------

' Constant for FP Image
Global Const NBioAPI_IMG_TYPE_RAW = 1
Global Const NBioAPI_IMG_TYPE_BMP = 2
Global Const NBioAPI_IMG_TYPE_JPG = 3
Posted
Comments
Member 10703077 7-Apr-14 22:26pm
   
can you help me follow this VB6 instructions and make this work on vb.net 2012? thanks..

this is the first part of the manual.


2.1 Module initialization and closure
2.1.1 Initializing the module
There are two ways to initialize the NBioBSP COM module: declare a new object or use the CreateObject() function. Using either method will
have the same result.
􀂄 Method 1
Dim objNBioBSP As NBioBSPCOMLib.NBioBSP ‘Declaration NBioBSPCOM Object
...
Set objNBioBSP = New NBioBSPCOMLib.NBioBSP
􀂄 Method 2
Dim objNBioBSP As NBioBSPCOMLib.NBioBSP ‘ Declaration NBioBSPCOM Object
...
Set objNBioBSP = CreateObject(“NBioBSPCOM.NBioBSP”)

Your code just contains a bunch of global constants. You cannot have globals in VB.NET code, so you have to implement a workaround (see, for instance, here: "vb.net global constant"[^]). Once that is understood, it is really simple to automatically (or semi-automatically) convert such a piece of code.
   
Comments
Member 10703077 7-Apr-14 6:03am
   
can you help me convert this? im using visual studio 2012

S Houghtelin 7-Apr-14 8:07am
   
The mathod demonstrated in the link provided by CPallini will do what you ask. I suggest thet you attempt the method on your own. You will learn something new and add another skill to your knowledge toolkit. Simply asking other people to convert your code is not what this site is for. I would suggest you try first and if it doesn't work, then ask for help. Good luck.
Member 10703077 7-Apr-14 22:11pm
   
No, i don't want him to convert it for me, i just wanted you guys to see what i wanted to do because i don't have a clue where to begin. xD

can you help me follow this VB6 instructions and make this work on vb.net 2012? thanks..

this is the first part of the manual.


2.1 Module initialization and closure
2.1.1 Initializing the module
There are two ways to initialize the NBioBSP COM module: declare a new object or use the CreateObject() function. Using either method will
have the same result.
􀂄 Method 1
Dim objNBioBSP As NBioBSPCOMLib.NBioBSP ‘Declaration NBioBSPCOM Object
...
Set objNBioBSP = New NBioBSPCOMLib.NBioBSP
􀂄 Method 2
Dim objNBioBSP As NBioBSPCOMLib.NBioBSP ‘ Declaration NBioBSPCOM Object
...
Set objNBioBSP = CreateObject(“NBioBSPCOM.NBioBSP”)
   
Sure, a 5.
—SA
Create a static class and add all these constants in it. Use class_name.constant_name in the rest of your code wherever they are used.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900