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.

unsigned char in Pocketbuilder

3 posts in Pocket PowerBuilder Last posting was on 2011-04-26 02:27:45.0Z
jksby Posted on 2011-04-25 07:01:50.0Z
Sender: 5339.4db4c9cd.1804289383@sybase.com
From: jksby
Newsgroups: sybase.public.pocketpowerbuilder
Subject: unsigned char in Pocketbuilder
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4db51c5e.5a81.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 Apr 2011 00:01:50 -0700
X-Trace: forums-1-dub 1303714910 10.22.241.41 (25 Apr 2011 00:01:50 -0700)
X-Original-Trace: 25 Apr 2011 00:01:50 -0700, 10.22.241.41
Lines: 50
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.pocketpowerbuilder:12445
Article PK: 262312

I have a EVC program call device SDK on wince.
the .h header describe the api:
int ICC_API ICCR_Detect(int iSid,unsigned char *pID,int
*pIDLen);
the EVC program :
...
unsigned char cardid[16];
memset(cardid, 0, sizeof(cardid));
int cardidlen = 4;
if(ICCR_Detect(iSid, cardid, &cardidlen) != ICC_OK)
{
AfxMessageBox(_T( "not in valid range" ));
}
else
{
for(int j =0; j <cardidlen; j++)
{
wsprintf(pTail,_T(" 0xX"),cardid[j]);
pTail += 5;
}
wsprintf(pTail,_T("\r\n"));
m_showstr += _T("Card UID:") ;
m_showstr += str;
...

i write a program by Pocketbuilder,
public function int ICCR_Detect(int iSid, ref BLOB pID,ref
int pIDLen) Library "ICC_DLL.DLL"

BLOB cardid
int cardidlen = 4 ,i
string ls_cardid

ls_cardid = SPACE(16)
cardid = BLOB( ls_cardid )

if( ICCR_Detect(iSid, cardid, cardidlen) <> ICC_OK )
then
messagebox(
"MF1&#19981;&#22312;&#33539;&#22260;&#20869;","no detected")
else
ls_cardid = FromANSI(cardid)
mle_1.text = ls_cardid
end if


but result in mle_1 is unreadable codes.The question is that
how can i use a unsigned char datatype in Pocketbuilder and
how to write the program.


Chris Pollach Posted on 2011-04-26 00:00:20.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.pocketpowerbuilder
References: <4db51c5e.5a81.1681692777@sybase.com>
In-Reply-To: <4db51c5e.5a81.1681692777@sybase.com>
Subject: Re: unsigned char in Pocketbuilder
Lines: 1
Organization: STD Inc
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3508.1109
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3508.1109
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4db60b14@forums-1-dub>
Date: 25 Apr 2011 17:00:20 -0700
X-Trace: forums-1-dub 1303776020 10.22.241.152 (25 Apr 2011 17:00:20 -0700)
X-Original-Trace: 25 Apr 2011 17:00:20 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.pocketpowerbuilder:12446
Article PK: 262315

Hi J;

The CHAR data type is neither signed or unsigned. Basically, its a BYTE
designation.

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"jksby" wrote in message news:4db51c5e.5a81.1681692777@sybase.com...


I have a EVC program call device SDK on wince.
the .h header describe the api:
int ICC_API ICCR_Detect(int iSid,unsigned char *pID,int
*pIDLen);
the EVC program :
...
unsigned char cardid[16];
memset(cardid, 0, sizeof(cardid));
int cardidlen = 4;
if(ICCR_Detect(iSid, cardid, &cardidlen) != ICC_OK)
{
AfxMessageBox(_T( "not in valid range" ));
}
else
{
for(int j =0; j <cardidlen; j++)
{
wsprintf(pTail,_T(" 0xX"),cardid[j]);
pTail += 5;
}
wsprintf(pTail,_T("\r\n"));
m_showstr += _T("Card UID:") ;
m_showstr += str;
...

i write a program by Pocketbuilder,
public function int ICCR_Detect(int iSid, ref BLOB pID,ref
int pIDLen) Library "ICC_DLL.DLL"

BLOB cardid
int cardidlen = 4 ,i
string ls_cardid

ls_cardid = SPACE(16)
cardid = BLOB( ls_cardid )

if( ICCR_Detect(iSid, cardid, cardidlen) <> ICC_OK )
then
messagebox(
"MF1&#19981;&#22312;&#33539;&#22260;&#20869;","no detected")
else
ls_cardid = FromANSI(cardid)
mle_1.text = ls_cardid
end if


but result in mle_1 is unreadable codes.The question is that
how can i use a unsigned char datatype in Pocketbuilder and
how to write the program.