Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-18 Thread Maurilio Longo
Przemysław Czerpak wrote:
 modifications. I can compile the .PRG client and server example from
 xHarbour.com OLE server page. I only have to link at least one of
 components (server or client) statically because both linked dynamically
 with the same harbour.dll shares the same HVM so server fails inside
 hb_vmInit(). I can add protection against multiple HVM initialization
 anyhow using the same HVM for client and server code introduces
 interactions between them which do not use OLE API, i.e. they will
 use the same static variables.
 
In OS/2 this is a .dll definition at compile time, that is, INITINSTANCE
clause inside .def file which tells the OS that the data segment has to be
private for each process that attaches to that .dll.

Hope this helps.

Maurilio.

PS. I'm sorry I haven't tested your serial routines under OS/2 yet, I simply
don't have any spare time right now, but they build fine, at least.

-- 
 __
|  |  | |__| Maurilio Longo
|_|_|_|| farmaconsult s.r.l.


___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread druzus
Revision: 14511
  
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=14511view=rev
Author:   druzus
Date: 2010-05-17 11:37:27 + (Mon, 17 May 2010)

Log Message:
---
2010-05-17 13:37 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
  * harbour/include/hbapi.h
  * harbour/src/vm/dynsym.c
+ added to C functions:
 int hb_dynsymToNum( PHB_DYNS pDynSym );
 PHB_DYNS hb_dynsymFromNum( int iSymNum );
  which can be used to make conversion between dynamic symbols and
  numbers

Modified Paths:
--
trunk/harbour/ChangeLog
trunk/harbour/include/hbapi.h
trunk/harbour/src/vm/dynsym.c


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.17 14:37, dru...@users.sourceforge.net wrote:

 + added to C functions:
  int hb_dynsymToNum( PHB_DYNS pDynSym );
  PHB_DYNS hb_dynsymFromNum( int iSymNum );
   which can be used to make conversion between dynamic symbols and
   numbers


It is interesting, what new code is behind this modifications? :) Remote 
function/method execution or that? :)



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Przemysław Czerpak
On Mon, 17 May 2010, Mindaugas Kavaliauskas wrote:

Hi,

 On 2010.05.17 14:37, dru...@users.sourceforge.net wrote:
  + added to C functions:
   int hb_dynsymToNum( PHB_DYNS pDynSym );
   PHB_DYNS hb_dynsymFromNum( int iSymNum );
which can be used to make conversion between dynamic symbols and
numbers
 It is interesting, what new code is behind this modifications? :)
 Remote function/method execution or that? :)

Yes. I've wrote inproc OLE server for Harbour and it uses above
functions to convert function/method/memvar symbols to DISPID in
GetIDsOfNames() dispatch method and they are later converted back
to symbols in Invoke() method.
I've finished the code but I have no idea if it works or not.
I've wrote everything using only documentation in the internet
and haven't made any real life test so far so I do not want to
make it public it yet.
The idea is to create library which can be used by users to
easy create own OLE servers. My current code should fully
emulate the xHarbour.com ole server API:
   http://xharbour.com/index.asp?page=add_on_oleservershow_sub=7show_i=1
and this is one of the possible usage method. I also plan to add
OLE wrappers to HBNETIO so users can use HBNETIO RPC from any other
language which supports OLE, i.e. from Visual Basic or some .NET
language.

best regards,
Przemek
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Viktor Szakáts
Hi Przemek,

 On 2010.05.17 14:37, dru...@users.sourceforge.net wrote:
