I would or someone else use a API function where you must use a structure and know the size of it, how I can get the size of a structure in powerbuilder?

I would or someone else use a API function where you must
use a structure and know the size of it, how I can get the
size of a structure in powerbuilder?
0
kdioses
1/19/2006 4:11:55 PM
sybase.pocketpowerbuilder 3097 articles. 0 followers. Follow

8 Replies
1166 Views

Similar Articles

[PageSpeed] 6

Count the bytes.

You know the length of every object, because strings have to be
initialized before seneding them to the API call.

On 19 Jan 2006 08:11:55 -0800, kdioses@sybase.com wrote:

>I would or someone else use a API function where you must
>use a structure and know the size of it, how I can get the
>size of a structure in powerbuilder?
0
Berndt
1/19/2006 4:20:59 PM
Nothing, though I've been asking for a SizeOf function in PB since version 
4.0 or so.  What I use is:

http://powerbuilder.codexchange.sybase.com/files/documents/67/1858/sizeofstruct.zip



<kdioses@sybase.com> wrote in message 
news:43cfba4b.26cb.1681692777@sybase.com...
>I would or someone else use a API function where you must
> use a structure and know the size of it, how I can get the
> size of a structure in powerbuilder? 


0
Bruce
1/19/2006 4:59:26 PM
Hmmm, if we ask nicely, maybe Reed will build it into PK?

Would make sense as we (PK developers in general) heavily use the
WinCE API? Reeeeeeeed, *beg*?

On 19 Jan 2006 08:59:26 -0800, "Bruce Armstrong [TeamSybase]"
<NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:

>Nothing, though I've been asking for a SizeOf function in PB since version 
>4.0 or so.  What I use is:
>
>http://powerbuilder.codexchange.sybase.com/files/documents/67/1858/sizeofstruct.zip
>
>
>
><kdioses@sybase.com> wrote in message 
>news:43cfba4b.26cb.1681692777@sybase.com...
>>I would or someone else use a API function where you must
>> use a structure and know the size of it, how I can get the
>> size of a structure in powerbuilder? 
>
0
Berndt
1/19/2006 6:47:23 PM
 That sounds like a useful feature!


"Berndt Hamboeck [TeamSybase]" <bhamboec@gmx.at> wrote in message
news:ermvs19asqu4hhnabvbsphojogho3mq1o0@4ax.com...
> Hmmm, if we ask nicely, maybe Reed will build it into PK?
>
> Would make sense as we (PK developers in general) heavily use the
> WinCE API? Reeeeeeeed, *beg*?
>
> On 19 Jan 2006 08:59:26 -0800, "Bruce Armstrong [TeamSybase]"
> <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>
> >Nothing, though I've been asking for a SizeOf function in PB since
version
> >4.0 or so.  What I use is:
> >
>
>http://powerbuilder.codexchange.sybase.com/files/documents/67/1858/sizeofst
ruct.zip
> >
> >
> >
> ><kdioses@sybase.com> wrote in message
> >news:43cfba4b.26cb.1681692777@sybase.com...
> >>I would or someone else use a API function where you must
> >> use a structure and know the size of it, how I can get the
> >> size of a structure in powerbuilder?
> >


0
Chris
1/20/2006 12:42:09 PM
A looooong time ago I looked into popping this into PocketBuilder
for my own nefarious use.
It was non-trivial and I didn't think that anybody else wanted it so
I went back to counting bytes on my fingers and toes...

BUT - since there _does_ seem to be a need.....

It __may__ turn up in PK205 (a system function which takes
any structure and returns an integer...)

All inbetween the MSMQ for 3.0 and my other double-secret project...

Thanks for the nudge,
Reed Shilts
PocketBuilder Development Manager
<Standard-Disclaimers-Apply/>

On 19 Jan 2006 10:47:23 -0800, "Berndt Hamboeck [TeamSybase]"
<bhamboec@gmx.at> wrote:

>Hmmm, if we ask nicely, maybe Reed will build it into PK?
>
>Would make sense as we (PK developers in general) heavily use the
>WinCE API? Reeeeeeeed, *beg*?
>
>On 19 Jan 2006 08:59:26 -0800, "Bruce Armstrong [TeamSybase]"
><NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>


