Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Which wwDotNetBridge files I need to add to my project?

$
0
0
Re: Which wwDotNetBridge files I need to add to my project?
VFP and .NET Interop
Re: Which wwDotNetBridge files I need to add to my project?
Apr. 11, 2013
11:25 am
3RC0OI0MSShow this entire thread in new window
Gratar Image based on email address
From:esreed
To:Rick Strahl
Rick,
Thanks for support the VFP community!

Regards.


Thanks Emerson,

Fixed.

I've updated the two files. Not quite sure how that happened - my current version has had the changes for quite a while. IAC, it should work now and there are no longer any external PRG dependencies.

+++ Rick ---



Rick, I think I found the problem:
There are 2 different wwDotNetBride.prg on GitHub: one inside examples folder and another inside distribution folder.
The one in examples folder have the GetHighestDotnetVersion function declaration, but doesn't have the changes that you've made to call GetHighestDotnetVersion instead of IsDotNet.
The one in distribution folder have the changes that you've made to call GetHighestDotnetVersion instead of IsDotNet, but doesn't have the GetHighestDotnetVersion function declaration.
It seems that the changes are mixed and causing the problem...


I've downloaded the GitHub version.
Take a look at the code from GitHub's wwDotNetBridge.prg (it has a call to GetHighestDotnetVersion function that isn't declared):

FUNCTION GetwwDotNetBridge(lcVersion)IFVARTYPE(__DOTNETBRIDGE) != "O"*** Auto-detect latest version*** This requires wwUtils/wwApiIFEMPTY(lcVersion) lcVersion = GetHighestDotnetVersion() && Here is the function call that causes the compilation error...IFISNULL(lcVersion)ERROR"Couldn't find a .NET version installed."ENDIFENDIFPUBLIC __DOTNETBRIDGE __DOTNETBRIDGE = CREATEOBJECT("wwDotNetBridge",lcVersion)IFVARTYPE(__DOTNETBRIDGE) # "O"RETURNNULLENDIFENDIFRETURN __DOTNETBRIDGEENDFUNC

You need to download the latest version from GitHub since I made that change after our discussion.

+++ Rick ---


Hi Rick.
Let me try to clarify the issue...
You said that I only need wwDotNetBridge.prg, wwDotNetBridge.dll and ClrHost.dll if I'm using the open source version, right?
So, I've added wwDotNetBridge.prg to my project (pjx) and placed the two DLL files in the same folder of my application (exe).
When I'm compiling my project, I receive the error that GetHighestDotnetVersion() function isn't declared.
I've searched for GetHighestDotnetVersion function declaration inside all the prgs included in the download file, and can't find it.
Note that I'm not distributing wwDotNetBridge.prg outside my application (exe), it is included in my exe.

PS: The prg inside the distribution folder (has a call GetHighestDotnetVersion function) is different than the one in examples folder (has a call IsDotNet function). Is this intentional?


Not sure it works for me. GetHighestDotnetVersion() is at the bottom of wwDotnetBridge, so it has to be there.

Make sure you SET PROCEDURE TO wwDotnetBridge ADDITIVE or:

DO wwDotnetBridge loBridge = GetwwDotnetBridge()

+++ Rick ---



The compilation error changed from "undefined IsDotNet function" to "undefined GetHighestDotNetVersion function"...

I've updated wwDotnetBridge.prg to not require any dependencies right now. Download the latest version and you should then only need wwDotnetBridge.prg (and the two dlls).

Basically all you need is in the distribution folder.

+++ Rick ---



Hi Rick.
So, it means that I just need to add wwDotnetBridge.prg to my project, since I'm using the open source version, right?
What do you think about to place GetwwDotNetBridge inside an #IF IS_WESTWIND statement (the same way you do to define WWC_CLR_HOSTDLL constant) to avoid project compilation errors in the open source version?

Regards,

Dependencies are loaded in DO wwDotnetBridge - you can look in the PRG file (or any of our PRG files).

You need wwDotnetBridge.prg, wwUtils.prg and wwAPI.prg and wconnect.h.

If you're using the open source version then you don't need the other dependencies because they're only needed for GetwwDotnetBridge() which is not included in that package.

+++ Rick ---



Hi folks!
I would like to know which wwDotNetBridge files I need to add to my project to get my exe succesfully compiled.
I've just added wwDotNetBridge.prg, but when I compile my project, an error occurs:
Unable to find Unknown ISDOTNET
It seems that IsDotNet function isn't declared in wwDotNetBridge.prg...

















Viewing all articles
Browse latest Browse all 10393

Trending Articles