Hi Oleg,

Thanks for the suggestion. 

Been sick with a nasty throat infection which put me to bed for 3 days.
Still, I was able to compile and debug the JFE example and what it does
is call J.DLL directly. I still haven't gotten around to integrating it.

It is most likely that I'll implement this solution instead of using
COM. My only concern is that I was hoping to use the interactive J
session to analyze the data coming in from the game engine. Also, since
it is using J.DLL, I would not be able to access some "windows/forms"
capabilities but I'll just cross the bridge when I get there.

Thanks.

r/alex

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Oleg Kobchenko
Sent: Friday, July 18, 2008 12:50 PM
To: General forum
Subject: Re: [Jgeneral] Help in integrating J with C++ on VS.NET 2005

I think you are using old OLE sample, which
may not be exactly very compatible in VS 2005.

Note in header:
/* File created by MIDL compiler version 5.01.0164 */

It means that these thunks should be able to be
regenerated just from the DLL directly again,
ie imported as references, whatever it is now called.

However, maybe using it as DLL is better and more
portable than using COM.

See the ~system/examples/jfe folder.

Also think and compare how it works with C#.



> From: Alex Rufon <[EMAIL PROTECTED]>
> 
> Hi.
> 
> 
> 
> A few years back, I was able to integrated J5 with the Torque Game
> Engine . After 3 hard disk failures, I
> couldn't find the code anymore.
> 
> 
> 
> Since I have J602, I went to the system\examples\ole\cpp\p_jcl
directory
> and compiled the project there using Visual Studio .NET 2005. First
off,
> the project would not compile because it was referencing jexe_i.c and
> jdll_i.c which does not exist. I deleted those two files and copied
the
> contents of system\examples\ole\cpp\p_jcli and appending it to
> system\examples\ole\cpp\p_jcl\jsrv.h. The project would now compile
> properly and you can run the project. 
> 
> 
> 
> Looking at how the sample application behaves and the way it was
coded,
> I believe that this example project was for J4 or lower. I say this
> because I know for a fact that the way it was coded, it would never be
> able to display the current J session in the screen starting with J5.
> 
> 
> 
> So I took the following files from the CPP example project and added
> them to the latest version of Torque Game Engine:
> 
> 1.       Jexe.h
> 
> 2.       Jdll.h
> 
> 3.       Jsvr.h
> 
> 4.       Jsvr.cpp
> 
> 
> 
> Now, my problem is that the compiler is throwing the following error:
> 
> 1>c:\program files\microsoft visual studio
> 8\vc\platformsdk\include\guiddef.h(150) : error C2065: 'REFGUID' :
> undeclared identifier
> 
> 1>c:\program files\microsoft visual studio
> 8\vc\platformsdk\include\guiddef.h(150) : error C2146: syntax error :
> missing ')' before identifier 'rguid1'
> 
> 1>c:\program files\microsoft visual studio
> 8\vc\platformsdk\include\guiddef.h(150) : error C2433:
> 'InlineIsEqualGUID' : 'inline' not permitted on data declarations
> 
> 1>c:\program files\microsoft visual studio
> 8\vc\platformsdk\include\guiddef.h(150) : error C2059: syntax error :
> ')'
> 
> 
> 
> Line 150 in the standard library is:
> 
> __inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
> 
> {
> 
>    return (
> 
>       ((unsigned long *) &rguid1)[0] == ((unsigned long *) &rguid2)[0]
> &&
> 
>       ((unsigned long *) &rguid1)[1] == ((unsigned long *) &rguid2)[1]
> &&
> 
>       ((unsigned long *) &rguid1)[2] == ((unsigned long *) &rguid2)[2]
> &&
> 
>       ((unsigned long *) &rguid1)[3] == ((unsigned long *)
&rguid2)[3]);
> 
> }
> 
> 
> 
> But around line 108 in the same file, we have the definition for
REFGUID
> as:
> 
> #ifndef _REFGUID_DEFINED
> 
> #define _REFGUID_DEFINED
> 
> #ifdef __cplusplus
> 
> #define REFGUID const GUID &
> 
> #else
> 
> #define REFGUID const GUID * __MIDL_CONST
> 
> #endif
> 
> #endif
> 
> 
> 
> And around line 27, the GUID constant is defined as:
> 
> #ifndef GUID_DEFINED
> 
> #define GUID_DEFINED
> 
> #if defined(__midl)
> 
> typedef struct {
> 
>     unsigned long  Data1;
> 
>     unsigned short Data2;
> 
>     unsigned short Data3;
> 
>     byte           Data4[ 8 ];
> 
> } GUID;
> 
> #else
> 
> typedef struct _GUID {
> 
>     unsigned long  Data1;
> 
>     unsigned short Data2;
> 
>     unsigned short Data3;
> 
>     unsigned char  Data4[ 8 ];
> 
> } GUID;
> 
> #endif
> 
> #endif
> 
> 
> 
> So now I am stomped. I would appreciate any help/insight/suggestion
> regarding the matter. Thanks.
> 
> 
> 
> r/alex
> 
> 
> 
> P.S.
> 
> If you're wondering why I'm trying to get this to work ... I'm
replacing
> the math libraries of the game engine and make it use J as it
> calculator.
> 
> 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



      
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to