WinApi Variable type tool for the IDE

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 796
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

WinApi Variable type tool for the IDE

Post by Zebuddi123 »

Hi to all A small IDE tool ( i made for my personal use ) to help with win api variable types to pb variable type conversion. Some of the variable pbtype may not correct :oops: :lol: and not all types may have been included

149 msdn types included.

Please correct and or add to variable definitions data taken for forum(kale and freak :D :wink: ) and mdsn

Updated: 21:45 --- Auto resize window/gadget depending on the length of the msg string.
Updated: added stickywindow() --- just to keep on top

Place ide cursor on the variable of interest and (for me right handed) press lctrl+q and small window pops up under the mouse cursor with pbtype to use auto closes after 3 secs (ajust addwindowtimer() for more/less)
Image


IDE tool set up

Image

zebuddi. :)

Code: Select all

;
Global Window_0 , Window_0_Text_0
Global msg.s , pbtype.s , Text.s , Cursor.POINT , Text.s

Define ScintillaID.i = Val( GetEnvironmentVariable( "PB_TOOL_Scintilla" )  ) , Event.l

Procedure.s GetPBType( Ctype.s ) 
	
	Select Ctype.s
		Case "ATOM"
			pbtype.s = "No PB Type  ---   ATOM Tables are Sytem-defined String Tables , there's no PB-Type for that."
			
		Case "BOOL"
			pbtype.s = "BYTE or WORD or LONG  ---  #TRUE( 1 ) , Or #False( 0 ) - can be BYTE , WORD And LONG"
			
		Case "BOOLEAN"
			pbtype.s = "BYTE or WORD or LONG  ---  #TRUE( 1 ) , Or #FALSE( 0 ) - can be BYTE , WORD And LONG"
			
		Case "BYTE"
			pbtype.s = "BYTE  ---  A byte( 8 bits ) "
			
		Case "CALLBACK"
			pbtype.s = "Calling convention For CALLBACK functions , also no Type"
			
		Case "CCHAR"
			pbtype.s = "BYTE  ---  An 8-bit Windows( ANSI ) character."
			
		Case "CHAR"
			pbtype.s = "BYTE  ---  Character , use BYTE"
			
		Case "COLORREF"
			pbtype.s = "LONG  ---  Color Format( RGB ) ( LONG With Value $000000 - $FFFFFF ) "
			
		Case "CONSTANT"
			pbtype.s = "# + Variable_Name  ---  Constant , any of Type."
			
		Case "CRITICAL_SECTION"
			pbtype.s = "Critical Section Variable , don't know of what Type"
			
		Case "DOUBLE"
			pbtype.s = "DOUBLE"
			
		Case "DWORD"
			pbtype.s = "LONG  ---  A 32-bit unsigned integer. The range is 0 through 4294967295 decimal"
			
		Case "DWORD32"
			pbtype.s = "LONG A 32 bit unsigned integer"
			
		Case "DWORDLONG"
			pbtype.s = "INTEGER  ---  A 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal"
			
		Case "DWORD64"
			pbtype.s = "QUAD  ---  A 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal."
			
		Case "DWORD_PTR"
			pbtype.s = "LONG  ---( Used For Pointers ) "
			
		Case "FLOAT"
			pbtype.s = "FLOAT  ---  A floating-point variable"
			
		Case "HACCEL"
			pbtype.s = "INTEGER  ---   Handle To an accelerator table."
			
		Case "HANDLE"
			pbtype.s = "INTEGER  ---  Handle To an object."
			
		Case "HBITMAP"
			pbtype.s = "INTEGER  ---  Handle To a bitmap."
			
		Case "HBRUSH"
			pbtype.s = "INTEGER  ---  Handle To a brush."
			
		Case "HCOLORSPACE"
			pbtype.s = "INTEGER  ---  A handle to a color space"
			
		Case "HCONV"
			pbtype.s = "INTEGER  ---  Handle To a dynamic Data exchange( DDE ) conversation."
			
		Case "HCONVLIST"
			pbtype.s = "INTEGER  ---  Handle To a DDE conversation list."
			
		Case "HCURSOR"
			pbtype.s = "INTEGER  ---  Handle To a cursor."
			
		Case "HDC"
			pbtype.s = "INTEGER  ---  Handle To a cursor."
			
		Case "HDDEDATA"
			pbtype.s = "INTEGER  ---  Handle To DDE Data."
			
		Case "HDESK"
			pbtype.s = "INTEGER  ---  Handle To a desktop."
			
		Case "HDROP"
			pbtype.s = "INTEGER  ---  Handle To an Internal drop Structure."
			
		Case "HDWP"
			pbtype.s = "INTEGER  ---  Handle To a deferred window Position Structure."
			
		Case "HENHMETAFILE"
			pbtype.s = "INTEGER  ---  Handle To an enhanced metafile."
			
		Case "HFILE"
			pbtype.s = "INTEGER  ---  A handle To a file opened by OpenFile , Not CreateFile."
			
		Case "HFONT"
			pbtype.s = "INTEGER  ---  A handle to a font"
			
		Case "HGDIOBJ"
			pbtype.s = "INTEGER  ---  A handle to a GDI object"
			
		Case "HGLOBAL"
			pbtype.s = "INTEGER  ---  A handle to a global memory block"
			
		Case "HHOOK"
			pbtype.s = "INTEGER  ---  A handle to a hook"
			
		Case "HICON"
			pbtype.s = "INTEGER  ---  A handle to an icon"
			
		Case "HIMAGELIST"
			pbtype.s = "INTEGER  ---  A handle to an imagelist"
			
		Case "HIMC"
			pbtype.s = "INTEGER  ---  A handle to an compostion message"
			
		Case "HINSTANCE"
			pbtype.s = "INTEGER  --- A handle to an instance"
			
		Case "HKEY"
			pbtype.s = "INTEGER  ---  A handle to a registry key"
			
		Case "HKL"
			pbtype.s = "INTEGER  ---  An input locale identifier"
			
		Case "HLOCAL"
			pbtype.s = "INTEGER  ---  A handle to a local memory block"
			
		Case "HMENU"
			pbtype.s = "INTEGER  ---  A handle to a menu"
			
		Case "HMETAFILE"
			pbtype.s = "INTEGER  ---  A handle to a metafile"
			
		Case "HMODULE"
			pbtype.s = "INTEGER  ---  A handle to a module. "
			
		Case "HMONITOR"
			pbtype.s = "INTEGER  ---  A handle to a display monitor"
			
		Case "HPALLETTE"
			pbtype.s = "INTEGER  ---  A handle to a pallette"
			
		Case "HPEN"
			pbtype.s = "INTEGER  ---  A handle to a pen"
			
		Case "HRGN"
			pbtype.s = "INTEGER  ---  A handle to a region"
			
		Case "HRSRC"
			pbtype.s = "INTEGER  ---  A handle to a resource"
			
		Case "HSZ"
			pbtype.s = "INTEGER  ---  A handle to a DDE string."
			
		Case "HWINSTA"
			pbtype.s = "INTEGER  ---  A handle to a window station"
			
		Case "HWND"
			pbtype.s = "INTEGER  ---  A handle to a window"
			
		Case "INT"
			pbtype.s = "LONG  ---  A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal"
			
		Case "INT32"
			pbtype.s = "LONG  ---  A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal"
			
		Case "INT64"
			pbtype.s = "QUAD  ---  A 64-bit (8-byte) integer"
			
		Case "INT_PTR"
			pbtype.s = "LONG   ---  Pointer  ---  A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal"
			
		Case "LANGID"
			pbtype.s = "LONG ---  Language identifier"
			
		Case "LCID"
			pbtype.s = "LONG  ---  Locale identifier"
			
		Case "LCTYPE"
			pbtype.s = "LONG  ---  Locale information Type , LONG"
			
		Case "LGRPID"
			pbtype.s = "LONG  ---  A language group identifier. For a list , see EnumLanguageGroupLocales."
			
		Case "LONG"
			pbtype.s = "LONG  ---  A 32-bit signed integer. The range is 2147483648 through 2147483647 decimal.."
			
		Case "LONGLONG"
			pbtype.s = "QUAD  ---  A 64-bit signed integer. The range is 9223372036854775808 through 9223372036854775807 decimal"
			
		Case "LONG32"
			pbtype.s = "LONG  ---  A LONG32 is a 32-bit signed integer."
			
		Case "LONG64"
			pbtype.s = "QUAD  ---  A LONG64 is a 64-bit signed integer."
			
		Case "LPARAM"
			pbtype.s = "LONG  ---  message parameter"
			
		Case "LPBOOL"
			pbtype.s = "LONG  ---  A pointer to a BOOL"
			
		Case "LPBYTE"
			pbtype.s = "LONG  ---  A pointer to a BYTE"
			
		Case "LPCOLORREF"
			pbtype.s = "LONG  ---  A pointer to a COLORREF value"
			
		Case "LPCRITICAL_SECTION"
			pbtype.s = "LONG  ---  A pointer to the critical section object."
			
		Case "LPCSTR"
			pbtype.s = "LONG  ---  A pointer to a constant null-terminated string of 8-bit Windows( ANSI ) characters"
			
		Case "LPCTSTR"
			pbtype.s = "LONG  ---  An LPCWSTR if UNICODE is defined , an LPCSTR otherwise."
			
		Case "LPCVOID"
			pbtype.s = "LONG  ---  A pointer to a constant of any type"
			
		Case "LPCWSTR"
			pbtype.s = "LONG  ---  A pointer to a constant null-terminated string of 16-bit Unicode characters"
			
		Case "LPDWORD"
			pbtype.s = "LONG  ---  A pointer to a DWORD"
			
		Case "LPFINDREPLACE"
			pbtype.s = "LONG  ---  A pointer To a findreplace Structure"
			
		Case "LPHANDLE"
			pbtype.s = "LONG  ---  A pointer to a HANDLE"
			
		Case "LPINT"
			pbtype.s = "LONG  ---  A pointer to an INT"
			
		Case "LPLONG"
			pbtype.s = "LONG  ---  A pointer to a LONG"
			
		Case "LPSTR"
			pbtype.s = "LONG  ---  A pointer to a null-terminated string of 8-bit Windows( ANSI ) characters."
			
		Case "LPTSTR"
			pbtype.s = "LONG  ---  An LPWSTR if UNICODE is defined , an LPSTR otherwise."
			
		Case "LPVOID"
			pbtype.s = "LONG  ---  A pointer to any type"
			
		Case "LPWORD"
			pbtype.s = "LONG  ---  A pointer to a WORD"
			
		Case "LPWSTR"
			pbtype.s = "LONG  ---  A pointer to a null-terminated string of 16-bit Unicode characters. "
			
		Case "LRESULT"
			pbtype.s = "LONG  ---  Signed result of message processing"
			
		Case "LONG_PTR"
			pbtype.s = "LONG  ---  A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal"
			
		Case "LUID"
			pbtype.s = "Locally unique identifier.( DOUBLE Value ) To be accessed only by functions , Not directly"
			
		Case "PBOOL"
			pbtype.s = "LONG  ---  A pointer to a BOOL"
			
		Case "PBOOLEAN"
			pbtype.s = "LONG  ---  A pointer to a BOOLEAN."
			
		Case "PBYTE"
			pbtype.s = "LONG  ---  A pointer to a BYTE"
			
		Case "PCHAR"
			pbtype.s = "LONG  ---  A pointer to a CHAR."
			
		Case "PCRITICAL_SECTION"
			pbtype.s = "LONG  ---  A pointer to a CHAR."
			
		Case "PCSTR"
			pbtype.s = "LONG  ---  A pointer to a constant null-terminated string of 8-bit Windows( ANSI ) characters. "
			
		Case "PCTSTR"
			pbtype.s = "LONG  ---  A pointer to a constant null-terminated string of 8-bit Windows( ANSI ) characters."
			
		Case "PCWCH"
			pbtype.s = "LONG  ---  A pointer to a constant null-terminated string of 8-bit Windows( ANSI ) characters"
			
		Case "PCWSTR"
			pbtype.s = "LONG  ---  A pointer to a constant null-terminated string of 16-bit Unicode characters."
			
		Case "PDWORD"
			pbtype.s = "LONG  ---  A pointer to a DWORD"
			
		Case "PDWORDLONG"
			pbtype.s = "LONG  ---  A pointer to a DWORDLONG."
			
		Case "PFLOAT"
			pbtype.s = "LONG  ---  A pointer to a FLOAT"
			
		Case "PHANDLE"
			pbtype.s = "LONG  ---  A pointer to a HANDLE."
			
		Case "PHKEY"
			pbtype.s = "LONG  ---  A pointer to an HKEY"
			
		Case "PINT"
			pbtype.s = "LONG  ---  A pointer to an INT"
			
		Case "PLCID"
			pbtype.s = "LONG  ---  A pointer to an LCID."
			
		Case "PLONG"
			pbtype.s = "LONG  ---  A pointer to a LONG."
			
		Case "PLUID"
			pbtype.s = "LONG  ---  A pointer to a LONG."
			
		Case "POINTER_32"
			pbtype.s = "LONG  ---  A pointer to a LONG."
			
		Case "POINTER_64"
			pbtype.s = "QUAD  ---  A pointer to a LONG."
			
		Case "PLONGLONG"
			pbtype.s = "LONG  ---  A pointer to a LONGLONG"
			
		Case "PSHORT"
			pbtype.s = "LONG  ---  A pointer to a SHORT."
			
		Case "PSTR"
			pbtype.s = "LONG  ---  A pointer to a null-terminated string of 8-bit Windows( ANSI ) characters"
			
		Case "PTBYTE"
			pbtype.s = "LONG  ---  A pointer to a TBYTE."
			
		Case "PTCHAR"
			pbtype.s = "LONG  ---  A pointer to a TCHAR."
			
		Case "PTSTR"
			pbtype.s = "LONG  ---  A PWSTR if UNICODE is defined , a PSTR otherwise."
			
		Case "PUCHAR"
			pbtype.s = "LONG  ---  A pointer to a UCHAR"
			
		Case "PUINT"
			pbtype.s = "LONG  ---  A pointer to a UINT"
			
		Case "PULONG"
			pbtype.s = "LONG  ---  A pointer to a ULONG"
			
		Case "PULONGLONG"
			pbtype.s = "LONG  ---  A pointer to a ULONGLONG"
			
		Case "PUSHORT"
			pbtype.s = "LONG  ---  A pointer to a USHORT"
			
		Case "PVOID"
			pbtype.s = "LONG  ---  A pointer to any type."
			
		Case "PWCHAR"
			pbtype.s = "LONG  ---  A pointer to a WCHAR"
			
		Case "PWORD"
			pbtype.s = "LONG  ---  A pointer to a WORD"
			
		Case "PWSTR"
			pbtype.s = "LONG  ---  A pointer to a null-terminated string of 16-bit Unicode characters. "
			
		Case "QWORD"
			pbtype.s = "  ---  A 64-bit unsigned integer."
			
		Case "SHORT"
			pbtype.s = "WORD  ---  A 16-bit integer. The range is 32768 through 32767 decimal."
			
		Case "SC_HANDLE"
			pbtype.s = "LONG  ---  A 16-bit integer. The range is 32768 through 32767 decimal."
			
		Case "SC_LOCK"
			pbtype.s = "LONG  ---  A 16-bit integer. The range is 32768 through 32767 decimal."
			
		Case "SERVICE_STATUS_HANDLE"
			pbtype.s = "LONG  ---  A 16-bit integer. The range is 32768 through 32767 decimal."
			
		Case "SIZE_T"
			pbtype.s = "the maximum number of Bytes To which a pointer can point. "
			
		Case "SSIZE_T"
			pbtype.s = "signed SIZE_T  ---  the maximum number of Bytes To which a pointer can point. "
			
		Case "REGSAM"
			pbtype.s = "Security access mask For registry key , Not bound To a Type"
			
		Case "TBYTE"
			pbtype.s = "CHARACTER  ---  a WCHAR If Unicode is defined , a Char otherwise."
			
		Case "TCHAR"
			pbtype.s = "CHARACTER   ---  a WCHAR If Unicode is defined , a Char otherwise."
			
		Case "UCHAR"
			pbtype.s = "BYTE  ---  UNSIGNED CHAR( use BYTE , And StrU( ) Or HEX Values ) "
			
		Case "UINT"
			pbtype.s = "LONG  ---  An unsigned INT. The range is 0 through 4294967295 decimal"
			
		Case "UINT64"
			pbtype.s = "QUAD  ---  An unsigned INT. The range is 0 through 4294967295 decimal"
			
		Case "ULONG"
			pbtype.s = "LONG  ---  An unsigned LONG. The range is 0 through 4294967295 decimal"
			
		Case "ULONGLONG"
			pbtype.s = "QUAD  ---  A 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal."
			
		Case "ULONG32"
			pbtype.s = "LONG  ---  A 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal"
			
		Case "ULONG64"
			pbtype.s = "QUAD  ---  A 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal."
			
		Case "USHORT"
			pbtype.s = "WORD  ---   UNSIGNED SHORT( use WORD , And fill it With HEX Values , For Results , use StrU( )  ) "
			
		Case "USN"
			pbtype.s = "INTEGER  ---  An update sequence number( USN ) ."
			
		Case "UINT_PTR"
			pbtype.s = "POINTER  ---  An update sequence number( USN ) ."
			
		Case "ULONG_PTR"
			pbtype.s = "POINTER  ---  An update sequence number( USN ) "
			
		Case "UNSIGNED"
			pbtype.s = "UNSIGNED  ---  Attribute( use normal Type , And fill With HEX Values , get Results With StrU( )  ) "
			
		Case "VOID"
			pbtype.s = " VOID  ---  means no Variable , a Function With VOID As argument has no argument."
			
		Case "WCHAR"
			pbtype.s = "WORD  ---   16-bit Unicode Character , use WORD"
			
		Case "INTEGER"
			pbtype.s = "INTEGER  ---  A 16-bit unsigned integer. The range is 0 through 65535 decimal"
			
		Case "WINAPI"
			pbtype.s = "Calling convention For system functions , no type"
			
		Case "WORD"
			pbtype.s = "Word  ---  A 16-bit unsigned integer."
			
		Case "WPARAM"
			pbtype.s = "LONG  ---  message parameter"
			
		Default
			pbtype.s = "Not In The List"
	EndSelect
	ProcedureReturn pbtype
