Page 9 of 30

Re: HMG 3.4.3

Posted: Sun Sep 11, 2016 8:03 am
by huiyi_ch
各位前辈,各位同仁:你们好,
我发现GetstartupFolder()函数存在BUG,请看例子:假定该程序运行在“D:\中国”文件下:
#include <hmg.ch>
REQUEST HB_CODEPAGE_GBK
Function Main()
msginfo(GetStartUpFolder(),"1")
hb_CdPSelect("GBK")
msginfo(GetStartUpFolder(),"2")
return nil
运行结果:
各位前辈259.png
各位前辈259.png (89.27 KiB) Viewed 7385 times
各位前辈262.png
各位前辈262.png (89.74 KiB) Viewed 7385 times
发现输出结果不相同!
但如果使用函数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

Posted: Tue Sep 27, 2016 7:37 pm
by mol
Something is wrong, when I try to compile Roberto sample netio server. I'm getting error after starting application.
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 is very simple:

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
I've compiled app using hmg342 and everything is OK

Re: HMG 3.4.3

Posted: Tue Sep 27, 2016 10:51 pm
by srvet_claudio
mol wrote:Something is wrong, when I try to compile Roberto sample netio server. I'm getting error after starting application.
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 is very simple:

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
I've compiled app using hmg342 and everything is OK
I will check .
I think I have an idea of ​​what it can be.

Re: HMG 3.4.3

Posted: Wed Sep 28, 2016 12:26 pm
by mol
I think I mistake hmg version and tried to compile with hmg 340 :)
Sorry for this false alert :)

Re: HMG 3.4.3

Posted: Thu Sep 29, 2016 2:04 am
by srvet_claudio
mol wrote:I think I mistake hmg version and tried to compile with hmg 340 :)
Sorry for this false alert :)
Ok, not problem.

Re: HMG 3.4.3

Posted: Thu Oct 06, 2016 12:29 am
by Leopoldo Blancas
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 !!!

HMG 3.4.3

Posted: Thu Oct 06, 2016 12:01 pm
by Pablo César
Hola Leopoldo, bien venido !

Re: HMG 3.4.3

Posted: Sun Oct 16, 2016 2:13 pm
by nguyenchiduc
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

Re: HMG 3.4.3

Posted: Sun Oct 16, 2016 2:25 pm
by bpd2000
You have to change Config.ini file located at "C:\hmg\SAMPLES\Miscellaneous\NETIO\NETIO_02\HmgNetIOServer"

Re: HMG 3.4.3

Posted: Sun Oct 16, 2016 3:14 pm
by nguyenchiduc
bpd2000 wrote:You have to change Config.ini file located at "C:\hmg\SAMPLES\Miscellaneous\NETIO\NETIO_02\HmgNetIOServer"
Thank you

I fogot insert some dbf files in includes form before compiler by IDE