How to change C++ Const to VB Const

I need to change some C++ constants to VB constants (Which do not appear in the API32.text)

Ex:
In C++ CCS_Adjustable would be defined as

 #define CCS_ADJUSTABLE   0x00000020L

In VB It would be
 Public Const CCS_Adjustable = &H??????

How do I perform the conversion? I need to do this to many constants
LVL 2
orbitaltechAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Erick37Connect With a Mentor Commented:
Public Const CCS_Adjustable = &H20

I usually do a search and replace:
"#define" to "Const"
"0x" to "= &H"

Then manually remove the trailing "L"
0
 
orbitaltechAuthor Commented:
That's what i had done. But is that "L" needed? What does it reference?

0
 
Erick37Commented:
L means Long in C

If you wish, you could write:
Public Const CCS_Adjustable = &H20&

Which specifies that CCS_Adjustable is a Long.
0
 
orbitaltechAuthor Commented:
My hunch exactly.. Thanks for your help
0
 
Erick37Commented:
You're welcome. :-)
0
All Courses

From novice to tech pro — start learning today.