+ added to C functions:
 int hb_dynsymToNum( PHB_DYNS pDynSym );
 PHB_DYNS hb_dynsymFromNum( int iSymNum );
  which can be used to make conversion between dynamic symbols and
  numbers
 It is interesting, what new code is behind this modifications? :)
 Remote function/method execution or that? :)
 
 Yes. I've wrote inproc OLE server for Harbour and it uses above
 functions to convert function/method/memvar symbols to DISPID in
 GetIDsOfNames() dispatch method and they are later converted back
 to symbols in Invoke() method.
 I've finished the code but I have no idea if it works or not.
 I've wrote everything using only documentation in the internet
 and haven't made any real life test so far so I do not want to
 make it public it yet.
 The idea is to create library which can be used by users to
 easy create own OLE servers. My current code should fully
 emulate the xHarbour.com ole server API:
   http://xharbour.com/index.asp?page=add_on_oleservershow_sub=7show_i=1
 and this is one of the possible usage method. I also plan to add
 OLE wrappers to HBNETIO so users can use HBNETIO RPC from any other
 language which supports OLE, i.e. from Visual Basic or some .NET
 language.

Very nice, count me to those who are eagerly awaiting it.
(even if in not yet fully cooked state)

Viktor

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Mindaugas Kavaliauskas

Hi,



It is interesting, what new code is behind this modifications? :)
Remote function/method execution or that? :)


Yes. I've wrote inproc OLE server for Harbour and it uses above
functions to convert function/method/memvar symbols to DISPID in
GetIDsOfNames() dispatch method and they are later converted back
to symbols in Invoke() method.
I've finished the code but I have no idea if it works or not.
I've wrote everything using only documentation in the internet
and haven't made any real life test so far so I do not want to
make it public it yet.


Perhaps one of the most amazing things is how can you write software 
without testing!!! :) Usualy I can not write more than 30 lines of code 
without trying to run it.




The idea is to create library which can be used by users to
easy create own OLE servers. My current code should fully
emulate the xHarbour.com ole server API:
http://xharbour.com/index.asp?page=add_on_oleservershow_sub=7show_i=1


Very old time ago, after I've seen it. It looked a little strange to me. 
Why the whole application is presented as a single object? This allows 
to call all public functions from external code. I thought it is more 
common to create some Harbour level object and share it via OLE server, 
thus making methods and properties of OLE object to be methods and 
properties of Harbour object (instead of public functions and memvars of 
Harbour application).



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Przemysław Czerpak
On Mon, 17 May 2010, Mindaugas Kavaliauskas wrote:

Hi,

 Yes. I've wrote inproc OLE server for Harbour and it uses above
 functions to convert function/method/memvar symbols to DISPID in
 GetIDsOfNames() dispatch method and they are later converted back
 to symbols in Invoke() method.
 I've finished the code but I have no idea if it works or not.
 I've wrote everything using only documentation in the internet
 and haven't made any real life test so far so I do not want to
 make it public it yet.
 Perhaps one of the most amazing things is how can you write software
 without testing!!! :) Usualy I can not write more than 30 lines of
 code without trying to run it.

Probably each of us likes to tests the code anyhow in the past I had
to create some bigger peaces of code without any way to make real tests
until I finished nearly whole project and believe me it's possible.
In this particular case the code is relatively small ~500 lines.
The most amazing is the fact that I've just compiled it and executed
using WinXP machine in my office and it works correctly without any
modifications. I can compile the .PRG client and server example from
xHarbour.com OLE server page. I only have to link at least one of
components (server or client) statically because both linked dynamically
with the same harbour.dll shares the same HVM so server fails inside
hb_vmInit(). I can add protection against multiple HVM initialization
anyhow using the same HVM for client and server code introduces
interactions between them which do not use OLE API, i.e. they will
use the same static variables.

I'm interesting if it's possible to link both client and sever
dynamically with xhbdll.dll using xHarbour.com. If yes and users
need it then I can also emulate it.

 The idea is to create library which can be used by users to
 easy create own OLE servers. My current code should fully
 emulate the xHarbour.com ole server API:
 http://xharbour.com/index.asp?page=add_on_oleservershow_sub=7show_i=1
 Very old time ago, after I've seen it. It looked a little strange to
 me. Why the whole application is presented as a single object? This
 allows to call all public functions from external code. I thought it
 is more common to create some Harbour level object and share it via
 OLE server, thus making methods and properties of OLE object to be
 methods and properties of Harbour object (instead of public
 functions and memvars of Harbour application).