0
Reed
1/20/2006 2:30:27 PM
 Sooo .. how many interim releases between PK 2.0.4 and 2.0.99 before we see
3.0 <lol>?


"Reed Shilts [Sybase]" <reed.dot.shilts.at.sybase.dot.com> wrote in message
news:bur1t15514sir3bkqvgnqv80vro2t7s70k@4ax.com...
> A looooong time ago I looked into popping this into PocketBuilder
> for my own nefarious use.
> It was non-trivial and I didn't think that anybody else wanted it so
> I went back to counting bytes on my fingers and toes...
>
> BUT - since there _does_ seem to be a need.....
>
> It __may__ turn up in PK205 (a system function which takes
> any structure and returns an integer...)
>
> All inbetween the MSMQ for 3.0 and my other double-secret project...
>
> Thanks for the nudge,
> Reed Shilts
> PocketBuilder Development Manager
> <Standard-Disclaimers-Apply/>
>
> On 19 Jan 2006 10:47:23 -0800, "Berndt Hamboeck [TeamSybase]"
> <bhamboec@gmx.at> wrote:
>
> >Hmmm, if we ask nicely, maybe Reed will build it into PK?
> >
> >Would make sense as we (PK developers in general) heavily use the
> >WinCE API? Reeeeeeeed, *beg*?
> >
> >On 19 Jan 2006 08:59:26 -0800, "Bruce Armstrong [TeamSybase]"
> ><NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
> >
>
>


0
Chris
1/20/2006 5:22:05 PM
*bump*

I've just come to need this functionallity but can't find it in the help 
file... Was it ever implemented?

Reed Shilts [Sybase] wrote:
> A looooong time ago I looked into popping this into PocketBuilder
> for my own nefarious use.
> It was non-trivial and I didn't think that anybody else wanted it so
> I went back to counting bytes on my fingers and toes...
> 
> BUT - since there _does_ seem to be a need.....
> 
> It __may__ turn up in PK205 (a system function which takes
> any structure and returns an integer...)
> 
> All inbetween the MSMQ for 3.0 and my other double-secret project...
> 
> Thanks for the nudge,
> Reed Shilts
> PocketBuilder Development Manager
> <Standard-Disclaimers-Apply/>
> 
> On 19 Jan 2006 10:47:23 -0800, "Berndt Hamboeck [TeamSybase]"
> <bhamboec@gmx.at> wrote:
> 
>> Hmmm, if we ask nicely, maybe Reed will build it into PK?
>>
>> Would make sense as we (PK developers in general) heavily use the
>> WinCE API? Reeeeeeeed, *beg*?
>>
>> On 19 Jan 2006 08:59:26 -0800, "Bruce Armstrong [TeamSybase]"
>> <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>
> 
> 
0
John
4/28/2009 10:20:57 AM
Unfortunately not.
Cost/benefit kind of thing...

Regards,
Reed Shilts
<Standard-Disclaimers-Apply/>


On 28 Apr 2009 03:20:57 -0700, John Gale <jg@in4systems.com> wrote:

>*bump*
>
>I've just come to need this functionallity but can't find it in the help 
>file... Was it ever implemented?
>
>Reed Shilts [Sybase] wrote:
>> A looooong time ago I looked into popping this into PocketBuilder
>> for my own nefarious use.
>> It was non-trivial and I didn't think that anybody else wanted it so
>> I went back to counting bytes on my fingers and toes...
>> 
>> BUT - since there _does_ seem to be a need.....
>> 
>> It __may__ turn up in PK205 (a system function which takes
>> any structure and returns an integer...)
>> 
>> All inbetween the MSMQ for 3.0 and my other double-secret project...
>> 
>> Thanks for the nudge,
>> Reed Shilts
>> PocketBuilder Development Manager
>> <Standard-Disclaimers-Apply/>
>>
0
Reed
4/29/2009 12:05:21 AM
Reply:

Similar Artilces:

