2009-12-10 15:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* hbwin/win_misc.c
* hbwin/win_prn1.c
+ Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
(where possible)
WIN_RUNDETACHED(), WIN_LOADRESOURCE(), WIN_CREATEDC(), WIN_GETPRINTERFONTNAME()
* hbwin/wapi_winbase.c
! Fixed typo in two recently added WAPI function names.
* contrib/hbqt/hbqt.hbc
* contrib/hbqt/hbqts.hbc
+ Added psapi for win platform, until it's needed for memory debugging purposes.
This commit is contained in:
@@ -17,6 +17,20 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-12-10 15:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* hbwin/win_misc.c
|
||||
* hbwin/win_prn1.c
|
||||
+ Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
|
||||
(where possible)
|
||||
WIN_RUNDETACHED(), WIN_LOADRESOURCE(), WIN_CREATEDC(), WIN_GETPRINTERFONTNAME()
|
||||
|
||||
* hbwin/wapi_winbase.c
|
||||
! Fixed typo in two recently added WAPI function names.
|
||||
|
||||
* contrib/hbqt/hbqt.hbc
|
||||
* contrib/hbqt/hbqts.hbc
|
||||
+ Added psapi for win platform, until it's needed for memory debugging purposes.
|
||||
|
||||
2009-12-10 11:24 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/common/hbver.c
|
||||
* Minor cleanup.
|
||||
@@ -396,6 +410,7 @@
|
||||
2009-12-09 21:17 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbgd/gdwrp.c
|
||||
* Formatting (deleted unnecessary returns and blocks).
|
||||
% Using HB_ERR_FUNCNAME.
|
||||
|
||||
* ChangeLog
|
||||
- contrib/hbgd/ChangeLog
|
||||
@@ -417,8 +432,8 @@
|
||||
* contrib/hbwin/wapi_winbase.c
|
||||
+ WAPI_WAITFORSINGLEOBJECT()
|
||||
+ WAPI_WAITFORSINGLEOBJECTEX()
|
||||
+ WAPI_WAITFORMULTIPLEOBJECT()
|
||||
+ WAPI_WAITFORMULTIPLEOBJECTEX()
|
||||
+ WAPI_WAITFORMULTIPLEOBJECTS()
|
||||
+ WAPI_WAITFORMULTIPLEOBJECTSEX()
|
||||
Added new wrappers. Untested.
|
||||
|
||||
2009-12-09 19:36 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
|
||||
@@ -10,7 +10,8 @@ libs=hbqt
|
||||
libs=hbqtcore hbqtgui hbqtnetwork
|
||||
|
||||
{win}libs=version shlwapi
|
||||
{allwin}libs=QtCore4 QtGui4 QtNetwork4 QtUiTools
|
||||
{allwin}libs=QtCore4 QtGui4 QtNetwork4 QtUiTools psapi
|
||||
{allwin}libs=psapi
|
||||
{linux}libs=QtCore QtGui QtNetwork QtUiTools
|
||||
{darwin}libs=/Library/Frameworks/QtCore.framework/QtCore
|
||||
{darwin}libs=/Library/Frameworks/QtGui.framework/QtGui
|
||||
|
||||
@@ -11,6 +11,7 @@ libs=hbqtcores hbqtguis hbqtnetworks hbqtwebkits
|
||||
|
||||
{win}libs=version shlwapi
|
||||
{allwin}libs=QtCore QtGui QtNetwork QtWebKit QtUiTools
|
||||
{allwin}libs=psapi
|
||||
{allgcc}libs=supc++
|
||||
|
||||
gui=yes
|
||||
|
||||
@@ -87,7 +87,7 @@ HB_FUNC( WAPI_WAITFORSINGLEOBJECTEX )
|
||||
hb_retnl( WaitForSingleObjectEx( wapi_par_HANDLE( 1 ), ( DWORD ) hb_parnl( 2 ), hb_parl( 3 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( WAPI_WAITFORMULTIPLEOBJECT )
|
||||
HB_FUNC( WAPI_WAITFORMULTIPLEOBJECTS )
|
||||
{
|
||||
PHB_ITEM pArray = hb_param( 2, HB_IT_ARRAY );
|
||||
HB_SIZE nLen = pArray ? hb_arrayLen( pArray ) : 0;
|
||||
@@ -108,7 +108,7 @@ HB_FUNC( WAPI_WAITFORMULTIPLEOBJECT )
|
||||
hb_errRT_BASE( EG_ARG, 1001, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
|
||||
HB_FUNC( WAPI_WAITFORMULTIPLEOBJECTEX )
|
||||
HB_FUNC( WAPI_WAITFORMULTIPLEOBJECTSEX )
|
||||
{
|
||||
PHB_ITEM pArray = hb_param( 2, HB_IT_ARRAY );
|
||||
HB_SIZE nLen = pArray ? hb_arrayLen( pArray ) : 0;
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#define HB_OS_WIN_USED
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbwinuni.h"
|
||||
|
||||
#ifndef QS_ALLPOSTMESSAGE
|
||||
#define QS_ALLPOSTMESSAGE 0x0100
|
||||
@@ -71,14 +72,8 @@
|
||||
|
||||
HB_FUNC( WIN_RUNDETACHED )
|
||||
{
|
||||
char * pszFreeCommandName = NULL;
|
||||
char * pszFreeCommandLine = NULL;
|
||||
|
||||
const char * pszCommandName = HB_ISCHAR( 1 ) ? hb_osEncodeCP( hb_parc( 1 ), &pszFreeCommandName, NULL ) : NULL;
|
||||
const char * pszCommandLine = HB_ISCHAR( 2 ) ? hb_osEncodeCP( hb_parc( 2 ), &pszFreeCommandLine, NULL ) : NULL;
|
||||
|
||||
LPTSTR lpCommandName = pszCommandName ? HB_TCHAR_CONVTO( pszCommandName ) : NULL;
|
||||
LPTSTR lpCommandLine = pszCommandLine ? HB_TCHAR_CONVTO( pszCommandLine ) : NULL;
|
||||
void * hCommandName;
|
||||
void * hCommandLine;
|
||||
|
||||
#if ! defined( HB_OS_WIN_CE )
|
||||
STARTUPINFO si;
|
||||
@@ -90,8 +85,8 @@ HB_FUNC( WIN_RUNDETACHED )
|
||||
#endif
|
||||
|
||||
if( CreateProcess(
|
||||
( LPCTSTR ) lpCommandName, /* Command name */
|
||||
( LPTSTR ) lpCommandLine, /* Command line (Unicode version needs an non-const buffer) */
|
||||
( LPCTSTR ) HB_PARSTR( 1, &hCommandName, NULL ), /* Command name */
|
||||
( LPTSTR ) HB_PARSTR( 2, &hCommandLine, NULL ), /* Command line (Unicode version needs an non-const buffer) */
|
||||
NULL, /* Process handle not inheritable */
|
||||
NULL, /* Thread handle not inheritable */
|
||||
FALSE, /* Set handle inheritance to FALSE */
|
||||
@@ -127,11 +122,8 @@ HB_FUNC( WIN_RUNDETACHED )
|
||||
hb_retl( HB_FALSE );
|
||||
}
|
||||
|
||||
if( lpCommandName ) HB_TCHAR_FREE( lpCommandName );
|
||||
if( lpCommandLine ) HB_TCHAR_FREE( lpCommandLine );
|
||||
|
||||
if( pszFreeCommandName ) hb_xfree( pszFreeCommandName );
|
||||
if( pszFreeCommandLine ) hb_xfree( pszFreeCommandLine );
|
||||
hb_strfree( hCommandName );
|
||||
hb_strfree( hCommandLine );
|
||||
}
|
||||
|
||||
HB_FUNC( WIN_LOADRESOURCE )
|
||||
@@ -143,10 +135,12 @@ HB_FUNC( WIN_LOADRESOURCE )
|
||||
|
||||
if( hb_winmainArgGet( &hInstance, NULL, NULL ) )
|
||||
{
|
||||
LPTSTR lpName = HB_TCHAR_CONVTO( hb_parcx( 1 ) );
|
||||
LPTSTR lpType = HB_TCHAR_CONVTO( hb_parcx( 2 ) );
|
||||
void * hName;
|
||||
void * hType;
|
||||
|
||||
HRSRC hRes = FindResource( ( HMODULE ) hInstance, ( LPCTSTR ) lpName, ( LPCTSTR ) lpType );
|
||||
HRSRC hRes = FindResource( ( HMODULE ) hInstance,
|
||||
( LPCTSTR ) HB_PARSTRDEF( 1, &hName, NULL ),
|
||||
( LPCTSTR ) HB_PARSTRDEF( 2, &hType, NULL ) );
|
||||
|
||||
if( hRes )
|
||||
{
|
||||
@@ -161,8 +155,8 @@ HB_FUNC( WIN_LOADRESOURCE )
|
||||
}
|
||||
}
|
||||
|
||||
HB_TCHAR_FREE( lpName );
|
||||
HB_TCHAR_FREE( lpType );
|
||||
hb_strfree( hName );
|
||||
hb_strfree( hType );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#include "hbapi.h"
|
||||
#include "hbapifs.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbwinuni.h"
|
||||
|
||||
#if defined( HB_OS_WIN ) && !defined( HB_OS_WIN_CE )
|
||||
|
||||
@@ -156,8 +157,9 @@ HB_FUNC( WIN_CREATEDC )
|
||||
{
|
||||
if( HB_ISCHAR( 1 ) )
|
||||
{
|
||||
LPTSTR lpText = HB_TCHAR_CONVTO( hb_parc( 1 ) );
|
||||
HDC hDC = CreateDC( TEXT( "" ), lpText, NULL, NULL );
|
||||
void * hDevice;
|
||||
|
||||
HDC hDC = CreateDC( TEXT( "" ), ( LPCTSTR ) HB_PARSTR( 1, &hDevice, NULL ), NULL, NULL );
|
||||
|
||||
if( hDC )
|
||||
{
|
||||
@@ -169,7 +171,7 @@ HB_FUNC( WIN_CREATEDC )
|
||||
else
|
||||
hb_retptr( NULL );
|
||||
|
||||
HB_TCHAR_FREE( lpText );
|
||||
hb_strfree( hDevice );
|
||||
}
|
||||
else
|
||||
hb_retptr( NULL );
|
||||
@@ -418,13 +420,10 @@ HB_FUNC( WIN_GETPRINTERFONTNAME )
|
||||
if( hDC )
|
||||
{
|
||||
TCHAR tszFontName[ 128 ];
|
||||
char * pszFontName;
|
||||
|
||||
GetTextFace( hDC, sizeof( tszFontName ) - 1, tszFontName );
|
||||
|
||||
pszFontName = HB_TCHAR_CONVFROM( tszFontName );
|
||||
hb_retc( pszFontName );
|
||||
HB_TCHAR_FREE( pszFontName );
|
||||
HB_RETSTR( tszFontName );
|
||||
}
|
||||
else
|
||||
hb_retc_null();
|
||||
|
||||
Reference in New Issue
Block a user