HMG 3.4.3

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

huiyi_ch
Posts: 172
Joined: Sat May 21, 2016 5:27 am

Re: HMG 3.4.3

Post 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 7383 times
各位前辈262.png
各位前辈262.png (89.74 KiB) Viewed 7383 times
发现输出结果不相同!
但如果使用函数GetCurrentFolder()代替Getstartupfolder(),结果是正确的!
我的解决办法:
修改文件h_controlmisc.prg 第4853行
Return HB_ULEFT ( StartUpFolder , HB_UTF8RAT ( '\' , StartUpFolder ) - 1 )
为:
Return LEFT ( StartUpFolder , RAT ( '\' , StartUpFolder ) - 1 )
重新构建LIB库,再重新编译运行程序,显示结果正常。
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.4.3

Post 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
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.4.3

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.4.3

Post by mol »

I think I mistake hmg version and tried to compile with hmg 340 :)
Sorry for this false alert :)
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.4.3

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Leopoldo Blancas
Posts: 388
Joined: Wed Nov 21, 2012 7:14 pm
Location: México

Re: HMG 3.4.3

Post 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 !!!
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.4.3

Post by Pablo César »

Hola Leopoldo, bien venido !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
nguyenchiduc
Posts: 78
Joined: Sat Nov 13, 2010 7:27 am

Re: HMG 3.4.3

Post 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
Attachments
loi Netio.jpg
loi Netio.jpg (21.71 KiB) Viewed 6761 times
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG 3.4.3

Post by bpd2000 »

You have to change Config.ini file located at "C:\hmg\SAMPLES\Miscellaneous\NETIO\NETIO_02\HmgNetIOServer"
BPD
Convert Dream into Reality through HMG
User avatar
nguyenchiduc
Posts: 78
Joined: Sat Nov 13, 2010 7:27 am

Re: HMG 3.4.3

Post 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
Attachments
NetIO Server.png
NetIO Server.png (61.97 KiB) Viewed 6747 times
Post Reply