Win API: Getting size of powerbuilder structure ??
PB 8.0 Win2K I am trying to use the WinAPI function ShellExecuteEx(). It requires a structure as a parameter. Fine, dandy. I've created one in PB. One of the parameters of the structure is 'cbSize' which, according to my documentation, needs to be assigned to the 'size' of the structure. In C: struct.cbSize=sizeof(struct) or in VB: struct.cbSize=len(struct). I cannot find a similar sizeof() or len() function in PB that will give me what I require. Any ideas? Has anyone else used this function and what did you do for the cbSize param? Thanx, ...

Win API: Getting size of powerbuilder structure ??
PB 8.0 Win2K I am trying to use the WinAPI function ShellExecuteEx(). It requires a structure as a parameter. Fine, dandy. I've created one in PB. One of the parameters of the structure is 'cbSize' which, according to my documentation, needs to be assigned to the 'size' of the structure. In C: struct.cbSize=sizeof(struct) or in VB: struct.cbSize=len(struct). I cannot find a similar sizeof() or len() function in PB that will give me what I require. Any ideas? Has anyone else used this function and what did you do for the cbSize param? Thanx, ...

superreview requested: [Bug 313196] HMAC SHA-384 and HMAC SHA-512 should use 128-byte block size : [Attachment 201801] Proposed patch: add an "input block size" field to the SECHashObject structure,
Wan-Teh Chang <wtchang@redhat.com> has asked Robert Relyea <rrelyea@redhat.com> for superreview: Bug 313196: HMAC SHA-384 and HMAC SHA-512 should use 128-byte block size https://bugzilla.mozilla.org/show_bug.cgi?id=313196 Attachment 201801: Proposed patch: add an "input block size" field to the SECHashObject structure, v3 https://bugzilla.mozilla.org/attachment.cgi?id=201801&action=edit ------- Additional Comments from Wan-Teh Chang <wtchang@redhat.com> At yesterday's NSS meeting, we decided to fix this bug by extending the SECHashObject structu...

superreview granted: [Bug 313196] HMAC SHA-384 and HMAC SHA-512 should use 128-byte block size : [Attachment 201801] Proposed patch: add an "input block size" field to the SECHashObject structure, v3
Robert Relyea <rrelyea@redhat.com> has granted Wan-Teh Chang <wtchang@redhat.com>'s request for superreview: Bug 313196: HMAC SHA-384 and HMAC SHA-512 should use 128-byte block size https://bugzilla.mozilla.org/show_bug.cgi?id=313196 Attachment 201801: Proposed patch: add an "input block size" field to the SECHashObject structure, v3 https://bugzilla.mozilla.org/attachment.cgi?id=201801&action=edit ------- Additional Comments from Robert Relyea <rrelyea@redhat.com> sr=relyea. Don't check in until you have r=nelson. Also, I would really li...

Do you know how to use the sizing functionality within PowerDesigner?
Do you know how to use the sizing functionality within PowerDesigner? Short answer is "yes", but you probably want more detail. In the CDM and PDM, you can specify the number of occurrences/rows. This isn't growth rate, unfortunately, but you can typically ask the question, how many rows will this table have and figure out a best guess number. This number does generate from the CDM to PDM, so you really only have to do it once in the CDM, if you can capture the information from your business. Basically, you ask, how many orders do you process per day? How many ...

Can user control asp:TextBox font size by using browser text size setting
Virtually all elements on my web-pages font-size can be controlled by the user changing the text-size on the browser.   This does not work with the textbox control.  Is there something I am missing or does the presentation of font-size have to be controlled by CSS class through the use of themes.  I would rather not have to explain to the web user that they need to go to another page and choose a special theme to accomodate their text size choice. You can check the browser resolution on page preInit and then set a specific theme for your textboxes if you would...

How can I get PowerBuilder to use the UNICODE API calls to an ODBC?
How can I get PowerBuilder to use the UNICODE API calls to an ODBC? I am connecting to a DB2 database and when running a trace and reviewing the file the calls are to ANSI API's. example below pb80 db-157 EXIT SQLDescribeCol with return code 0 (SQL_SUCCESS) HSTMT 032F2528 UWORD 2 UCHAR * 0x0012E2D0 [ 14] "FIRST_DIST_DTE" SWORD 129 SWORD * 0x0012E2AC (14) SWORD * 0x0012E29C (9) SQLLEN * 0x0012E298 (10) SWORD * 0x00...

