Copy a BSFN to the new BSFN

imported_DennisLaw

Member
[crazy]
Hi all,

I Copied the business function(i.e. B0001) to make the new business function name (i.e. B0002). I modified the .h and .c programmes to the new name (B0002). No error occurs after business build. When I run the application to call the new business funciton. I got the messages'BSFN load failed-Callbsfn.dll_function name@12"
Is anyone can help me to sove this problem?

Thanks
Dennis Law

Oneworld XE (B7333) SP14.2
 
Both BSFN has the same name??
If isnt,try to compile in another dll.

----------------------------------------------------------------------------
-----
B733 - SP 20_J1 / ES NT - W2K - ORACLE 8i / Clients - W98 , W2K Pro , XP Pro





This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies.
We may monitor email to and from our network.



--------------------------------------------------------------------
--------------------------------------------------------------------
B733 SP11.2 -->SP 20 ORACLE 8.1.7 W2000
 
Hi Dennis,
Could you give us some detail on the steps you went through copying the BSFN?
Did you go in OMW FIRST? What about the Data Structure? When did you attach it? ...
Warm regards,
 
Hi Adrian,

1) I copied the BSFN (C program .h ) from \B7\Py7333\include and rename to new name (ie. B00002) and use C++ program to change the file name from B0001 to B0002.
2) I copied the BSFN (C program .c ) from \B7\Py7333\source and rename to new name (ie. B00002) and use C++ program to change the file name from B0001 to B0002 as well.
3) After that I went to OMW to create the Business function and attached the same Data structure as B0001. Aslo I made the new function name.
4) I built the business function without any error.
5) I used my application to call this business function, then I got the Business function loaded error-CALLBSDN.DLL-functionname@12
-the BSFN (i.e B0001) was working. The purpose what I want to create the new business function (B0002) to perform the other similar task.

Thanks
Dennis
 
Hi Dennis,

1.) How did you build the BSFN? With the Build Business Function in OMW or other way?

2.) What type(s) of object(s) do(es) call this BSFN (e.g. APPL, UBE, BSFN, Table Trigger)?

3.) Did you build the BSFN into CALLBSDN.DLL? Is it a custom DLL or you miss typed and it is CALLBSFN.DLL?

Sorry, no help, only questions.

Regards,

Zoltán
 
Hi,

Before copying the .c & .h file, you should create the skelton via OMW. After that, you copy the C code function by function.
Source Files
B0001 B550001
Function01 -> Function01_55

You cannot just copy the .c & .h

Jean
 
When an application calls the function you created, it will use the name you provided in OMW to load it from the DLL you specified. Since the build is OK, this means that all the links from the DLL file to the C source is fine.

I think that forgot one step. You mentionned that you changed the name of the function in OMW. Make sure that THE NAME OF THE FUNCTION SPECIFIED IN OMW IS THE SAME AS THE NAME OF THE FUNCTION IN THE SOURCE.

Good luck!
 
Hi Sle118,

I knew that the name of the function specified in OMW is the same as the name in the source.

Thanks
Dennis
 
OK.

Try the following:

Using the dependency walker, open up the DLL you specified for the business function in OMW (is it CALLBSFN.DLL?).

You can find it under the tools menu of visual studio. Mine is in the following path:
"C:\Program Files\Microsoft Visual Studio\Common\Tools\DEPENDS.EXE"

Now look at the second list from the top in the right column. All the functions in the DLL are there. Make sure the function name you entered in OMW is present.

I assume that it is not.

Please post the JDE.LOG so we have the real names and full error text.

Can you also do a design on the business function and tell us the REAL name for the library AND the real name and description of the FUNCTION itself.

The method you used should work.

Why not post the 'c' and the 'h' files also just in case (assuming there is no "secret" functionality you would not want to expose here).
 
Unless you know C very well you probably won't make all the necessary changes in the C file and H file to make it work correctly. But, to me it's just not worth the effort to try and make the changes needed. The best method is to go back to what Jean suggested. Use OMW to create the skeleton and then copy the C code function by function. This is the method that I use because it is easy and it works everytime.
|
 
One reason the build may have worked is that the original .h file is still there. I bet if you delete the original H file the build would fail. You didn't mention anything about changing any code in the files. I bet your c file still has an include statement that references your previous .h file instead of the new one. The #defines in the new H file are probably making reference to the original h file name as well.
|
 
Hi all,

I followed Jean suggestion, I created the skelton through OMW, click the create button. After that copy and paste the code into the .c and .h file. It works.

Thanks everyone suggestion. your help is very appreciate.

Dennis
 
Back
Top