I also think that opening whole HVM is limited only to some rather
small subset of possible applications and probably more restrictive
servers which make public only some well defined set of methods using
object or hash array will be more popular. But it's not my job to force
how user will use it. The xHarbour.com compatible interface is only one
of possible choices.

best regards,
Przemek
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Przemysław Czerpak
On Mon, 17 May 2010, Szak�ts Viktor wrote:

Hi Viktor,

 Very nice, count me to those who are eagerly awaiting it.
 (even if in not yet fully cooked state)

Thank you.
There are some things which should be added/modified in hbmk2.
First is support for .def files.
This is .def file I used to link inproc OLE server DLL:

   EXPORTS
   DllCanUnloadNow  PRIVATE
   DllGetClassObjectPRIVATE
   DllUnregisterServer
   DllRegisterServer
   DllMain

HBMK2 does not support .DEF files and I had to pass it using -dflag
parameter:
   -dflag=olesrv.def
but I discovered that HBMK2 ignores parameters specified with
*flags=params if params does not start with - so I have to
hack above -dflag parameter to:
   -dflag=-W olesrv.def

Can you recognize .def files and pass them directly to linker?
Why HBMK2 ignore -*flag=params if params does not start with -
character? Can you eliminate this restruction?

The next thing is building DLL and passing some link time parameters
which are used with standalone EXE files. It would be nice if we can
have an option to enable support for -gt and similar switches when
-hbdyn option is used, i.e. this option can be extended to -hbdyn[vm]
and -hbdynvm will enable support for startup options specified in .c
temporary file used for normal executable files and also harbour
core libraries in inked library list. If only -hbdyn is used then
Harbour libraries should nor be linked by default. Do you think it
possible to add it?

best regards,
Przemek
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Viktor Szakáts
Hi Przemek,

 Very nice, count me to those who are eagerly awaiting it.
 (even if in not yet fully cooked state)
 
 Thank you.
 There are some things which should be added/modified in hbmk2.
 First is support for .def files.
 This is .def file I used to link inproc OLE server DLL:
 
   EXPORTS
   DllCanUnloadNow  PRIVATE
   DllGetClassObjectPRIVATE
   DllUnregisterServer
   DllRegisterServer
   DllMain
 
 HBMK2 does not support .DEF files and I had to pass it using -dflag
 parameter:
   -dflag=olesrv.def
 but I discovered that HBMK2 ignores parameters specified with
 *flags=params if params does not start with - so I have to
 hack above -dflag parameter to:
   -dflag=-W olesrv.def
 Can you recognize .def files and pass them directly to linker?
 Why HBMK2 ignore -*flag=params if params does not start with -
 character? Can you eliminate this restruction?

No problem to add support for .def files. I never had 
to use them so far, so maybe it will need a few iterations 
to get right.

As for flag option, I'd prefer to make the filtering, 
otherwise it's very easy to deeply mess up some command 
lines, and can make hbmk2 fall out of control of things.

The general concept is that hbmk2 deals with assembling 
the major components of the cmdline and user user is 
given a chance to supply additional flags only. Hence the 
name -?flag= and ?flags= of these options.

 The next thing is building DLL and passing some link time parameters
 which are used with standalone EXE files. It would be nice if we can
 have an option to enable support for -gt and similar switches when
 -hbdyn option is used, i.e. this option can be extended to -hbdyn[vm]
 and -hbdynvm will enable support for startup options specified in .c
 temporary file used for normal executable files and also harbour
 core libraries in inked library list. If only -hbdyn is used then
 Harbour libraries should nor be linked by default. Do you think it
 possible to add it?

It seems fine to me. Same applies as above, I'm in 
the dark about OLE servers, so I'll either ask, or 
pls tell me what's specifically missing/needed.

So far I understand -hbdynvm would disable -nohblib 
option. Can you help finding out, what's the best 1
description for -hbdynvm mode? -hbdyn is 
create dynamic library. Maybe create dynamic 
library with Harbour VM?

Viktor

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour