New topic: 

FIXED - How to porting a TYPE declaration on RB?

<http://forums.realsoftware.com/viewtopic.php?t=33785>

         Page 1 of 1
   [ 7 posts ]                 Previous topic | Next topic          Author  
Message        designSoftware          Post subject: FIXED - How to porting a 
TYPE declaration on RB?Posted: Fri May 14, 2010 12:47 pm                        
 
Joined: Wed Jun 04, 2008 3:20 pm
Posts: 10
Location: Lecce                Hi all,
how can i port this code of a TYPE declaration in RealBASIC?
Code:Type PROCESSENTRY32 
  dwSize As Long 
  cntUsage As Long 
  th32ProcessID As Long 
  th32DefaultHeapID As Long 
  th32ModuleID As Long 
  cntThreads As Long 
  th32ParentProcessID As Long 
  pcPriClassBase As Long 
  dwFlags As Long 
  szexeFile As String * 260 
End Type 
I've hear about something to a STRUCTURE declaration, after changing Long to 
Int32 of course.
Thanks!      
_________________
Design Software
Sviluppa il tuo potenziale e rendilo visibile in rete
Stay connected in chat at room ##rb on irc.freenode.net
For the italian members, stay connected in chat at room #realbasic or 
#realstudio on irc.azzurra.org      

    Last edited by designSoftware on Fri May 14, 2010 6:21 pm, edited 1 time in 
total.   
                             Top                 timhare          Post subject: 
Re: How to porting a TYPE declaration on RB?Posted: Fri May 14, 2010 1:01 pm    
                     
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 7751
Location: Portland, OR  USA                Yes, you can make a Structure for 
this.  Add a Module to your project. Edit the module.  Select the menus Project 
-> Add -> Structure.  Set the Name to ProcessEntry32.  Enter the fields of the 
structure one at a time in the order you want them.

You use it like

Dim entry as ProcessEntry32

HTH,
Tim   
                             Top                designSoftware          Post 
subject: Re: How to porting a TYPE declaration on RB?Posted: Fri May 14, 2010 
1:20 pm                         
Joined: Wed Jun 04, 2008 3:20 pm
Posts: 10
Location: Lecce                Mhhnn ok i try it. But i have some problem...did 
you can attach an example here? Just with two definition, Thanks      
_________________
Design Software
Sviluppa il tuo potenziale e rendilo visibile in rete
Stay connected in chat at room ##rb on irc.freenode.net
For the italian members, stay connected in chat at room #realbasic or 
#realstudio on irc.azzurra.org  
                             Top                 timhare          Post subject: 
Re: How to porting a TYPE declaration on RB?Posted: Fri May 14, 2010 1:40 pm    
                     
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 7751
Location: Portland, OR  USA                Can't attach an example, sorry.  
What problems are you experiencing?   
                             Top                designSoftware          Post 
subject: Re: How to porting a TYPE declaration on RB?Posted: Fri May 14, 2010 
1:57 pm                         
Joined: Wed Jun 04, 2008 3:20 pm
Posts: 10
Location: Lecce                Now i've this tree in my new app
[RBIcon]  |- App
[WinIcon]  |- Window1
[MenuIcon] |- MenuBar1
[WorldIcon] | -Module1
[FilesIcon] | |-ProcessEntry32

timhare wrote:Select the menus Project -> Add -> Structure.  Set the Name to 
ProcessEntry32.
I'm on RB 2010 R2 in italian, so i think that Structure is a set of file 
types...if that is true i'll find 6 fields when i try to add custom structure.

View Name
Object Name
MacType
MacCreator
Extension
Icon

What i've to insert in that fields?      
_________________
Design Software
Sviluppa il tuo potenziale e rendilo visibile in rete
Stay connected in chat at room ##rb on irc.freenode.net
For the italian members, stay connected in chat at room #realbasic or 
#realstudio on irc.azzurra.org  
                             Top                 timhare          Post subject: 
Re: How to porting a TYPE declaration on RB?Posted: Fri May 14, 2010 2:08 pm    
                     
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 7751
Location: Portland, OR  USA                No, Structure is not a FileTypeSet.  
Double click Module1 to open the code editor for it.  Then Structure will 
appear on the Project -> Add menu.   
                             Top                designSoftware          Post 
subject: Re: How to porting a TYPE declaration on RB?Posted: Fri May 14, 2010 
6:20 pm                         
Joined: Wed Jun 04, 2008 3:20 pm
Posts: 10
Location: Lecce                Ok i found it. Thanks!      
_________________
Design Software
Sviluppa il tuo potenziale e rendilo visibile in rete
Stay connected in chat at room ##rb on irc.freenode.net
For the italian members, stay connected in chat at room #realbasic or 
#realstudio on irc.azzurra.org  
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 7 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to