Structure on C vs Structure on PowerBuilder

I have a problem with a c api on PowerBuilder.

 SE_stream_describe_column

  Describes a specified column for the given stream.

    Usage syntax

      LONG SE_stream_describe_column
      (SE_STREAM stream, /* SE_STREAM = LONG */
       SHORT column,
       SE_COLUMN_DEF *column_def);

    Parameters

        stream
         The stream handle.
        column
         The column to describe.
        column_def
         A structure containing the requested column definition.

    Description

   SE_stream_describe_column describes a specified column for a given
stream. Column numbers reference the column list from a given query or
insert/update, not the table order. Column numbers are sequential, starting
from one.

Need to pass this:
     Function long SE_stream_describe_column (long stream, integer column,
ref structure definicioncolumna) LIBRARY "sde90.dll"

Stream and column (number of columns) is send well.

"sde90.dll" is a library of ArcSDE 9 that have a c api with function

The structure on c:

/************************************************************
*** SDE COLUMN DEFINITION STRUCTURE "SE_COLUMN_DEF"
************************************************************/

typedef struct {
    CHAR  column_name[SE_MAX_COLUMN_LEN]; /* the column name */
    LONG  sde_type;         /* the SDE data type */
    LONG  size;             /* the size of the column values */
    SHORT decimal_digits;   /* number of digits after decimal */
    BOOL  nulls_allowed;    /* allow NULL values ? */
    SHORT row_id_type;      /* column's use as table's row id */
} SE_COLUMN_DEF;

The Structure on PowerBuilder:
   // *** THAT STRUCTURE HAVE WHIT STRUCTURE PANNEL; NO FOR CODE

global type st_columndef from structure
 string  column_name
 long  data_type
 long  size
 integer  decimal_digits
 boolean  nulls_allowed
 integer  row_id_type
end type

THE PROBLEM --> ref structure definicioncolumna

My problem, when i send PowerBuilder's Structure st_columndef and dont
receive well.
I thing that Structure on C and PowerBuilder isnt compatible.
I cant find a solution. Please Help.

I'm sorry my english. I'm spanish and dont know write very well the languaje

Thanks



0
Tom
5/17/2005 3:33:31 PM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

1 Replies
874 Views

Similar Articles

[PageSpeed] 31

The CHAR array is not a string.

>typedef struct {
>    CHAR  column_name[SE_MAX_COLUMN_LEN]; /* the column name */
>    LONG  sde_type;         /* the SDE data type */
>    LONG  size;             /* the size of the column values */
>    SHORT decimal_digits;   /* number of digits after decimal */
>    BOOL  nulls_allowed;    /* allow NULL values ? */
>    SHORT row_id_type;      /* column's use as table's row id */
>} SE_COLUMN_DEF;
>
>The Structure on PowerBuilder:
>   // *** THAT STRUCTURE HAVE WHIT STRUCTURE PANNEL; NO FOR CODE
>
>global type st_columndef from structure
   CHARACTER   column_name[ WHATEVER_LENGTH ]	<<<<<<<<<<<<
> long  data_type
> long  size
> integer  decimal_digits
> boolean  nulls_allowed
> integer  row_id_type
>end type
>

You also have to make sure the "packing" is what you expect.
Also - there is a section in the PowerBuilder books about external
API calls which discusses the datatype lengths.

HTH,
Reed Shilts
PocketBuilder Development Manager
<Standard_Disclaimers_Apply/>




On 17 May 2005 08:33:31 -0700, "Tom Ben" <Nettom18@hotmail.com> wrote:

>I have a problem with a c api on PowerBuilder.
>
> SE_stream_describe_column
>
>  Describes a specified column for the given stream.
>
>    Usage syntax
>
>      LONG SE_stream_describe_column
>      (SE_STREAM stream, /* SE_STREAM = LONG */
>       SHORT column,
>       SE_COLUMN_DEF *column_def);
>
>    Parameters
>
>        stream
>         The stream handle.
>        column
>         The column to describe.
>        column_def
>         A structure containing the requested column definition.
>
>    Description
>
>   SE_stream_describe_column describes a specified column for a given
>stream. Column numbers reference the column list from a given query or
>insert/update, not the table order. Column numbers are sequential, starting
>from one.
>
>Need to pass this:
>     Function long SE_stream_describe_column (long stream, integer column,
>ref structure definicioncolumna) LIBRARY "sde90.dll"
>
>Stream and column (number of columns) is send well.
>
>"sde90.dll" is a library of ArcSDE 9 that have a c api with function
>
>The structure on c:
>
>/************************************************************
>*** SDE COLUMN DEFINITION STRUCTURE "SE_COLUMN_DEF"
>************************************************************/
>
>typedef struct {
>    CHAR  column_name[SE_MAX_COLUMN_LEN]; /* the column name */
>    LONG  sde_type;         /* the SDE data type */
>    LONG  size;             /* the size of the column values */
>    SHORT decimal_digits;   /* number of digits after decimal */
>    BOOL  nulls_allowed;    /* allow NULL values ? */
>    SHORT row_id_type;      /* column's use as table's row id */
>} SE_COLUMN_DEF;
>
>The Structure on PowerBuilder:
>   // *** THAT STRUCTURE HAVE WHIT STRUCTURE PANNEL; NO FOR CODE
>
>global type st_columndef from structure
> string  column_name
> long  data_type
> long  size
> integer  decimal_digits
> boolean  nulls_allowed
> integer  row_id_type
>end type
>
>THE PROBLEM --> ref structure definicioncolumna
>
>My problem, when i send PowerBuilder's Structure st_columndef and dont
>receive well.
>I thing that Structure on C and PowerBuilder isnt compatible.
>I cant find a solution. Please Help.
>
>I'm sorry my english. I'm spanish and dont know write very well the languaje
>
>Thanks
>
>

0
Reed
5/17/2005 3:57:18 PM
Reply:

Similar Artilces:

