You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "george karrar" is male
  • "george karrar" started this thread

Posts: 5

Date of registration: Sep 26th 2011

Location: Preveza

Occupation: Photographer - Programmer

  • Send private message

1

Monday, September 26th 2011, 4:20pm

Enum tyoe variables...

Public Enum ERegistryValueTypes
'Predefined Value Types
REG_NONE = (0) 'No value type
REG_SZ = (1) 'Unicode nul terminated string
REG_EXPAND_SZ = (2) 'Unicode nul terminated string w/enviornment var
REG_BINARY = (3) 'Free form binary
REG_DWORD = (4) '32-bit number
REG_DWORD_LITTLE_ENDIAN = (4) '32-bit number (same as REG_DWORD)
REG_DWORD_BIG_ENDIAN = (5) '32-bit number
REG_LINK = (6) 'Symbolic Link (unicode)
REG_MULTI_SZ = (7) 'Multiple Unicode strings
REG_RESOURCE_LIST = (8) 'Resource list in the resource map
REG_FULL_RESOURCE_DESCRIPTOR = (9) 'Resource list in the hardware description
REG_RESOURCE_REQUIREMENTS_LIST = (10)
End Enum

i am using it in a class module..When find the first number I have a stop of compilation.

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

2

Monday, September 26th 2011, 5:22pm

Possible the reason is, that you wrote the numbers in parenthesis/round bracket.

For me it works fine.

In Class module called "Class1":

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Public Enum ERegistryValueTypes
  'Predefined Value Types
  REG_NONE = 0 'No value type
  REG_SZ = 1 'Unicode nul terminated string
  REG_EXPAND_SZ = 2 'Unicode nul terminated string w/enviornment var
  REG_BINARY = 3 'Free form binary
  REG_DWORD = 4 '32-bit number
  REG_DWORD_LITTLE_ENDIAN = 4 '32-bit number (same as REG_DWORD)
  REG_DWORD_BIG_ENDIAN = 5 '32-bit number
  REG_LINK = 6 'Symbolic Link (unicode)
  REG_MULTI_SZ = 7 'Multiple Unicode strings
  REG_RESOURCE_LIST = 8 'Resource list in the resource map
  REG_FULL_RESOURCE_DESCRIPTOR = 9 'Resource list in the hardware description
  REG_RESOURCE_REQUIREMENTS_LIST = 10
End Enum


In the Form called "Form1 with one button:

Jabaco Source

1
2
3
4
5
6
7
8
Dim myCls As New Class1

Public Sub Command1_Click()
  MsgBox(ERegistryValueTypes.REG_LINK)   ' 6
  
  Dim myRegValType As New ERegistryValueTypes(3)   ' REG_BINARY
  MsgBox (myRegValType.getName)
End Sub


On my computer it works corrent.

Rate this thread
WoltLab Burning Board