PureBasic Forum
https://www.purebasic.fr/english/

Requested API Structure and constants
https://www.purebasic.fr/english/viewtopic.php?f=4&t=64838
Page 2 of 3

Author:  nco2k [ Mon Dec 05, 2016 6:44 am ]
Post subject:  Re: Requested API Structure and constants

god that issue has been fixed like a year ago. how about using an updated version, before posting stuff? :P

c ya,
nco2k

Author:  nco2k [ Mon Dec 05, 2016 8:34 am ]
Post subject:  Re: Requested API Structure and constants

can we ask for interfaces here too? :)

Code:
Interface IMMDeviceEnumerator Extends IUnknown
  EnumAudioEndpoints(a, b, c)
  GetDefaultAudioEndpoint(a, b, c)
  GetDevice(a, b)
  RegisterEndpointNotificationCallback(a)
  UnregisterEndpointNotificationCallback(a)
EndInterface

Interface IMMDevice Extends IUnknown
  Activate(a, b, c, d)
  OpenPropertyStore(a, b)
  GetId(a)
  GetState(a)
EndInterface

Interface IPropertyStore Extends IUnknown
  GetCount(a)
  GetAt(a, b)
  GetValue(a, b)
  SetValue(a, b)
  Commit()
EndInterface

#eRender = 0
#eCapture = 1
#eAll = 2
#EDataFlow_enum_count = 3

#eConsole = 0
#eMultimedia = 1
#eCommunications = 2
#ERole_enum_count = 3

c ya,
nco2k

Author:  c4s [ Sat Jan 14, 2017 10:38 am ]
Post subject:  Re: Requested API Structure and constants

I don't now when, but the following constants have already been defined:
Code:
#TBPF_NOPROGRESS = 0
#TBPF_INDETERMINATE = 1
#TBPF_NORMAL = 2
#TBPF_ERROR = 4
#TBPF_PAUSED = 8
...Unfortunately they are written in all-lowercase which is a little annoying.

Author:  yrreti [ Thu Feb 02, 2017 5:05 am ]
Post subject:  Re: Requested API Structure and constants

Help. When using ABBKlaus Printer_Lib with PB550 it works fine
With PB560b1 it crashes because it's missing the DEVMODE Structure
Install PB550 over it again and it works fine again.
So something like this is missing in PB560b1

The DEVMODE structure has the following form:
Code:
typedef struct _devicemode {    /* dvmd */
    TCHAR  dmDeviceName[32];
    WORD   dmSpecVersion;
    WORD   dmDriverVersion;
    WORD   dmSize;
    WORD   dmDriverExtra;
    DWORD  dmFields;
    short  dmOrientation;
    short  dmPaperSize;
    short  dmPaperLength;
    short  dmPaperWidth;
    short  dmScale;
    short  dmCopies;
    short  dmDefaultSource;
    short  dmPrintQuality;
    short  dmColor;
    short  dmDuplex;
    short  dmYResolution;
    short  dmTTOption;
    short  dmCollate;
    TCHAR  dmFormName[32];
    WORD   dmUnusedPadding;
    USHORT dmBitsPerPel;
    DWORD  dmPelsWidth;
    DWORD  dmPelsHeight;
    DWORD  dmDisplayFlags;
    DWORD  dmDisplayFrequency;
} DEVMODE;

The DEVMODE data structure contains information about the device initialization and environment of a printer.

Thanks

__________________________________________________
Code tags added
26.04.2017
RSBasic

Author:  nco2k [ Thu Feb 02, 2017 5:22 am ]
Post subject:  Re: Requested API Structure and constants

its not missing, it has been finally fixed. you simply have to rename the following fields:
Code:
\dmPosition ---> \Display\dmPosition
\dmDisplayOrientation ---> \Display\dmDisplayOrientation
\dmDisplayFixedOutput ---> \Display\dmDisplayFixedOutput

\dmOrientation ---> \Printer\dmOrientation
\dmPaperSize ---> \Printer\dmPaperSize
\dmPaperLength ---> \Printer\dmPaperLength
\dmPaperWidth ---> \Printer\dmPaperWidth
\dmScale ---> \Printer\dmScale
\dmCopies ---> \Printer\dmCopies
\dmDefaultSource ---> \Printer\dmDefaultSource
\dmPrintQuality ---> \Printer\dmPrintQuality
c ya,
nco2k

Author:  yrreti [ Thu Feb 02, 2017 2:10 pm ]
Post subject:  Re: Requested API Structure and constants

