Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

PB07 How to declare or use a dll made with .net

6 posts in Objects Last posting was on 2007-10-04 20:45:11.0Z
Mike Mex Posted on 2007-10-03 16:36:11.0Z
Sender: 3156.4703b2f0.1804289383@sybase.com
From: Mike Mex
Newsgroups: sybase.public.powerbuilder.objects
Subject: PB07 How to declare or use a dll made with .net
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4703c4fb.3467.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Oct 2007 09:36:11 -0700
X-Trace: forums-1-dub 1191429371 10.22.241.41 (3 Oct 2007 09:36:11 -0700)
X-Original-Trace: 3 Oct 2007 09:36:11 -0700, 10.22.241.41
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9500
Article PK: 736658

Hello!
Question 1:
In PB 7.0.3 Build 10312 I am trying to use a dll made with
.NET but I do not know how to declare it.

Question 2:
This dll is already registered in my PC and I was able to
use it with PB11 build 6501, creating a .Net windows forms
application, but I can not use or see it with in a regular
application. Is ther a way to use it in a regular
application in PB11?

Can anyone show me how?

Thanks.


Bruce Armstrong [TeamSybase] Posted on 2007-10-03 16:44:18.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4703c4fb.3467.1681692777@sybase.com>
Subject: Re: PB07 How to declare or use a dll made with .net
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 12.198.167.34
X-Original-NNTP-Posting-Host: 12.198.167.34
Message-ID: <4703c6e2$2@forums-1-dub>
Date: 3 Oct 2007 09:44:18 -0700
X-Trace: forums-1-dub 1191429858 12.198.167.34 (3 Oct 2007 09:44:18 -0700)
X-Original-Trace: 3 Oct 2007 09:44:18 -0700, 12.198.167.34
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9501
Article PK: 736657

It is an assembly, or a C++ DLL?

If it's a C++ DLL, are the functions exported in _STDCALL format?

If it's an assembly, are the functions marked as COM-Visible so that they
could be used through a CCW?

<Mike Mex> wrote in message news:4703c4fb.3467.1681692777@sybase.com...
> Hello!
> Question 1:
> In PB 7.0.3 Build 10312 I am trying to use a dll made with
> NET but I do not know how to declare it.
>
> Question 2:
> This dll is already registered in my PC and I was able to
> use it with PB11 build 6501, creating a .Net windows forms
> application, but I can not use or see it with in a regular
> application. Is ther a way to use it in a regular
> application in PB11?
>
> Can anyone show me how?
>
> Thanks.


Jim O'Neil [Sybase] Posted on 2007-10-03 16:47:57.0Z
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: PB07 How to declare or use a dll made with .net
Message-ID: <vrh7g39j0cpeptu45qep2pfmh5733j7v1r@4ax.com>
References: <4703c4fb.3467.1681692777@sybase.com>
X-Newsreader: Forte Agent 4.2/32.1118
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: joneilxp.sybase.com
X-Original-NNTP-Posting-Host: joneilxp.sybase.com
Date: 3 Oct 2007 09:47:57 -0700
X-Trace: forums-1-dub 1191430077 10.18.62.165 (3 Oct 2007 09:47:57 -0700)
X-Original-Trace: 3 Oct 2007 09:47:57 -0700, joneilxp.sybase.com
Lines: 22
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9502
Article PK: 736660

You need to access it using a COM Callable Wrapper (CCW), which is
Microsoft interop strategy for Win32 applications. In PowerBuidler
you would access it just like a COM object (e.g., ConnectToNewObject,
etc.)

On 3 Oct 2007 09:36:11 -0700, Mike Mex wrote:

>Hello!
>Question 1:
>In PB 7.0.3 Build 10312 I am trying to use a dll made with
>NET but I do not know how to declare it.
>
>Question 2:
>This dll is already registered in my PC and I was able to
>use it with PB11 build 6501, creating a .Net windows forms
>application, but I can not use or see it with in a regular
>application. Is ther a way to use it in a regular
>application in PB11?
>
>Can anyone show me how?
>
>Thanks.


Mike Mex Posted on 2007-10-04 13:12:31.0Z
Sender: 4b9d.4704e3df.1804289383@sybase.com
From: Mike Mex
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: PB07 How to declare or use a dll made with .net
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4704e6bf.4bdd.1681692777@sybase.com>
References: <vrh7g39j0cpeptu45qep2pfmh5733j7v1r@4ax.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-=_forums-1-dub4704e6bf"
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Oct 2007 06:12:31 -0700
X-Trace: forums-1-dub 1191503551 10.22.241.41 (4 Oct 2007 06:12:31 -0700)
X-Original-Trace: 4 Oct 2007 06:12:31 -0700, 10.22.241.41
Lines: 1766
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9503
Article PK: 736664

I am attaching the DLL that I am trying to use in PB7, but I
think that I just do not have the right sintax to declare it
in PB7.

To register this dll, I runned the fallowing code in a batch
file (install.bat)

REM * PATH_DLL: Path where the DLL 'PosServerMiddlware .dll'
is.
REM * PATH_UTILS: Path where the Framework "regasm.exe" and
REM "gacutil.exe" are

REM Registrar Assembly
"%PATH_UTILS%\regasm.exe"
"%PATH_DLL%\PosServerMiddleware.dll"
/tlb:"%PATH_DLL%\PosServerMiddleware.tlb"

REM Registrar en el GAC
"%PATH_UTILS%\gacutil.exe" /i
"%PATH_DLL%\PosServerMiddleware.dll"

Thanks