How to name own structures?

Windows specific forum
forumuser
User
User
Posts: 98
Joined: Wed Apr 18, 2018 8:24 am

How to name own structures?

Post by forumuser »

Hi,

The Windows API normally uses something like:
_SYSTEM_PROCESS_INFO

Does it matter how I name my own structures (normally inside a module) or better:
What happens if I accidentally use the same name as a Windows API structure
(but with a completely different content)? Do they "conflict"?
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: How to name own structures?

Post by RSBasic »

You can use your own name for the usage:

Code: Select all

Define YourOwnName._SYSTEM_PROCESS_INFO

Debug YourOwnName\...
forumuser wrote:What happens if I accidentally use the same name as a Windows API structure
Then there is a compiler error. PB tells you it's not possible:
Line x: Structure already declared: xxx (in a resident file).
Image
Image
forumuser
User
User
Posts: 98
Joined: Wed Apr 18, 2018 8:24 am

Re: How to name own structures?

Post by forumuser »

Thank you, RSBasic!
Post Reply