C structure vs PB structure
Hello! I had a problem and I couldn`t resolve it. Is there who can help me or tell me where Im making an error. I had a DLL and a function in it. This function required as an input parameter a pointer to structure. Structure istn`t so simply and it looks as follows: typedef struct strFirst { USHORT usNumber; USHORT usCount; LPSTR sName; }WSTRFIRST , *LPWSTRFIRST; typedef struct strSecond { USHORT usStatus; USHORT usValue; LPWSTRFIRST *lppToFirst; }WSTRSECOND, *LPWSTRSECOND; My function is: void wTestFunc(void *lpData) { LPWSTRSECOND *lpSecond; lpSecond...

Powerbuilder Structures
Hi there Is there a way so that I can declare a structure ( struct_1) and then in define a member of type struct_1 in another structure (struct_2)? Basically, can I nest a struct in another struct. I have tried but no success. Regards Csaba Toth (csaba@addease.com.au) On Fri, 09 Jan 1998 12:09:35 +1100, Csaba Toth <csaba@addease.com.au> wrote: After you create your first structure (s_1) when you go into the structure painter to create s_2 you need to type in 's_1' as the type for the member for s_1. I just tried this, so I know it works. If you have a...

Windows API structure in C translated for PowerBuilder
I needed to get a mac address in PowerBuilder, which led me to GetAdaptersAddresses http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/getadaptersaddresses.asp it uses a structure, IP_ADAPTER_ADDRESSES, which is http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/ip_adapter_addresses.asp and it says typedef struct _IP_ADAPTER_ADDRESSES { union { ULONGLONG Alignment; struct { ULONG Length; DWORD IfIndex; }; }; struct _IP_ADAPTER_ADDRESSES* Next; PCHAR AdapterName; PIP_ADAPTER_UNICAST_A...

Powerbuilder vs Java vs C#
Just a bit of a rant really, not trying to start any wars or anything (just my personal opinions) I use powerbuilder for work, have been since version 5 we develop a suite of about 5 applications client/sever apps i have used java in my spare time for a similar sized application (just 1 app, not a suite of them) i have started using Visual C# 2005 because according to all the stuff i have read pb is going to dotnet and it would be a good idea to get the hang of things in dotnet before pb11 comes around the corner other langauges i have used alot are perl and php my 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?
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? 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? Nothing, though I've been asking for a SizeOf function in PB since ver...

Structure definition in Powerbuilder
The following is a type definition af a structure in C typedef struct _LISTELEMENT { struct _LISTELEMENT *pNextElement; struct _LISTELEMENT *pPrevElement; PVOID pListItem; } LISTELEMENT, *PLISTELEMENT; What i need is to do the make this structure inside powerbuilder in order to call a function in a external C-dll, where one of the arguments to the functions is is a pointer to a list element. Is this at all possible?? STC The pointers can be represented as PB-long types. Depending on whether you need access to what pListItem points to, y...

C# vs PowerBuilder How To...?
How to... 1. Make a dll using C# to use in PowerBuilder 2. Make a dll include control using C# to use in PowerBuilder What is the steps into C# to create and PowerBuilder to Call, examples/sample will help Osama Diab ...

Deploy Powerbuilder Structure to Jag?
Is there any way to simply deploy a globally-defined structure to Jaguar without creating a 'dummy' nvo that references the structure as either a return value or input parameter? I have created a structure that is to be returned by a Java component inside a PB method call, so the PB NVO doesn't really use the structure definition in any of its public methods. Or should I just deploy a dummy NVO with the structure as a public instance variable? (The key benefit is to let PB determine IDL datatype mappings for me) TIA Glenn There isn't. Since the Java compone...

Structure inside a structure
Is there anyway that I can declare a structure inside of a structure in powerbuilder inorder to call an external function that needs a argument of that type. The external function is written i C. Create your inner-most structure first. We'll call it str_1, because we like descriptive names. :) Now, in your outer structure, type in the name of the particular element, but instead of picking a datatype from the drop-down list, simply type in "str_1". "Steen Christiansen" <stc@maerskdata.dk> wrote in message news:Tmvgy7qZAHA.78@forums.sybase.co...

structure list and structure
hi, when i open an object in the design mode an dclick on the view menu item i found two structure menu item 1. structure list 2. structure but is the differenec between these two. where should i use structure list and when to use structure but exactly the difference of using structure list instead of structure. thanks in adv jack I'm assuming you understand the differences between structures and non-visual objects (classes). So... PowerBuilder lets you define class-level structures. The 'structure list' will, err, list the structures defined within that class....

Powerbuilder 9.0 vs. Powerbuilder 8.0
What is the difference in Powerbilder 9.0 and 8.0? I would like to point out that the Appeon newsgroup is monitored by Sybase and Appeon engineering staff who are very knowledgeable about Appeon issues. Question that are purely PowerBuilder-related are best answered by the staff and users of the PowerBuilder newsgroup: sybase.public.powerbuilder.XXXX. Please post to the appropriate newsgroup so you receive the help you desire. Thanks, Julie Jiang Appeon Corporation <dburris@onesolution.com> wrote in message news:40589011.2717.846930886@sybase.com... > What is the diffe...

Using C data structures inside Perl data structures
Hiya, Brian keeps encouraging me to get on the Inline train, so here I am. =) I'm wondering whether there's a better way to embed C data structures inside Perl data structures. I don't need to access them from Perl (I'm using Inline wrappers for that), so I don't think Inline::Struct is the ticket. So far I have this hacky method: ----------------------------------------------------- int create_struct (SV *self, double x, double y) { double *fooey; HV *datahash; fooey = malloc(10*sizeof(double)); fooey[0] = x; fooey[1] = y; ...

Powerbuilder crashes when expanding tree structure
Hi all, heres the details: Software: Powersoft Powerbuilder Pro/32 By Sybase - Version 6.5.1 Server - SBS4.5, SQL Server 7 Problem: I am gettin a falal error that says the following: "PB60 caused an invalid page fault in module PBVM60.DLL at 017f:1125a775. blahblah" This happens when I have an application window open and I try and expand any of the tree structure(s). Any help is apprecuiated. Also, it was not happening before the weekend and now it is. ??? Thanks. Does this have anything to do with the WDK? On Tue, 9 Oct 2001 10:32:53 -0700, in sybase.publi...

Powerbuilder crahsing when expanding tree structures
Hi all, heres the details: Software: Powersoft Powerbuilder Pro/32 By Sybase - Version 6.5.1 Server - SBS4.5, SQL Server 7 Problem: I am gettin a falal error that says the following: "PB60 caused an invalid page fault in module PBVM60.DLL at 017f:1125a775. blahblah" This happens when I have an application window open and I try and expand any of the tree structure(s). Any help is apprecuiated. Also, it was not happening before the weekend and now it is. ??? Thanks. I had run into this same problem: http://webforums.sybase.com/nntp/nd000082.nsf/8178b1c14b1e9b6b85...

Web resources about - Structure on C vs Structure on PowerBuilder - sybase.powerbuilder.general

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/14/2015 4:15:40 AM