Thanks very much nco2k for helping me with that. :D
But if I could 'please' ask you. Where or how did you find out that information :?: :?:
I'm not a professional programmer like you and many are on this forum. But I did both
an inside the forum search, and an outside the forum search for some of those params,
and could not find anything referencing that change. I know some changes are listed
when a new version is announced. But I sure couldn't find any reference to this change.
Thanks very much for your help, because I use that in several of my programs for printing.

Author:  nco2k [ Thu Feb 02, 2017 2:47 pm ]
Post subject:  Re: Requested API Structure and constants

well i was the one who requested the fix. :D viewtopic.php?f=4&t=67026

when a structure doesnt work anymore, simply open up the structure viewer (tools -> structure viewer) and type in the name of the structure. then you can see all the fields and check whats wrong / what changed.

when you need more infos, usually its enough to type in just the name of the structure in the forum search and the first few threads should be about the changes made. viewtopic.php?p=497777#p497777

if you dont find anything useful, feel free to ask in the coding questions sections why its not working anymore. those are simple fixes and you should get help in an instant. :)

c ya,
nco2k

Author:  yrreti [ Fri Feb 03, 2017 12:02 am ]
Post subject:  Re: Requested API Structure and constants

Before returning this forum section back to just Requested API Structure and constants.
I just wanted to thank you very much nco2k, for your help on this and showing me how to
find that information.

Author:  eddy [ Sat Feb 11, 2017 2:49 pm ]
Post subject:  Re: Requested API Structure and constants

For desktop window manager: https://msdn.microsoft.com/en-us/library/windows/desktop/aa969530(v=vs.85).aspx
Code:
Enumeration
#DWMWA_NCRENDERING_ENABLED=1
#DWMWA_NCRENDERING_POLICY
#DWMWA_TRANSITIONS_FORCEDISABLED
#DWMWA_ALLOW_NCPAINT
#DWMWA_CAPTION_BUTTON_BOUNDS
#DWMWA_NONCLIENT_RTL_LAYOUT
#DWMWA_FORCE_ICONIC_REPRESENTATION
#DWMWA_FLIP3D_POLICY
#DWMWA_EXTENDED_FRAME_BOUNDS
#DWMWA_HAS_ICONIC_BITMAP
#DWMWA_DISALLOW_PEEK
#DWMWA_EXCLUDED_FROM_PEEK
#DWMWA_CLOAK
#DWMWA_CLOAKED
#DWMWA_FREEZE_REPRESENTATION
#DWMWA_LAST
EndEnumeration
 

#DWMNCRP_USEWINDOWSTYLE=0 
#DWMNCRP_DISABLED=1       
#DWMNCRP_ENABLED=2 


Code:
Structure MARGINS
cxLeftWidth.l
cxRightWidth.l
cyTopHeight.l
cyBottomHeight.l
EndStructure


__________________________________________________
URL tags added
26.04.2017
RSBasic

Author:  Lunasole [ Sun Mar 19, 2017 7:03 am ]
Post subject:  Re: Requested API Structure and constants

https://msdn.microsoft.com/en-us/library/windows/desktop/aa371338(v=vs.85).aspx

Code:
; Flags for USER_INFO_3, USER_INFO_23 and similar structures (usri3_flags field)
EnumerationBinary UF
   #UF_SCRIPT
   #UF_ACCOUNTDISABLE
   #UF_HOMEDIR_REQUIRED
   #UF_PASSWD_NOTREQD
   #UF_PASSWD_CANT_CHANGE
   #UF_LOCKOUT
   #UF_DONT_EXPIRE_PASSWD
   #UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED
   #UF_NOT_DELEGATED
   #UF_SMARTCARD_REQUIRED
   #UF_USE_DES_KEY_ONLY
   #UF_DONT_REQUIRE_PREAUTH
   #UF_TRUSTED_FOR_DELEGATION
   #UF_PASSWORD_EXPIRED                  ; Windows 2000:  This value is not supported.
   #UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION   ; Windows XP/2000:  This value is not supported.
EndEnumeration


__________________________________________________
URL tags added
26.04.2017
RSBasic

Author:  mk-soft [ Sun May 28, 2017 1:54 pm ]
Post subject:  Re: Requested API Structure and constants

DISPID Constants

