2010-02-13 13:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbwin/win_dll.c
    ! Fixed to unshare all HVM strings before passing them to callee.

  * contrib/hbwin/tests/testdll.prg
    ! Deleted two commented test call, which corrupted memory anyway 
      due to too small buffer passed to low-level function.
This commit is contained in:
Viktor Szakats
2010-02-13 12:12:35 +00:00
parent 57efc2cee1
commit fe1cf38e76
3 changed files with 38 additions and 24 deletions

View File

@@ -17,6 +17,14 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-02-13 13:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbwin/win_dll.c
! Fixed to unshare all HVM strings before passing them to callee.
* contrib/hbwin/tests/testdll.prg
! Deleted two commented test call, which corrupted memory anyway
due to too small buffer passed to low-level function.
2010-02-13 03:43 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
* contrib/hbqt/hbqt_hbqplaintextedit.h
@@ -43,21 +51,21 @@
for all implemented docked windows. It facilitates clubbing
all toggle actions at one convenient place.
+ Implemented "Code Skeletons".
+ Implemented "Code Skeletons".
How to write
============
* Click <Docks> main-menu option and select <Code Skeletons>.
* "Code Skeletons" window will open at the right-docking area.
* Close other docks if open to make room for its components.
* Click <Add New> button, a dialog will appear requesting a "Name".
* Enter recognizable name for this skeleton, i.e., "DO CASE 3",
* Enter recognizable name for this skeleton, i.e., "DO CASE 3",
where "3" will represent that this case statement contains 3
iterations of CASE statement. It is just an example, follow
iterations of CASE statement. It is just an example, follow
your way of recognitions.
* After you click <ok> the name will appear in "Identity" list-box.
* Start writing in "Code Snippet" editor, like:
DO CASE
CASE x ==
CASE x ==
CASE x ==
CASE x ==
ENDCASE
@@ -65,7 +73,7 @@
* Repeat the process for some other skeletons.
* Do not forget to click <Update> even after slightest modification.
This will ensure that your skeleton is always in order.
* If you wish to change the name, click on that "Name" in
* If you wish to change the name, click on that "Name" in
"Identity" list-box and click <Rename>, follow next process.
Click <Update> to save permanently.
* <Delete> is not working yet.
@@ -74,20 +82,20 @@
How to Call
===========
* While in the editor tab, position your editing cursor at
* While in the editor tab, position your editing cursor at
desired column.
* Press Ctrl+K, a context menu will appear near left-upper part
of the editing tab containing all skeletons you wrote.
* Use arrow-up/down keys to desired skeleton and press <Enter>.
* The code skeleton will be inserted in the source aligned
* The code skeleton will be inserted in the source aligned
to the column you started with. The cursor will be anchored
on the same place.
* Alternativly you can use mouse, but keyboard navigation is
* Alternativly you can use mouse, but keyboard navigation is
simple in this context.
* Note that alignment and indent of inserted code skeleton is
* Note that alignment and indent of inserted code skeleton is
perfect to starting column.
Note: Your suggessions are welcome to enhance this feature.
Note: Your suggessions are welcome to enhance this feature.
2010-02-13 12:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/strapi.c

View File

@@ -111,16 +111,6 @@ PROCEDURE Main()
? "cData BEFORE: ", cData
? "WIN_DLLCALL (MISSING @1): ", win_dllCall( GetProcAddress( hDLL, "SHGetFolderPath" ), 0, CSIDL_ADMINTOOLS, 0, 0, cData )
? "cData AFTER: ", cData
/*
cData := "aaaaaaaaaaaaaaaaaaaaaa"
? "cData BEFORE: ", cData
? "WIN_DLLCALL (MISSING @2): ", win_dllCall( GetProcAddress( hDLL, "SHGetFolderPath" ), 0, CSIDL_ADMINTOOLS, 0, 0, cData )
? "cData AFTER: ", cData
cData := " "
? "cData BEFORE: ", cData
? "WIN_DLLCALL (MISSING @3): ", win_dllCall( GetProcAddress( hDLL, "SHGetFolderPath" ), 0, CSIDL_ADMINTOOLS, 0, 0, cData )
? "cData AFTER: ", cData
*/
wapi_FreeLibrary( hDLL )
? "DLLCALL"

View File

@@ -166,9 +166,17 @@ static HB_U64 hb_u64par( PHB_ITEM pParam, PHB_WINCALL wcall, int iParam )
case HB_WIN_DLL_CTYPE_CHAR_PTR:
if( wcall->bUNICODE )
r = ( HB_PTRUINT ) hb_itemGetStrU16( pParam, HB_CDP_ENDIAN_NATIVE, &wcall->pArg[ iParam - 1 ].hString, NULL );
{
HB_SIZE nLen;
const HB_WCHAR * s = hb_itemGetStrU16( pParam, HB_CDP_ENDIAN_NATIVE, &wcall->pArg[ iParam - 1 ].hString, &nLen );
r = ( HB_PTRUINT ) hb_wstrunshare( &wcall->pArg[ iParam - 1 ].hString, s, nLen );
}
else
r = ( HB_PTRUINT ) hb_itemGetStr( pParam, hb_setGetOSCP(), &wcall->pArg[ iParam - 1 ].hString, NULL );
{
HB_SIZE nLen;
const char * s = hb_itemGetStr( pParam, hb_setGetOSCP(), &wcall->pArg[ iParam - 1 ].hString, &nLen );
r = ( HB_PTRUINT ) hb_strunshare( &wcall->pArg[ iParam - 1 ].hString, s, nLen );
}
wcall->pArg[ iParam - 1 ].nValue = r;
break;
@@ -383,9 +391,17 @@ static void hb_u32par( PHB_ITEM pParam, PHB_WINCALL wcall, int iParam, HB_U32 *
case HB_WIN_DLL_CTYPE_CHAR_PTR:
if( wcall->bUNICODE )
*r1 = ( HB_U32 ) hb_itemGetStrU16( pParam, HB_CDP_ENDIAN_NATIVE, &wcall->pArg[ iParam - 1 ].hString, NULL );
{
HB_SIZE nLen;
const HB_WCHAR * s = hb_itemGetStrU16( pParam, HB_CDP_ENDIAN_NATIVE, &wcall->pArg[ iParam - 1 ].hString, &nLen );
*r1 = ( HB_U32 ) hb_wstrunshare( &wcall->pArg[ iParam - 1 ].hString, s, nLen );
}
else
*r1 = ( HB_U32 ) hb_itemGetStr( pParam, hb_setGetOSCP(), &wcall->pArg[ iParam - 1 ].hString, NULL );
{
HB_SIZE nLen;
const char * s = hb_itemGetStr( pParam, hb_setGetOSCP(), &wcall->pArg[ iParam - 1 ].hString, &nLen );
*r1 = ( HB_U32 ) hb_strunshare( &wcall->pArg[ iParam - 1 ].hString, s, nLen );
}
wcall->pArg[ iParam - 1 ].value.t.n32 = *r1;
break;