The date of the winapi32.inc file included with PB9 is 27 January 2005, and that included with PB8.04 is dated after, at 21 February 2005.
The differences between the files are minor, but may be relevant to someone. I have sent an e-mail to [email protected] with regard to this subject.
The following declarations have the word 'CodePage' mis-spelt as 'CodePag' in the PB9 version. In the PB8 version, the word is spelt correctly:
The change in the PB9 version is correct as it includes a BYVAL:
In addition, I would like to suggest the following changes and additions to winapi32.inc:
In the 'Raw Input Device Information' section:
Add:
Change:
to:
And add the following:
Thanks.
Christopher
The differences between the files are minor, but may be relevant to someone. I have sent an e-mail to [email protected] with regard to this subject.
Code:
PB9: Last Update: 27 January 2005 PB8: Last Update: 21 February 2005
Code:
PB9: DECLARE FUNCTION GetCPInfo LIB "KERNEL32.DLL" ALIAS "GetCPInfo" (BYVAL CodePag AS DWORD, lpCPInfo AS CPINFO) AS LONG DECLARE FUNCTION GetCPInfoEx LIB "KERNEL32.DLL" ALIAS "GetCPInfoExA" (BYVAL CodePag AS DWORD, BYVAL dwFlags AS DWORD, lpCPInfo AS CPINFOEX) AS LONG DECLARE FUNCTION IsDBCSLeadByteEx LIB "KERNEL32.DLL" ALIAS "IsDBCSLeadByteEx" (BYVAL CodePag AS DWORD, BYVAL bTestChar AS BYTE) AS LONG DECLARE FUNCTION IsValidCodePage LIB "KERNEL32.DLL" ALIAS "IsValidCodePage" (BYVAL CodePag AS DWORD) AS LONG DECLARE FUNCTION MultiByteToWideChar LIB "KERNEL32.DLL" ALIAS "MultiByteToWideChar" (BYVAL CodePag AS DWORD, BYVAL dwFlags AS DWORD, lpMultiByteStr AS ASCIIZ, BYVAL cchMultiByte AS LONG, lpWideCharStr AS DWORD, BYVAL cchWideChar AS LONG) AS LONG DECLARE FUNCTION WideCharToMultiByte LIB "KERNEL32.DLL" ALIAS "WideCharToMultiByte" (BYVAL CodePag AS DWORD, BYVAL dwFlags AS DWORD, lpWideCharStr AS ANY, BYVAL cchWideChar AS LONG, lpMultiByteStr AS ANY, BYVAL cchMultiByte AS LONG, _ DECLARE FUNCTION CharNextEx LIB "USER32.DLL" ALIAS "CharNextExA" (BYVAL CodePag AS WORD, lpCurrentChar AS ASCIIZ, BYVAL dwFlags AS DWORD) AS DWORD DECLARE FUNCTION CharPrevEx LIB "USER32.DLL" ALIAS "CharPrevExA" (BYVAL CodePag AS WORD, lpStart AS ASCIIZ, lpCurrentChar AS ASCIIZ, BYVAL dwFlags AS DWORD) AS DWORD
Code:
PB9 (correct): DECLARE FUNCTION EnumDisplayMonitors LIB "USER32.DLL" ALIAS "EnumDisplayMonitors" (BYVAL hdc AS DWORD, lprcClip AS RECT, BYVAL lpfnEnum AS DWORD, BYVAL dwData AS LONG) AS LONG PB8 (missing BYVAL): DECLARE FUNCTION EnumDisplayMonitors LIB "USER32.DLL" ALIAS "EnumDisplayMonitors" (BYVAL hdc AS DWORD, lprcClip AS RECT, lpfnEnum AS DWORD, BYVAL dwData AS LONG) AS LONG
In addition, I would like to suggest the following changes and additions to winapi32.inc:
In the 'Raw Input Device Information' section:
Add:
Code:
%RIDEV_INPUTSINK = &H00000100
Code:
TYPE RID_DEVICE_INFO_KEYBOARD dwType AS DWORD dwSubType AS DWORD dwKeyboardMode AS DWORD dwNumberOfFunctionKeys AS DWORD dwNumberOfKeysTotal AS DWORD END TYPE
Code:
TYPE RID_DEVICE_INFO_KEYBOARD dwType AS DWORD dwSubType AS DWORD dwKeyboardMode AS DWORD dwNumberOfFunctionKeys AS DWORD dwNumberOfIndicators AS DWORD ' << add this line dwNumberOfKeysTotal AS DWORD END TYPE
And add the following:
Code:
DECLARE FUNCTION ConvertSidToStringSid LIB "ADVAPI32.DLL" ALIAS "ConvertSidToStringSid" (pSid AS ANY, pStringSid AS ANY) AS LONG DECLARE FUNCTION CreateProcessWithLogonW LIB "ADVAPI32.DLL" ALIAS "CreateProcessWithLogonW" (BYVAL lpUsername AS DWORD, _ BYVAL lpDomain AS DWORD, BYVAL lpPassword AS DWORD, BYVAL dwLogonFlags AS DWORD, BYVAL lpApplicationName AS DWORD, _ BYVAL lpCommandLine AS DWORD, BYVAL dwCreationFlags AS DWORD, BYVAL lpEnvironment AS DWORD, BYVAL lpCurrentDirectory AS DWORD, _ lpStartupInfo AS STARTUPINFO, lpProcessInfo AS PROCESS_INFORMATION) AS LONG ' equates from shlobj.h %SHGFP_TYPE_CURRENT = 0& ' current value for user, verify it exists %SHGFP_TYPE_DEFAULT = 1& ' default value, may not exist
Christopher
Comment