https://msdn.microsoft.com/en-us/library/windows/desktop/ms221242(v=vs.85).aspx
Code:
  #DISPID_UNKNOWN = -1
  #DISPID_VALUE = 0
  #DISPID_PROPERTYPUT = -3
  #DISPID_NEWENUM = -4
  #DISPID_EVALUATE = -5
  #DISPID_CONSTRUCTOR = -6
  #DISPID_DESTRUCTOR = -7
  #DISPID_COLLECT = -8


__________________________________________________
URL tags added
28.05.2017
RSBasic

Author:  Josh [ Sun May 28, 2017 2:54 pm ]
Post subject:  Re: Requested API Structure and constants

mk-soft wrote:
DISPID Constants

https://msdn.microsoft.com/en-us/library/windows/desktop/ms221242(v=vs.85).aspx
Code:
  #DISPID_UNKNOWN = -1
  #DISPID_VALUE = 0
  #DISPID_PROPERTYPUT = -3
  #DISPID_NEWENUM = -4
  #DISPID_EVALUATE = -5
  #DISPID_CONSTRUCTOR = -6
  #DISPID_DESTRUCTOR = -7
  #DISPID_COLLECT = -8



From DispEx.h
Code:
#DISPID_STARTENUM = #DISPID_UNKNOWN
#DISPID_THIS = -613

Author:  Josh [ Thu Oct 12, 2017 10:55 am ]
Post subject:  Re: Requested API Structure and constants

From Commctrl.h
Code:
#TVM_GETBKCOLOR          = #TV_FIRST + 31
#TVM_GETEXTENDEDSTYLE    = #TV_FIRST + 45
#TVM_GETINSERTMARKCOLOR  = #TV_FIRST + 38
#TVM_GETITEMHEIGHT       = #TV_FIRST + 28
#TVM_GETITEMPARTRECT     = #TV_FIRST + 72
#TVM_GETITEMSTATE        = #TV_FIRST + 39
#TVM_GETLINECOLOR        = #TV_FIRST + 41
#TVM_GETSCROLLTIME       = #TV_FIRST + 34
#TVM_GETSELECTEDCOUNT    = #TV_FIRST + 70
#TVM_GETTEXTCOLOR        = #TV_FIRST + 32
#TVM_GETTOOLTIPS         = #TV_FIRST + 25
#TVM_GETUNICODEFORMAT    = #CCM_GETUNICODEFORMAT
#TVM_MAPACCIDTOHTREEITEM = #TV_FIRST + 42
#TVM_MAPHTREEITEMTOACCID = #TV_FIRST + 43
#TVM_SETAUTOSCROLLINFO   = #TV_FIRST + 59
#TVM_SETBKCOLOR          = #TV_FIRST + 29
#TVM_SETBORDER           = #TV_FIRST + 35
#TVM_SETEXTENDEDSTYLE    = #TV_FIRST + 44
#TVM_SETHOT              = #TV_FIRST + 58
#TVM_SETINSERTMARK       = #TV_FIRST + 26
#TVM_SETINSERTMARKCOLOR  = #TV_FIRST + 37
#TVM_SETITEMHEIGHT       = #TV_FIRST + 27
#TVM_SETLINECOLOR        = #TV_FIRST + 40
#TVM_SETSCROLLTIME       = #TV_FIRST + 33
#TVM_SETTEXTCOLOR        = #TV_FIRST + 30
#TVM_SETTOOLTIPS         = #TV_FIRST + 24
#TVM_SETUNICODEFORMAT    = #CCM_SETUNICODEFORMAT
#TVM_SHOWINFOTIP         = #TV_FIRST + 71


In the #TVM's there are constants like:
Code:
#TVM_EDITLABEL
#TVM_EDITLABELA
#TVM_EDITLABELW
I think, the ...A and ...W constants are not necessary.

Author:  Lebostein [ Wed Nov 29, 2017 10:11 am ]
Post subject:  Re: Requested API Structure and constants

Is it possible to load all structures and constants for Windows in the Mac OS IDE? Sometimes I work on Mac OS, and later while testing on Windows I see that some structures I defined already used by Windows (for example the structure "coord"). In that case I have to rename all these things in the code.... Thanks!

Author:  Bisonte [ Wed Nov 29, 2017 12:46 pm ]
Post subject:  Re: Requested API Structure and constants

Lebostein wrote:
Is it possible to load all structures and constants for Windows in the Mac OS IDE? Sometimes I work on Mac OS, and later while testing on Windows I see that some structures I defined already used by Windows (for example the structure "coord"). In that case I have to rename all these things in the code.... Thanks!


You can use GetPBInfo from Danilo on windows and use the output
as include or if it works as resident.

Page 2 of 3 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/