Tuesday, May 22nd 2012, 1:14am UTC+2

You are not logged in.

  • Login
  • Register

Posts: 5

Location: Preveza

Occupation: Photographer - Programmer

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

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