Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pbx2pbd90 Failed!

28 views
Skip to first unread message

loafth

unread,
Sep 27, 2004, 5:12:35 PM9/27/04
to
I use Borland C++ compiler to try one PBNI example
"PNBIHello". I use comand line "bcc32 -WD pbnihello.cpp
pbx_hello.cpp" to created pbnihello.dll with 7 warning
message like "... Parameter 'xxx' is never used in function
__xxx ...", then I copy it to a new folder to create pbd by
using command "pbx2pbd90 c:\pb9\hello\pbnihello.pbd
c:\pb9\hello\pbnihello.dll", it return message:
"Can not get function(PBX_GetDescription) entry point.
Adding file: c:\pb9\hello\pbnihello.dll into
PBD:c:\pb9\hello\pbnihello.pbd ... Failed!"

Is this a compiler problem? I cannot use bcc32 here?

TIA

Eric

unread,
Sep 27, 2004, 8:00:35 PM9/27/04
to
I tried using bcc before and had no luck. I was told to rebuild the pbni
libraries using the borland stuff, but I still never got it working and just
convinced the boss to get VC++. If you have any luck I for one would
appreciate it if you posted how you did it in here.


<loafth> wrote in message news:4158823f.1a5...@sybase.com...

Roy Kiesler [TeamSybase]

unread,
Sep 28, 2004, 12:38:57 AM9/28/04
to
PBNI uses advanced template syntax that is not supported by all C++
compilers -- verify that the version of BCC that you're using supports
the latest ISO template syntax.

--
Roy

loafth

unread,
Sep 28, 2004, 11:14:55 AM9/28/04
to
According to Borland C++ Compiler 5.5 doc, it should support
latest ISO syntax. ("The Borland C++ Compiler 5.5 (BCC) is
the foundation and core technology of C++Builder 5. Borland
C++ Compiler 5.5 is a blazingly fast 32-bit optimizing
compiler. It includes the latest ANSI/ISO C++ language
support including, the STL (Standard Template Library)
framework and C++ template support and the complete Borland
C/C++ Runtime Library (RTL). Also included in the free
download are the Borland C/C++ command line tools such as
the high performance Borland linker and resource compiler.")
I can use BCC32 command line to create dll but with warning
message as following:
-------
C:\Borland\cpp\pbni-2>bcc32 -WD pbnihello.cpp pbx_hello.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
pbnihello.cpp:
Warning W8057 pbnihello.cpp 21: Parameter 'hModule' is never
used in function __stdcall DllMain(void
*,unsigned long,void *)
Warning W8057 pbnihello.cpp 21: Parameter 'lpReserved' is
never used in function __stdcall DllMain(v
oid *,unsigned long,void *)
Warning W8057 pbnihello.cpp 50: Parameter 'session' is never
used in function __stdcall PBX_CreateNo
nVisualObject(IPB_Session *,_pbobject *,const char
*,IPBX_NonVisualObject * *)
Warning W8057 pbnihello.cpp 50: Parameter 'obj' is never
used in function __stdcall PBX_CreateNonVis
ualObject(IPB_Session *,_pbobject *,const char
*,IPBX_NonVisualObject * *)
pbx_hello.cpp:
Warning W8057 pbx_hello.cpp 31: Parameter 'session' is never
used in function PBX_Hello::Invoke(IPB_
Session *,_pbobject *,unsigned short,PBCallInfo *)
Warning W8057 pbx_hello.cpp 31: Parameter 'obj' is never
used in function PBX_Hello::Invoke(IPB_Sess
ion *,_pbobject *,unsigned short,PBCallInfo *)
Warning W8004 pbx_hello.cpp 21: 'pbxr' is assigned a value
that is never used in function PBX_Hello:
:Invoke(IPB_Session *,_pbobject *,unsigned short,PBCallInfo
*)
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
-----------

Then, I run the pbx2pbd90 and it was failed:
----------
C:\pb9\hello>pbx2pbd90 c:\pb9\hello\pbnihello.pbd
c:\pb9\hello\pbnihello.dll


Can not get function(PBX_GetDescription) entry point.
Adding file: c:\pb9\hello\pbnihello.dll into
PBD:c:\pb9\hello\pbnihello.pbd ... Failed!

---------
looks like pbx2pbd90 cannot find the _main() of
PBX_GetDescription(). but compiler does not get this error.
Is this caused by compiling defects (warning)?

TIA

Roy Kiesler [TeamSybase]

unread,
Sep 28, 2004, 8:44:45 PM9/28/04
to

Use DependencyWalker (www.dependencywalker) to verify that you have a
function by that name exported from the DLL without C++ name mangling --
you may need to add a .def file to your project.

--
Roy

Roy Kiesler [TeamSybase]

unread,
Oct 1, 2004, 10:43:16 PM10/1/04
to
Not sure what ___CPPdebugHook is doing... otherwise looks OK.

Can you provide your source CPP file?

--
Roy


loafth wrote:
> I got "Export Function List View" from dependencywalker :
> --------------------------------------------------------------------------------------------------------------------------------------
> E Ordinal Hint Function Entry Point
> ---------------------------------------------------------------------------------------------------------------------------------------
> [c] 1(0x0001) 0(0x0000) PBX_CreateNonVisualObject 0x00001258
> [c] 2(0x0002) 1(0x0001) PBX_GetDescription 0x0000124C
> [c] 3(0x0003) 2(0x0002) ___CPPdebugHook 0x0000916C
>
> and also see the attached screen shot.
> By the way, what kind .def file I should include?

>>>,PBCallInfo *)

