Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - - 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.

PowerPack DLLs

2 posts in PB Native Interface Last posting was on 2007-06-25 13:27:27.0Z
chance Posted on 2007-06-23 16:14:03.0Z
Reply-To: "chance" <>
From: "chance" <>
Newsgroups: sybase.public.powerbuilder.pbni
Subject: PowerPack DLLs
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Message-ID: <467d46cb@forums-1-dub>
Date: 23 Jun 2007 09:14:03 -0700
X-Trace: forums-1-dub 1182615243 (23 Jun 2007 09:14:03 -0700)
X-Original-Trace: 23 Jun 2007 09:14:03 -0700,
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.pbni:1842
Article PK: 738846

I want to use Roy's PowerPack for base64 encoding. However, when I try to
call the function I get a bad run-time reference. I suspect it is because I
am missing the required DLLs. I see a list of them in the PBNI chapter of
the PB9 book. However, I was wondering if anyone has a zip file of all of
them. Don't want to go out looking for each one.

best regards,

Roland Smith [TeamSybase] Posted on 2007-06-25 13:27:27.0Z
From: "Roland Smith [TeamSybase]" <>
Newsgroups: sybase.public.powerbuilder.pbni
References: <467d46cb@forums-1-dub>
Subject: Re: PowerPack DLLs
Lines: 43
Organization: Central Vermont Public Service
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
Message-ID: <467fc2bf$1@forums-1-dub>
Date: 25 Jun 2007 06:27:27 -0700
X-Trace: forums-1-dub 1182778047 (25 Jun 2007 06:27:27 -0700)
X-Original-Trace: 25 Jun 2007 06:27:27 -0700,
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.pbni:1843
Article PK: 738845


There is a Windows API function that will do it - CryptBinaryToString. There
is an example on my website.

Or just paste the code below. If you are using PB9 or below, remove the '*
2' and change the W to A in the Alias. There is also a decode function in my
example as well.


External Function:

Function boolean CryptBinaryToString ( &
Blob pbBinary, &
ulong cbBinary, &
ulong dwFlags, &
Ref string pszString, &
Ref ulong pcchString &
) Library "crypt32.dll" Alias For "CryptBinaryToStringW"

Constant ULong CRYPT_STRING_BASE64 = 1
String ls_encoded
ULong lul_len, lul_buflen
Boolean lb_rtn

lul_len = Len(ablob_data)

lul_buflen = lul_len * 2

ls_encoded = Space(lul_buflen)

lb_rtn = CryptBinaryToString(ablob_data, &
lul_len, CRYPT_STRING_BASE64, &
ls_encoded, lul_buflen)
If Not lb_rtn Then ls_encoded = ""

Return ls_encoded