EndProcedure

Procedure.s IDE_GetWord( ScintillaID.l ) 
	Protected cpos.l , Min.l , Max.l , Position.l
	Position = SendMessage_( ScintillaID , #SCI_GETCURRENTPOS , #Null , #Null ) 
	cpos = Position
	Min = SendMessage_( ScintillaID , #SCI_WORDSTARTPOSITION , Position , #True ) 
	Max = SendMessage_( ScintillaID , #SCI_WORDENDPOSITION , Position , #True ) 
	
	For Position = Min To Max-1
		Text + Chr( SendMessage_( ScintillaID , #SCI_GETCHARAT , Position , #Null )  ) 
	Next
	ProcedureReturn Text
EndProcedure

Procedure OpenWindow_Window_0( ) 
	Window_0 = OpenWindow( #PB_Any , Cursor\x , Cursor\y + 10 , 550 , 20 , "" , #PB_Window_BorderLess ) 
	If Window_0
		If LoadFont( 1 , "Arial" , 12 ) 
			SetGadgetFont( #PB_Default , FontID( 1 )  ) 
		EndIf
		Window_0_Text_0 = TextGadget( #PB_Any , 0 , 0 , 550 , 20 , "( " + Text + " ) " + msg , #PB_Text_Center ) 
		SetGadgetColor( Window_0_Text_0 , #PB_Gadget_BackColor , RGB( 193 , 169 , 229 )  ) 
	EndIf
EndProcedure



Procedure.i StringLength2GadgetWidth( Gid.i ) 
	DC = GetDC_( GadgetID( Window_0_Text_0 )  ) 
	msg = RemoveString( msg , Chr( 10 ) + Chr( 13 )  ) 
	GetTextExtentPoint32_( DC , @msg , Len( msg ) , @LineSize.SIZE ) 
	LineSize\cx + 50
	ProcedureReturn LineSize\cx
EndProcedure

CallDebugger
msg.s = GetPBType( UCase( IDE_GetWord( ScintillaID )  )  ) 
GetCursorPos_( Cursor.POINT ) 

OpenWindow_Window_0( ) 
HideWindow( Window_0 , #True ) 

width.i = StringLength2GadgetWidth( Window_0_Text_0 ) 

SetGadgetText( Window_0_Text_0 , msg ) 

ResizeWindow( Window_0 , #PB_Ignore , #PB_Ignore , width , #PB_Ignore ) 
ResizeGadget( Window_0_Text_0 , #PB_Ignore , #PB_Ignore , width , #PB_Ignore ) 

HideWindow( Window_0 , #False ) 
StickyWindow( Window_0 , 1 ) 
AddWindowTimer( Window_0 , 1 , 4000 ) ; leave on screen 4 secs

Repeat
	Event = WaitWindowEvent( ) 
	If Event = #PB_Event_Timer
		
		CloseWindow( Window_0 ) 
		Window_0 = 0
		Break
	EndIf
Until Event = #PB_Event_CloseWindow

Last edited by Zebuddi123 on Sun Jan 12, 2014 2:56 pm, edited 5 times in total.
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: WinApi Variable type tool for the IDE

Post by netmaestro »

Thanks for sharing, looks useful! Btw, when making the conversions, did you consult this? (approved by Freak): http://purebasic.fr/english/viewtopic.p ... 58&start=7
BERESHEIT
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 796
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: WinApi Variable type tool for the IDE

Post by Zebuddi123 »

Hi netmaestro yes i used freaks and kales forum posts and went through them one by one to make sure as much as possible were pb approved.

Thanks hope its useful. it`s come a tool i`m creating for auto translating C structures directly to pb structures, which is mostly done. but needs a lot more testing :lol:

zebuddi. :)
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
Bisonte
Addict
Addict
Posts: 1313
Joined: Tue Oct 09, 2007 2:15 am

Re: WinApi Variable type tool for the IDE

Post by Bisonte »

nice tool....

A suggestion to the OpenWindow_Window_0() procedure to read the colors from the preferences of the IDE
(I prefer the debugger colors... so you can see it fast)

Code: Select all

Procedure OpenWindow_Window_0()
  Window_0 = OpenWindow(#PB_Any, Cursor\x,    Cursor\y+10 ,550,20, "",#PB_Window_BorderLess)
  If Window_0
    If LoadFont(1, "Arial", 12)
      SetGadgetFont(#PB_Default, FontID(1))
    EndIf
    Window_0_Text_0 = TextGadget(#PB_Any, 0, 0, 550, 20, "("+Text+")    "+msg, #PB_Text_Center)
    OpenPreferences(GetEnvironmentVariable("PB_TOOL_Preferences"))
    PreferenceGroup("Editor")
    SetGadgetColor(Window_0_Text_0,#PB_Gadget_FrontColor, Val(ReadPreferenceString("Debugger_LineSymbolColor", "0")))
    SetGadgetColor(Window_0_Text_0,#PB_Gadget_BackColor, Val(ReadPreferenceString("Debugger_ErrorColor", Str(RGB(193, 169, 229)))))
    ClosePreferences()
  EndIf
EndProcedure
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: WinApi Variable type tool for the IDE

Post by ts-soft »

Bisonte wrote:(I prefer the debugger colors... so you can see it fast)
Do you think, i have the same color-settings as you have :mrgreen:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Bisonte
Addict
Addict
Posts: 1313
Joined: Tue Oct 09, 2007 2:15 am

Re: WinApi Variable type tool for the IDE

Post by Bisonte »

Have you see the code ? Right ! You can change it :mrgreen:

But I think the Debugger Colors are mostly ... visible.... ;)
I only want to show a way to read the preferences... and use the vars someone needed...
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: WinApi Variable type tool for the IDE

Post by freak »

netmaestro wrote:Thanks for sharing, looks useful! Btw, when making the conversions, did you consult this? (approved by Freak): http://purebasic.fr/english/viewtopic.p ... 58&start=7
Note that the referenced list is from before PB supported 64bit. A lot of LONG types need to be changed to INTEGER now for proper 64bit support.
quidquid Latine dictum sit altum videtur
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Re: WinApi Variable type tool for the IDE

Post by yrreti »

Hi Zebuddi123
A super thanks very much for this :!: :!: :!:
I don't work with some of this stuff that often, and this will be a great reference help.
Your method would also allow you to add other stuff that you don't use very often for
a quick reference too. Bravo! Thanks very very much for this.

yrreti :D :D :D
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: WinApi Variable type tool for the IDE

Post by ts-soft »

Zebuddi123 wrote:

Code: Select all

      Case "INT64"
         pbtype.s = "QUAD  ---  A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal"
QUAD is 64-bit :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 796
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: WinApi Variable type tool for the IDE

Post by Zebuddi123 »

@All code is free/opensource do as you will with it, improve it. Improvements ideas greatly welcomed. :D

@Bisonte good idea thanks (but colour scheme doesnt work for me :shock: :lol: )

@Freak will go through and check again guessed i had got some wrong should have trusted my instincts :lol: more reason for the right translation to stay in my head :lol:

@yrreti thanks and your welcome. as above feel free to improve add more to the definition/explanation of the type etc. I`m the same having a play around windows api`s etc, dabbling n learning. :lol:

@Thomas yep :oops: :lol:
zebuddi. :D
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: WinApi Variable type tool for the IDE

Post by Thunder93 »

You might want to check into DWORDLONG.

A DWORDLONG is a 64-bit unsigned integer (range: 0 through 18446744073709551615 decimal).

INTEGER is has different ranges between 32bit and 64bit.

Even under 64bit, INTEGER can't be considered a good substitute. Therefore Quad would have to suffice.

Or am I misunderstanding something?
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Post Reply