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.

PBNI Issue

2 posts in PB Native Interface Last posting was on 2010-02-26 16:10:04.0Z
Roland Smith [TeamSybase] Posted on 2010-02-26 04:32:07.0Z
From: "Roland Smith [TeamSybase]" <topwiz.smith_at_comcast_dot_net>
Newsgroups: sybase.public.powerbuilder.pbni
Subject: PBNI Issue
Lines: 53
X-Priority: 3
X-Unsent: 1
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-Vipre-Scanned: 01604D7400164401604EC1
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <4b874ec7$1@forums-1-dub>
Date: 25 Feb 2010 20:32:07 -0800
X-Trace: forums-1-dub 1267158727 (25 Feb 2010 20:32:07 -0800)
X-Original-Trace: 25 Feb 2010 20:32:07 -0800,
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.pbni:2043
Article PK: 739029

I have a program written in C that calls functions in a PB nvo.

I have a function in the PB object that has a string array as an argument. I
am trying to add a long array and I am having problems getting the syntax
correct. I'm sure it is something simple but it has been awhile since I
worked on this and the help file is terrible.

Here are the error messages:

...\pbarray.h(36) : warning C4042: 'T' : has bad storage class
...\WizSource.cpp(361) : see reference to class template instantiation
'PBUnboundedArrayCreator<2>' being compiled

In the below excerpt, nFiles is the number of occurrences in the arrays.
lpFileNames is the string array and pfOptions is the long array.

PBCallInfo ci;
LONG nIndex = 0;
pblong dim[1];

// Initialize CallInfo
session->InitCallInfo(cls, mid, &ci);

// put file names into a string array
PBUnboundedStringArrayCreator pbusac(session);
pbstring pbs;
for (nIndex = 0; nIndex < nFiles; nIndex++)
pbs = session->NewString(LPCSTR(lpFileNames[nIndex]));
pbusac.SetAt(nIndex + 1, pbs);
pbarray pbFileNames = pbusac.GetArray();

// put file types into a long array
PBUnboundedLongArrayCreator pbulac(session);
for (nIndex = 0; nIndex < nFiles; nIndex++)
dim[0] = pfOptions[nIndex];
// something else goes here ...

// Set the input arguments
ci.pArgs-> GetAt(0)->SetArray(pbFileNames);
ci.pArgs-> GetAt(1)->SetArray(pbFileTypes);
if ( lpComment == NULL ) {
ci.pArgs-> GetAt(2)->SetString("");
} else {
ci.pArgs-> GetAt(2)->SetString(lpComment);

Roland Smith [TeamSybase] Posted on 2010-02-26 16:10:04.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.pbni
References: <4b874ec7$1@forums-1-dub>
Subject: Re: PBNI Issue
Lines: 7
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
Message-ID: <4b87f25c@forums-1-dub>
Date: 26 Feb 2010 08:10:04 -0800
X-Trace: forums-1-dub 1267200604 (26 Feb 2010 08:10:04 -0800)
X-Original-Trace: 26 Feb 2010 08:10:04 -0800,
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.pbni:2044
Article PK: 739033

I found another program that I am doing this and it compiles fine. The main
difference between the two is that the one with the compile warning is a
.dll and the one without the compile warning is an .exe.

What would cause this?