Calling OW XE business functions from within a Visual Basic application

NickBurton

Member
Does anyone know of any way to call OW business functions from within a Visual Basic application?


Thanks in anticipation,

Nick Burton
 
Hi,
One way of achieving this is by calling a DLL. Create a C++ DLL that will handle the API call to OW and then call the DLL in VB (using the BSFN name as a Parameter).

Muda Williams
Consultant
XE SP16
 
Muda,

Thanks for your reply (and quick too!),

But ... assuming little C++ knowledge what would be the steps necessary i.e. what would the C++ DLL need to contain to allow it to handle the API call to OW?

Cheers,

Nick
 
Inside the OneWorld Documentation under Technical is a section call Interoperability. Inside of this section you should find an area about COM and more specifically the GenCOM utility.
The GenCOM utility will take BSFNs you specify and turn them into DLL files which can then be referenced in your VB project.
 
Nick,

Check out the OneWorld documentaion for Interoperability, especially the
section on GenCom.

Barry
 
Thanks Alex,

Nothing's ever simple is it?

I have downloaded the AddressBook sample from the KG and when I run the Make batch file that does the Gencom stuff it fails as follows:

C:\Development\GenCom\AddrBook Sample>make

C:\Development\GenCom\AddrBook Sample>cd "Address Book"

C:\Development\GenCom\AddrBook Sample\Address Book>gencom /cmd "..\gencom scripts\AddressBook.cmd"
OneWorld(tm) COM Interface Generator
Copyright (C) 1996-2000 J.D. Edwards World Source Company
All Rights Reserved.
GetMailingName [D0100031]
GetABEffectiveDate [D0100019]
GetPhone [D0100032]
GetParentAddress [D0100381]
GetEffectiveAddress [D0100033]
Computing generated files...
Assigning UUID's...
Generating header files...
Generating implementation files...
Generating def files...
Generating idl files...
Generating Makefiles...
Generating resource files...
Generating xml files...

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

midl.exe /nologo /D "_DEBUG" /win32 /I "..\include" /h C:\DOCUME~1\NICKBU~1\LOCALS~1\Temp\AddressBook.hh /tlb AddressBook.tlb /iid C:\DOCUME~1\NICKBU
~1\LOCALS~1\Temp\AddressBook_i.c /proxy C:\DOCUME~1\NICKBU~1\LOCALS~1\Temp\AddressBook_c.c AddressBook.idl
Processing .\AddressBook.idl
AddressBook.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\oaidl.idl
oaidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\objidl.idl
objidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\unknwn.idl
unknwn.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\wtypes.idl
wtypes.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\ocidl.idl
ocidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\oleidl.idl
oleidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\servprov.idl
servprov.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\urlmon.idl
urlmon.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\include\msxml.idl
msxml.idl
midl : command line error MIDL1001 : cannot open input file JDECOMConnector2.idl

NMAKE : fatal error U1077: 'midl.exe' : return code '0x7ea'
Stop.

My PC has OW Standalone Release B733 SP13 and the "JDECOMConnector2.idl" file is in the "C:\B7\System\Include" folder.

Any help gratefully received!

Cheers,

Nick
 
Nick,

Did you set up the evnironment variable (path, include, etc.) as defined in
the Generating COM Wrappers.doc on your workstation? This is very critical
in getting GenCom to work.

Barry
 
Hi Nick Below is the text that I copied from the set up document. Hope this helps:



Setting up VisualC++ to build Invoker Application using the XMLCallObject API.

1. Create new Win32 Console project
2. Add the invoker.cpp file to the project.
3. Open “Project” – “Settings…”. Select the project name on the left side of the dialog box.

a. On the C/C++ tab. Category=”General”, add “,KERNEL” to the “Preprocessor definitions”.




b. On the Link tab. Add “xmlinterop.lib” to the Obect/Library modules.


4. Open “Tools” - “Options…”. Select the “Directories” tab.
a. Select “Show directories for” = “Include files”. Add your b7\system\Include, b7\system\IncludeV and b7\<pathcode>\include


b. Select “Show directories for” = “Library files”. Add your b7\system\lib32.



Muda Williams
Consultant
XE SP16
 
Back
Top