HMG 3.4.3
Moderator: Rathinagiri
Re: HMG 3.4.3
各位前辈,各位同仁:你们好,
我发现GetstartupFolder()函数存在BUG,请看例子:假定该程序运行在“D:\中国”文件下:
#include <hmg.ch>
REQUEST HB_CODEPAGE_GBK
Function Main()
msginfo(GetStartUpFolder(),"1")
hb_CdPSelect("GBK")
msginfo(GetStartUpFolder(),"2")
return nil
运行结果: 发现输出结果不相同!
但如果使用函数GetCurrentFolder()代替Getstartupfolder(),结果是正确的!
我的解决办法:
修改文件h_controlmisc.prg 第4853行
Return HB_ULEFT ( StartUpFolder , HB_UTF8RAT ( '\' , StartUpFolder ) - 1 )
为:
Return LEFT ( StartUpFolder , RAT ( '\' , StartUpFolder ) - 1 )
重新构建LIB库,再重新编译运行程序,显示结果正常。
我发现GetstartupFolder()函数存在BUG,请看例子:假定该程序运行在“D:\中国”文件下:
#include <hmg.ch>
REQUEST HB_CODEPAGE_GBK
Function Main()
msginfo(GetStartUpFolder(),"1")
hb_CdPSelect("GBK")
msginfo(GetStartUpFolder(),"2")
return nil
运行结果: 发现输出结果不相同!
但如果使用函数GetCurrentFolder()代替Getstartupfolder(),结果是正确的!
我的解决办法:
修改文件h_controlmisc.prg 第4853行
Return HB_ULEFT ( StartUpFolder , HB_UTF8RAT ( '\' , StartUpFolder ) - 1 )
为:
Return LEFT ( StartUpFolder , RAT ( '\' , StartUpFolder ) - 1 )
重新构建LIB库,再重新编译运行程序,显示结果正常。
Re: HMG 3.4.3
Something is wrong, when I try to compile Roberto sample netio server. I'm getting error after starting application.
Error description:
Code is very simple:
I've compiled app using hmg342 and everything is OK
Error description:
Code: Select all
Date:09/27/16 Time: 13:34:57
Error BASE/1132 Bound error: array access
Called from EVENTPROCESSHMGWINDOWSMESSAGE(240)
Called from INIT(834)
Called from ERRORSYS(59)
Called from __HBVMINIT(0)
Code: Select all
#include <hmg.ch>
Function Main
LOCAL nPort := 50000
LOCAL cIfAddr := '0.0.0.0'
LOCAL cRootDir := '.'
LOCAL lRPC := .T.
LOCAL cPasswd := 'secret'
LOCAL nCompressionLevel := 9
LOCAL nStrategy := NIL
LOCAL pSockSrv := NIL
* Start Server
pSockSrv := NETIO_MTSERVER( nPort , cIfAddr , cRootDir , lRPC , cPasswd , nCompressionLevel , nStrategy )
if empty( pSockSrv )
MSGSTOP("Can't Start Server!")
RETURN
endif
//Load Window Main
DEFINE WINDOW MainForm ;
AT 50,50 ;
WIDTH 500 HEIGHT 300 ;
TITLE 'Netio Serwer' ;
Main ;
NOSIZE
END Window
MainForm.Activate
* Stop Server
netio_serverstop( pSockSrv , .t. )
Return
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.4.3
I will check .mol wrote:Something is wrong, when I try to compile Roberto sample netio server. I'm getting error after starting application.
Error description:Code is very simple:Code: Select all
Date:09/27/16 Time: 13:34:57 Error BASE/1132 Bound error: array access Called from EVENTPROCESSHMGWINDOWSMESSAGE(240) Called from INIT(834) Called from ERRORSYS(59) Called from __HBVMINIT(0)
I've compiled app using hmg342 and everything is OKCode: Select all
#include <hmg.ch> Function Main LOCAL nPort := 50000 LOCAL cIfAddr := '0.0.0.0' LOCAL cRootDir := '.' LOCAL lRPC := .T. LOCAL cPasswd := 'secret' LOCAL nCompressionLevel := 9 LOCAL nStrategy := NIL LOCAL pSockSrv := NIL * Start Server pSockSrv := NETIO_MTSERVER( nPort , cIfAddr , cRootDir , lRPC , cPasswd , nCompressionLevel , nStrategy ) if empty( pSockSrv ) MSGSTOP("Can't Start Server!") RETURN endif //Load Window Main DEFINE WINDOW MainForm ; AT 50,50 ; WIDTH 500 HEIGHT 300 ; TITLE 'Netio Serwer' ; Main ; NOSIZE END Window MainForm.Activate * Stop Server netio_serverstop( pSockSrv , .t. ) Return
I think I have an idea of what it can be.
Re: HMG 3.4.3
I think I mistake hmg version and tried to compile with hmg 340
Sorry for this false alert
Sorry for this false alert
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.4.3
Ok, not problem.mol wrote:I think I mistake hmg version and tried to compile with hmg 340
Sorry for this false alert
-
- Posts: 388
- Joined: Wed Nov 21, 2012 7:14 pm
- Location: México
Re: HMG 3.4.3
Hola a Todos:
Este es mi primer día en HMG y es como "volver a empezar", gracias por esta nueva versión!!!
***********************************************************************************************************************************
Hello everyone:
This is my first day as HMG and "start over", thank you for this new version !!!
Este es mi primer día en HMG y es como "volver a empezar", gracias por esta nueva versión!!!
***********************************************************************************************************************************
Hello everyone:
This is my first day as HMG and "start over", thank you for this new version !!!
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
HMG 3.4.3
Hola Leopoldo, bien venido !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- nguyenchiduc
- Posts: 78
- Joined: Sat Nov 13, 2010 7:27 am
Re: HMG 3.4.3
About Netio
I dont know why version 3.4.3 , 3.4.2 , 3.4.1 , I see config NetIO Servert is: C:\Project\NEIOServer\DataBase
I don't have C:\Project folder in my PC
When I edit database path is c:\temp and copy some file dbf in c:\temp but NetIO Client dont see !?
I use Window 8 , 32 bit
I dont know why version 3.4.3 , 3.4.2 , 3.4.1 , I see config NetIO Servert is: C:\Project\NEIOServer\DataBase
I don't have C:\Project folder in my PC
When I edit database path is c:\temp and copy some file dbf in c:\temp but NetIO Client dont see !?
I use Window 8 , 32 bit
- Attachments
-
- loi Netio.jpg (21.71 KiB) Viewed 6834 times
Re: HMG 3.4.3
You have to change Config.ini file located at "C:\hmg\SAMPLES\Miscellaneous\NETIO\NETIO_02\HmgNetIOServer"
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- nguyenchiduc
- Posts: 78
- Joined: Sat Nov 13, 2010 7:27 am
Re: HMG 3.4.3
Thank youbpd2000 wrote:You have to change Config.ini file located at "C:\hmg\SAMPLES\Miscellaneous\NETIO\NETIO_02\HmgNetIOServer"
I fogot insert some dbf files in includes form before compiler by IDE
- Attachments
-
- NetIO Server.png (61.97 KiB) Viewed 6820 times