Re: Windows Programming: Learning more about the Win32® API.
Posted: Wed Jun 06, 2012 10:12 am
any example of using CertCreateCertificateContext and CertOpenStore and CertAddCertificateContextToStore?
http://www.purebasic.com
https://www.purebasic.fr/english/
Greetings from PBnewbie,Edwin Knoppert wrote:Hmmm, i still wonder how the original writer knew about these links..
So we can check out newer links, if exist.
Install Windows Help program (WinHlp32.exe) for Windows 7morosh wrote:the old help files *.hlp being no more supported in W7
Windows .hlp viewer for Windows 8 and Windows 8.1:Danilo wrote:Install Windows Help program (WinHlp32.exe) for Windows 7morosh wrote:the old help files *.hlp being no more supported in W7
I believe this is the file (from 2010).kranilius wrote:Hello,
Thanks for the info. Interesting note, when I click on this link:
http://freak.purearea.net/help/wintypes.txt
Malwarebytes blocks this as Malware!
I would love to look at this but now I'm paranoid.
Code: Select all
; *****************************************************************
; * *
; * How to use Windows API Types with PureBasic *
; * *
; * by Timo Harter, known As Freak *
; * *
; *****************************************************************
;
; - Note, that there are a lot of Types in Windows, that can be replaced
; by the same PB VAlue, mostly LONG. The reason that there are a lot of
; different Types, is that there are different Types For different jobs,
; but As you can see, they are all replaced by LONG.
; - By String, NULL-terminated Strings are meant.
; - Types are Not in alphabetical Order, use a Search Function, To find
; what you need.
; - Finally: Feel the _Pure_ Power !!
; *****************************************************************
;
; Following are Windows Types, And the PB Types, you can use For them (For LONG, see further down)
; *****************************************************************
; VOID Void means no Variable, A Function With VOID As argument has no argument.
; CONST Constant, any of Type.
; UNSIGNED Unsigned Attribute (use normal Type, And fill With HEX Values, get Results With StrU() )
; BOOL Or BOOLEAN #True (1), Or #False (0) - can BYTE, WORD And LONG
; FLOAT FLOAT
; BYTE BYTE
; SHORT Or WORD WORD
; USHORT Unsigned SHORT (use WORD, And fill it With HEX Values, For results, use StrU() )
; CHAR Character, use BYTE
; UCHAR Unsigned CHAR (use BYTE, And StrU() Or HEX Values)
; WCHAR 16-bit Unicode character, use WORD
; TBYTE A WCHAR If UNICODE is defined, a CHAR otherwise.
; TCHAR A WCHAR If UNICODE is defined, a CHAR otherwise.
;
; Following are Windows Types, that can't be used directly from PB
; *****************************************************************
; ATOM ATOM Tables are Sytem-defined String tables, there's no PB-Type for that.
; REGSAM Security access mask For registry key, Not bound To a Type
; WINAPI Calling convention For system functions, that's no Type
; CALLBACK Calling convention For callback functions, also no Type
; CRITICAL_SECTION Critical Section VAriable, don't know of what Type
; LUID Locally unique identifier. (DOUBLE Value) To be accessed only by Functions, Not directly
; SIZE_T The maximum number of bytes To which a pointer can point. Use For a count that must span the full range of a pointer.
; SSIZE_T Signed SIZE_T.
;
; Following are Windows Types, that can be replaced by LONG type.
; *****************************************************************
; DWORD
; DWORD32
; DWORD_PTR (used For Pointers)
; INT
; INT_PTR (Pointers)
; INT32
; LONG
; LONG_PTR (Pointers)
; LONG32
; COLORREF Color Format (RGB) (LONG With Value $000000 - $FFFFFF)
; LPARAM Message parameter, use LONG
; WPARAM Message parameter, use LONG
; LRESULT Signed result of message processing, use LONG
; LANGID Language identifier, use LONG
; LCID Locale identifier, use LONG
; LCTYPE Locale information type, LONG
;
; Following are Windows Types, that could be replaced by UNSIGNED LONG
; (use LONG, And fill them With HEX Values, For getting results, use StrU() )
; *****************************************************************
; UINT
; UINT_PTR (For Pointers)
; UINT32
; ULONG
; ULONG_PTR (For Pointers)
; ULONG32
;
; Following are Windows Types, meaning DOUBLE (Not supported yet)
; *****************************************************************
; DWORD64
; INT64
; LONG64
; LONGLONG
; UINT64 (unsigned)
; ULONG64 (unsigned)
; ULONGLONG (unsigned)
;
; Following are Handles (thay identify Windows, Bitmaps, etc.), they are always LONG
; *****************************************************************
; HACCEL Handle To an accelerator table.
; HANDLE Handle To an object.
; HBITMAP Handle To a bitmap.
; HBRUSH Handle To a brush.
; HCONV Handle To a dynamic Data exchange (DDE) conversation.
; HCONVLIST Handle To a DDE conversation List.
; HCURSOR Handle To a cursor.
; HDC Handle To a device context (DC).
; HDDEDATA Handle To DDE Data.
; HDESK Handle To a desktop.
; HDROP Handle To an internal drop Structure.
; HDWP Handle To a deferred window position Structure.
; HENHMETAFILE Handle To an enhanced metafile.
; HFILE Handle To a file opened by OpenFile, Not CreateFile.
; HFONT Handle To a font.
; HGDIOBJ Handle To a GDI object.
; HGLOBAL Handle To a Global memory block.
; HHOOK Handle To a hook.
; HICON Handle To an icon.
; HIMAGELIST Handle To an image List.
; HIMC Handle To input context.
; HINSTANCE Handle To an instance.
; HKEY Handle To a registry key.
; HKL Input locale identifier.
; HLOCAL Handle To a local memory block.
; HMENU Handle To a menu.
; HMETAFILE Handle To a metafile.
; HMODULE Handle To a Module.
; HMONITOR Handle To a display monitor.
; HPALETTE Handle To a palette.
; HPEN Handle To a pen.
; HRGN Handle To a region.
; HRSRC Handle To a resource.
; HSZ Handle To a DDE string.
; HWINSTA Handle To a window station.
; HWND Handle To a Window.
; SC_HANDLE Handle To a service control manager database.
; SC_LOCK Handle To a service control manager database lock.
; SERVICE_STATUS_HANDLE Handle To a service status value.
;
; Following are Pointers (Memory adresses To Structures/Variables), they are also LONG
; *****************************************************************
; LPBOOL Pointer To a BOOL.
; LPBYTE Pointer To a BYTE.
; LPCOLORREF Pointer To a COLORREF value.
; LPCRITICAL_SECTION Pointer To a CRITICAL_SECTION.
; LPCSTR Pointer To a constant String.
; LPCTSTR An LPCWSTR If UNICODE is defined, an LPCSTR otherwise.
; LPCVOID Pointer To a constant of any type.
; LPCWSTR Pointer To a constant string of 16-bit Unicode characters.
; LPDWORD Pointer To a DWORD.
; LPHANDLE Pointer To a HANDLE.
; LPINT Pointer To an INT.
; LPLONG Pointer To a LONG.
; LPSTR Pointer To a string
; LPTSTR An LPWSTR If UNICODE is defined, an LPSTR otherwise.
; LPVOID Pointer To any type.
; LPWORD Pointer To a WORD.
; LPWSTR Pointer To a string of 16-bit Unicode characters.
; PBOOL Pointer To a BOOL.
; PBOOLEAN Pointer To a BOOL.
; PBYTE Pointer To a BYTE.
; PCHAR Pointer To a CHAR.
; PCRITICAL_SECTION Pointer To a CRITICAL_SECTION.
; PCSTR Pointer To a string
; PCTSTR A PCWSTR If UNICODE is defined, a PCSTR otherwise.
; PCWCH Pointer To a constant WCHAR.
; PCWSTR Pointer To a constant string of 16-bit Unicode characters.
; PDWORD Pointer To a DWORD.
; PFLOAT Pointer To a FLOAT.
; PHANDLE Pointer To a HANDLE.
; PHKEY Pointer To an HKEY.
; PINT Pointer To an INT.
; PLCID Pointer To an LCID.
; PLONG Pointer To a LONG.
; PLUID Pointer To a LUID.
; POINTER_32 32-bit pointer.
; POINTER_64 64-bit pointer. On a 64-bit system, this is a native pointer. On a 32-bit system, this is a sign-extended 32-bit pointer.
; PSHORT Pointer To a SHORT.
; PSTR Pointer To a string
; PTBYTE Pointer To a TBYTE.
; PTCHAR Pointer To a TCHAR.
; PTSTR A PWSTR If UNICODE is defined, a PSTR otherwise.
; PUCHAR Pointer To a UCHAR.
; PUINT Pointer To a UINT.
; PULONG Pointer To a ULONG.
; PUSHORT Pointer To a USHORT.
; PVOID Pointer To any type.
; PWCHAR Pointer To a WCHAR.
; PWORD Pointer To a WORD.
; PWSTR Pointer To a string of 16-bit Unicode characters.
;
; *****************************************************************