Trying to return more than one value from Function by using Structure. Getting errors...
I am trying to return more than one value from a function. Basically the function is used to do an insert into a database, it returns a success value + 2 others. This takes place inside a user control and I need to get those values back to the 'parent'. I am using a function call in the User control to do the insert and can get back a single value successfully, but I cannot seem to get back a structure. My structure looks like this in both the page and the control: Structure QuestionResult Dim strReturnVal As String Dim strSkipToBank As String Di...

Using a structure into an API
Hi, I need to use an external function, but in this extarnal function I must use a referenced structure. How can I defined and used this? I tried to define a function like function long f_test(ref My_str) but when I called my function i received and error message. Somebody know the way? TIA Enrico Please post the external function declaration as well as its original prototype, as well as the structure defininition. We'll be able to offer you more help at that point. -- pbm_hopethishelps, Roy Kiesler [TeamSybase] Chiaramonte Enrico <chiaramonte@svib.it> ...

Can someone give me a good reason why to use structures instead Class
if  you can give an example i will appreciate. When you need a type which merely is a piece of data, you'd tend to use a struct. Structs perform better than classes, since they are created on the stack (they're value types) whereas classes are reference types and are created on the heap Another thing to note is that structs cannot use inheritance concepts like classes. Cheers, Wim Wim Hollebrandse---http://www.zealandit.com  Danielyaakove wrote:if  you can give an example i will appreciate.The officical definition of a C# struct: Structs are similar to classe...

superreview granted: [Bug 230173] Mozilla use 15 point size font for characters with style {font-size:14px;} : [Attachment 138463] use float type for mPointSize
Christopher Blizzard <blizzard@mozilla.org> has granted Christopher Blizzard <blizzard@mozilla.org>'s request for superreview: Bug 230173: Mozilla use 15 point size font for characters with style {font-size:14px;} http://bugzilla.mozilla.org/show_bug.cgi?id=230173 Attachment 138463: use float type for mPointSize http://bugzilla.mozilla.org/attachment.cgi?id=138463&action=edit ...

Structuring perl's guts (Or: If a function is removed from an interpreter, but you can still use it transparently, is it really gone?)
Folks, I know everyone's got their own opinions on yanking functions (or not) from the core interpreter image, but I'd like to remind everyone that this is the *internals* list, not the language list. Our primary purpose is to build a system that runs Perl fast and provides a platform others can leverage off of to make perl run other places. Structural changes made here should (one might go so far as to say must) be completely invisible to your average programmer writing a perl program. If it's decreed that fork is just there without having to do something special,...

Can I use activex in Jaugar using Powerbuilder
Hi, I am writing a component using Powerbuilder and a third party ActiveX control. Can I do this in a Powerbuilder Jaguar component: oleobject o o = create oleobject o.connecttonewobject("aaa.bbb") .... .... Sure -- you'll need to import the ActiveX DLL into Jaguar (you'll need the ..TLB file -- if you don't have it, use Microsoft's OLEViewer utility to generate one) -- <hopethishelps /> Roy Kiesler [TeamSybase] mySybase -- http://my.sybase.com http://www.exp.com/app/expertProfile?expertID=512231 "Simon..." <simon@...

API & Structure Sizes
I'm relatively new to Windows API programming in PowerBuilder, but have had moderate success (at times) with several API Functions. However, I've noted a lot of API Functions accept a Structure as a (Reference) argument and the size/length of that structure is actually defined within the Structure itself. How do you calculate the size of a Structure? Is it simply based on the datatypes, or do you actually need to consider the length of each element in the initialized Structure? Unfortunately, I couldn't find much from Sybase on this subject -- Any and all responses a...

Web resources about - I would or someone else use a API function where you must use a structure and know the size of it, how I can get the size of a structure in powerbuilder? - sybase.pocketpowerbuilder

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 12/31/2015 6:13:38 AM