Roy Kiesler [TeamSybase]

unread,
Oct 4, 2004, 6:02:10 PM10/4/04
to
Can you debug the DLL and see if you can trap the call the
PBX_GetDescription when pbx2pbd90 is invoked?

--
Roy

loafth wrote:
> I am not sure, I guess it is bcc32 compiler added it...
> All source files are copied from PBDJ PBNI part II, see
> attached doc.
> TIA


>
>
>>Not sure what ___CPPdebugHook is doing... otherwise looks
>>OK.
>>
>>Can you provide your source CPP file?
>>
>>--
>>Roy
>>
>>
>>loafth wrote:
>>
>>>I got "Export Function List View" from dependencywalker
>>>:
>>
>>----------------------------------------------------------
>>----------------------------------------------------------
>>

>>>------------------ E Ordinal Hint


>>>Function Entry Point
>>
>>----------------------------------------------------------
>>----------------------------------------------------------
>>

>>>------------------- [c] 1(0x0001) 0(0x0000)

>>, >>but >>>I still never got it working and just convinced


>>the >>boss >>>to get VC++. If you have any luck I for one
>>would >>
>>
>>>>>>>appreciate it if you posted how you did it in here.
>>>>>>>
>>>>>>><loafth> wrote in message
>>>>>>>news:4158823f.1a5...@sybase.com...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>I use Borland C++ compiler to try one PBNI example
>>>>>>>>"PNBIHello". I use comand line "bcc32 -WD
>>>>
>>>>pbnihello.cpp >>>>pbx_hello.cpp" to created
>>
>>pbnihello.dll >>with 7 warning >>>>message like "...
>>Parameter 'xxx' is >>never used in >>
>>
>>>>>>function >>__xxx ...", then I copy it to a new folder
>>
>>to >>>>create pbd by >>using command "pbx2pbd90
>>
>>>>>>c:\pb9\hello\pbnihello.pbd
>>>>
>>>>c:\pb9\hello\pbnihello.dll" >>
>>>>, >>it return message: >>"Can not get
>>>>
>>>>
>>>>>>function(PBX_GetDescription) entry point. >>Adding
>>
>>file: >>>>c:\pb9\hello\pbnihello.dll into
>>
>>>>>>
>>>>>>>>PBD:c:\pb9\hello\pbnihello.pbd ... Failed!" >>
>>>>>>>>Is this a compiler problem? I cannot use bcc32 here?
>>>>>>>>
>>>>>>>>TIA
>>>>>>>
>>>>>>>
>>>>>>>
>>>>Use DependencyWalker (www.dependencywalker) to verify
>>
>>that >>you have a function by that name exported from the
>>DLL >>without C++ name mangling -- you may need to add a

>>def >>file to your project.
>>
>>>>--
>>>>Roy

loafth

unread,
Oct 5, 2004, 10:32:19 AM10/5/04
to
How to debug DLL? using Dependency? VCC?
By the way, did you get same problem by using bcc32? I guess
if I create dll without any warning, it may be fine. I am
trying to get another C++ compiler.

TIA

Roy Kiesler [TeamSybase]

unread,
Oct 5, 2004, 8:17:35 PM10/5/04
to
You debug the DLL using your C++ debugger by attaching to the
pbx2pbd90.exe process. I'm not using Borland, so I can't really tell you
how its debugger works, but in VC++, you can start a debug session using
any executable that ends up loading the DLL you're debugging into memory
(you just put a break point in dllmain()

--
Roy

zai-qia...@sybase.com

unread,
Oct 25, 2004, 2:59:12 AM10/25/04
to

It should be a calling convention problem.   In pb source code, it used following ways to get the entry point.

                P_PBX_GetDescription registerPspp = (P_PBX_GetDescription)GetProcAddress(d_hinst,
                        "_PBX_GetDescription@0");


The exported function name is "_PBX_GetDescription@0" because it used __stdcall  calling convention.

bluetlck

unread,
Nov 4, 2004, 10:09:49 PM11/4/04
to
you can create a fie named project1.def ,then add it to bcb
project.

the file's content is:
EXPORTS
_PBX_GetDescription@0 = PBX_GetDescription


Good Luck!

0 new messages