begin process at 2012 05 28 07:42:31
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive C/C++

 > 

Archives

 > 

API

 > 

API ORACLE FORMS


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

API ORACLE FORMS

mercredi 23 juillet 2003 à 18:20:02 | API ORACLE FORMS

StevosTeen

stevosteen
Je cherche a utiliser l'API FORMS ORACLE pour charger des modules forms .fmb mais la compilation donne:

error LNK2001: unresolved external symbol _d2fctxde_Destroy

ou _d2fctxde_Destroy est une fonction déclarée dans le d2fctx.h

Quelqu'un peut-il m'aider???
Merci

Stève

*******FormName.c

#include <StdAfx.h>
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>


#include "d2fctx.h"
#include "d2ffmd.h"


int main (int argc, unsigned char *argv[])
{
d2fctxa ctx_attr;
d2fctx *ctx;
d2ffmd *form;
text *form_name;
/* Check arguments */
if ( argc != 2 )
{
fprintf(stderr, "USAGE: %s <filename>\n", argv[0]);
exit(1);
}
/* Create Forms API context */
ctx_attr.mask_d2fctxa = (ub4)0;
if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
{
fprintf(stderr, "Error creating Forms API context\n");
exit(1);
}
/* Load the form module into memory */
if ( d2ffmdld_Load(ctx, &form, argv[1], FALSE) != D2FS_SUCCESS )
{
fprintf(stderr, "Failed to load form module: %s\n", argv[1]);
exit(1);
}
/* Get the name of the form module */
if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
{
fprintf(stderr, "Error getting the name of the form module\n");
}
else
{
/* Print the name of the form, then free it */
printf ("The name of the form is %s\n", form_name);
free(form_name);
}
/* Destroy the in-memory form */
if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
{
fprintf(stderr, "Error destroying form module\n");
}
/* Close the API and destroy context */
d2fctxde_Destroy(ctx);
return 0;
}


*********D2FCTX.H
/*
NAME
D2FCTX.H -- Dev2K Forms API ConTeXt declarations

DESCRIPTION
Contains the public declarations for the Forms API ConTeXt

NOTES
The Forms API context (d2fctx) is required before any FAPI
function can be called. It's typically the first argument
passed to any FAPI function. Creating the FAPI context
initializes all the internal subsystems for the Forms API.

PUBLIC FUNCTIONS
d2fctxcr_Create - Create and initialize the FAPI context
d2fctxde_Destroy - Destroy the FAPI context and perform cleanup
d2fctxga_GetAttributes -- Get the specified attributes from the FAPI ctx
d2fctxsa_SetAttributes -- Set the specified attributes in the FAPI ctx
d2fctxcn_Connect - Connect to a database
d2fctxdc_Disconnect - Disconnect from the current database
d2fctxbv_BuilderVersion - Returns the FAPI version number
d2fctxcf_ConvertFile - Converts a file between text <-> binary
d2fctxbi_BuiltIns - returns a 2D-arr of builtin names, by package
*/

#ifndef D2FCTX
#define D2FCTX

#ifndef ORATYPES
# include "ORATYPES.H"
#endif

#ifndef D2FPRIV
# include "d2fpriv.h"
#endif

/* C++ Support */
#ifdef __cplusplus
extern "C"
{
#endif


/*
** Attribute masks for the mask_d2fctxa field of the d2fctxa structure.
** Setting an attribute mask means that the corresponding field of the
** d2fctxa structure contains data that should be processed in the
** function call. For example:
**
** {
** d2fctxa attr;
**
** attr.mask_d2fctxa = ( D2FCTXACDATA | D2FCTXAMCALLS );
** attr.cdata_d2fctxa = clientdata;
** attr.d2fmalc_d2fctxa = mymalloc;
** attr.d2fmfre_d2fctxa = myfree;
** attr.d2fmrlc_d2fctxa = myrealloc;
**
** d2fctxcr_Create(&ctx, &attr);
** }
**
** Something similar can be done for Set and Get attributes.
**
*/
#define D2FCTXACDATA 0x00000001L /* client data */
#define D2FCTXAMCALLS 0x00000002L /* Memory Callbacks */

/*
** This flag puts the API into a special "translation" mode used by
** Oracle OTM and other 3rd party localization tools. No other clients
** should set this flag - it will cause serious data corruption.
*/
#define D2FCTXATRNSMODE 0x80000000L /* Translation Mode */

typedef struct d2fctxa
{
ub4 mask_d2fctxa;
dvoid *cdata_d2fctxa; /* [CSG] */
d2fmalc d2fmalc_d2fctxa; /* [C ] */
d2fmfre d2fmfre_d2fctxa; /* [C ] */
d2fmrlc d2fmrlc_d2fctxa; /* [C ] */
} d2fctxa;



/*
** File conversion direction, used in converting fmb<->fmt conversion
** (used in d2fctxcf_ConvertFile)
*/
#define BINTOTEXT 1
#define TEXTTOBIN 2


/*
** Functions:
**
** d2fctxcr_Create - Create the Forms API context given an attribute
** mask structure. This is typically the first function call in a
** FAPI program.
**
** d2fctxde_Destroy - Destroy the Forms API context. This is typically
** the final call in a FAPI program. After this call, no further
** FAPI calls are possible.
**
** d2fctxsa_SetAttributes - Set attributes in the FAPI context after
** the context has already been created. Not all FAPI attributes
** are settable (only those marked with 'S' in the comments above).
**
** d2fctxga_GetAttributes - Get attributes from the FAPI context after
** the context has already been created. Not all FAPI attributes
** are gettable (only those marked with 'G' in the comments above).
**
** d2fctxcn_Connect - Establish a database connection given a connect
** string (username/password@database). Alternatively, you may
** directly supply an Oracle 'hstdef' pointer for the connection.
**
** d2fctxdc_Disconnect - Disconnect from the current database if one
** has been established.
**
** d2fctxbv_BuilderVersion - Return the version of the Forms API
** currently running. The format of the version number is a decimal
** number of the form 12334455, where 1 is the first digit, 2 is the
** second digit, 33 is the third digit, 4 is the fourth digit, and 5
** is the fifth digit. For example, a return value of 60052902 means
** version 6.0.5.29.2. This is the same version number shown in the
** Form Builder's "about box".
**
** d2fctxcf_ConvertFile - Convert an .fmb file to an .fmt file or vice-
** versa. The filename is the filename on disk, the modtyp is one of
** the module types (e.g. D2FFO_FORM_MODULE), and the direction is
** either BINTOTEXT or TEXTTOBIN (defined above).
**
** d2fctxbi_BuiltIns - Allocates and returns an array of an array of
** strings listing each of the PL/SQL Built-in functions, organized
** by package name. Each row of the array is an array of strings;
** the first string in each row is the package name, and the rest of
** the strings in that row are the PL/SQL Built-ins in that package.
** This routine allocates memory for each string, so it should only
** be called once in order to avoid memory leaks.
**
*/

ORA_RETTYPE(d2fstatus) d2fctxcr_Create( d2fctx **ppd2fctx,d2fctxa *d2fctx_attr );
ORA_RETTYPE(d2fstatus) d2fctxde_Destroy( d2fctx *pd2fctx );
ORA_RETTYPE(d2fstatus) d2fctxsa_SetAttributes( d2fctx *pd2fctx,
d2fctxa *pd2fct_attr );
ORA_RETTYPE(d2fstatus) d2fctxga_GetAttributes( d2fctx *pd2fctx,
d2fctxa *pd2fct_attr );
ORA_RETTYPE(d2fstatus) d2fctxcn_Connect( d2fctx *pd2fctx, text *con_str,
dvoid *phstdef);
ORA_RETTYPE(d2fstatus) d2fctxdc_Disconnect( d2fctx *pd2fctx );
ORA_RETTYPE(d2fstatus) d2fctxbv_BuilderVersion( d2fctx *pd2fctx,
number *version );
ORA_RETTYPE(d2fstatus) d2fctxcf_ConvertFile( d2fctx *pd2fctx,
text *filename,
d2fotyp modtyp,
number direction );
ORA_RETTYPE(d2fstatus) d2fctxbi_BuiltIns(d2fctx *pd2fctx, text ****pparr);


/* C++ Support */
#ifdef __cplusplus
}
#endif


#endif /* D2FCTX */

mercredi 23 juillet 2003 à 18:34:27 | Re : API ORACLE FORMS

BruNews

Administrateur CodeS-SourceS
y a pas un lib a donner au linker ?
BruNews, ciao...


-------------------------------
Réponse au message :
-------------------------------

> stevosteen
> Je cherche a utiliser l'API FORMS ORACLE pour charger des modules forms .fmb mais la compilation donne:
>
> error LNK2001: unresolved external symbol _d2fctxde_Destroy
>
> ou _d2fctxde_Destroy est une fonction déclarée dans le d2fctx.h
>
> Quelqu'un peut-il m'aider???
> Merci
>
> Stève
>
> *******FormName.c
>
> #include <StdAfx.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <malloc.h>
>
>
> #include "d2fctx.h"
> #include "d2ffmd.h"
>
>
> int main (int argc, unsigned char *argv[])
> {
> d2fctxa ctx_attr;
> d2fctx *ctx;
> d2ffmd *form;
> text *form_name;
> /* Check arguments */
> if ( argc != 2 )
> {
> fprintf(stderr, "USAGE: %s <filename>\n", argv[0]);
> exit(1);
> }
> /* Create Forms API context */
> ctx_attr.mask_d2fctxa = (ub4)0;
> if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
> {
> fprintf(stderr, "Error creating Forms API context\n");
> exit(1);
> }
> /* Load the form module into memory */
> if ( d2ffmdld_Load(ctx, &form, argv[1], FALSE) != D2FS_SUCCESS )
> {
> fprintf(stderr, "Failed to load form module: %s\n", argv[1]);
> exit(1);
> }
> /* Get the name of the form module */
> if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
> {
> fprintf(stderr, "Error getting the name of the form module\n");
> }
> else
> {
> /* Print the name of the form, then free it */
> printf ("The name of the form is %s\n", form_name);
> free(form_name);
> }
> /* Destroy the in-memory form */
> if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
> {
> fprintf(stderr, "Error destroying form module\n");
> }
> /* Close the API and destroy context */
> d2fctxde_Destroy(ctx);
> return 0;
> }
>
>
> *********D2FCTX.H
> /*
> NAME
> D2FCTX.H -- Dev2K Forms API ConTeXt declarations
>
> DESCRIPTION
> Contains the public declarations for the Forms API ConTeXt
>
> NOTES
> The Forms API context (d2fctx) is required before any FAPI
> function can be called. It's typically the first argument
> passed to any FAPI function. Creating the FAPI context
> initializes all the internal subsystems for the Forms API.
>
> PUBLIC FUNCTIONS
> d2fctxcr_Create - Create and initialize the FAPI context
> d2fctxde_Destroy - Destroy the FAPI context and perform cleanup
> d2fctxga_GetAttributes -- Get the specified attributes from the FAPI ctx
> d2fctxsa_SetAttributes -- Set the specified attributes in the FAPI ctx
> d2fctxcn_Connect - Connect to a database
> d2fctxdc_Disconnect - Disconnect from the current database
> d2fctxbv_BuilderVersion - Returns the FAPI version number
> d2fctxcf_ConvertFile - Converts a file between text <-> binary
> d2fctxbi_BuiltIns - returns a 2D-arr of builtin names, by package
> */
>
> #ifndef D2FCTX
> #define D2FCTX
>
> #ifndef ORATYPES
> # include "ORATYPES.H"
> #endif
>
> #ifndef D2FPRIV
> # include "d2fpriv.h"
> #endif
>
> /* C++ Support */
> #ifdef __cplusplus
> extern "C"
> {
> #endif
>
>
> /*
> ** Attribute masks for the mask_d2fctxa field of the d2fctxa structure.
> ** Setting an attribute mask means that the corresponding field of the
> ** d2fctxa structure contains data that should be processed in the
> ** function call. For example:
> **
> ** {
> ** d2fctxa attr;
> **
> ** attr.mask_d2fctxa = ( D2FCTXACDATA | D2FCTXAMCALLS );
> ** attr.cdata_d2fctxa = clientdata;
> ** attr.d2fmalc_d2fctxa = mymalloc;
> ** attr.d2fmfre_d2fctxa = myfree;
> ** attr.d2fmrlc_d2fctxa = myrealloc;
> **
> ** d2fctxcr_Create(&ctx, &attr);
> ** }
> **
> ** Something similar can be done for Set and Get attributes.
> **
> */
> #define D2FCTXACDATA 0x00000001L /* client data */
> #define D2FCTXAMCALLS 0x00000002L /* Memory Callbacks */
>
> /*
> ** This flag puts the API into a special "translation" mode used by
> ** Oracle OTM and other 3rd party localization tools. No other clients
> ** should set this flag - it will cause serious data corruption.
> */
> #define D2FCTXATRNSMODE 0x80000000L /* Translation Mode */
>
> typedef struct d2fctxa
> {
> ub4 mask_d2fctxa;
> dvoid *cdata_d2fctxa; /* [CSG] */
> d2fmalc d2fmalc_d2fctxa; /* [C ] */
> d2fmfre d2fmfre_d2fctxa; /* [C ] */
> d2fmrlc d2fmrlc_d2fctxa; /* [C ] */
> } d2fctxa;
>
>
>
> /*
> ** File conversion direction, used in converting fmb<->fmt conversion
> ** (used in d2fctxcf_ConvertFile)
> */
> #define BINTOTEXT 1
> #define TEXTTOBIN 2
>
>
> /*
> ** Functions:
> **
> ** d2fctxcr_Create - Create the Forms API context given an attribute
> ** mask structure. This is typically the first function call in a
> ** FAPI program.
> **
> ** d2fctxde_Destroy - Destroy the Forms API context. This is typically
> ** the final call in a FAPI program. After this call, no further
> ** FAPI calls are possible.
> **
> ** d2fctxsa_SetAttributes - Set attributes in the FAPI context after
> ** the context has already been created. Not all FAPI attributes
> ** are settable (only those marked with 'S' in the comments above).
> **
> ** d2fctxga_GetAttributes - Get attributes from the FAPI context after
> ** the context has already been created. Not all FAPI attributes
> ** are gettable (only those marked with 'G' in the comments above).
> **
> ** d2fctxcn_Connect - Establish a database connection given a connect
> ** string (username/password@database). Alternatively, you may
> ** directly supply an Oracle 'hstdef' pointer for the connection.
> **
> ** d2fctxdc_Disconnect - Disconnect from the current database if one
> ** has been established.
> **
> ** d2fctxbv_BuilderVersion - Return the version of the Forms API
> ** currently running. The format of the version number is a decimal
> ** number of the form 12334455, where 1 is the first digit, 2 is the
> ** second digit, 33 is the third digit, 4 is the fourth digit, and 5
> ** is the fifth digit. For example, a return value of 60052902 means
> ** version 6.0.5.29.2. This is the same version number shown in the
> ** Form Builder's "about box".
> **
> ** d2fctxcf_ConvertFile - Convert an .fmb file to an .fmt file or vice-
> ** versa. The filename is the filename on disk, the modtyp is one of
> ** the module types (e.g. D2FFO_FORM_MODULE), and the direction is
> ** either BINTOTEXT or TEXTTOBIN (defined above).
> **
> ** d2fctxbi_BuiltIns - Allocates and returns an array of an array of
> ** strings listing each of the PL/SQL Built-in functions, organized
> ** by package name. Each row of the array is an array of strings;
> ** the first string in each row is the package name, and the rest of
> ** the strings in that row are the PL/SQL Built-ins in that package.
> ** This routine allocates memory for each string, so it should only
> ** be called once in order to avoid memory leaks.
> **
> */
>
> ORA_RETTYPE(d2fstatus) d2fctxcr_Create( d2fctx **ppd2fctx,d2fctxa *d2fctx_attr );
> ORA_RETTYPE(d2fstatus) d2fctxde_Destroy( d2fctx *pd2fctx );
> ORA_RETTYPE(d2fstatus) d2fctxsa_SetAttributes( d2fctx *pd2fctx,
> d2fctxa *pd2fct_attr );
> ORA_RETTYPE(d2fstatus) d2fctxga_GetAttributes( d2fctx *pd2fctx,
> d2fctxa *pd2fct_attr );
> ORA_RETTYPE(d2fstatus) d2fctxcn_Connect( d2fctx *pd2fctx, text *con_str,
> dvoid *phstdef);
> ORA_RETTYPE(d2fstatus) d2fctxdc_Disconnect( d2fctx *pd2fctx );
> ORA_RETTYPE(d2fstatus) d2fctxbv_BuilderVersion( d2fctx *pd2fctx,
> number *version );
> ORA_RETTYPE(d2fstatus) d2fctxcf_ConvertFile( d2fctx *pd2fctx,
> text *filename,
> d2fotyp modtyp,
> number direction );
> ORA_RETTYPE(d2fstatus) d2fctxbi_BuiltIns(d2fctx *pd2fctx, text ****pparr);
>
>
> /* C++ Support */
> #ifdef __cplusplus
> }
> #endif
>
>
> #endif /* D2FCTX */
>
>
lundi 4 août 2008 à 17:03:49 | Re : API ORACLE FORMS

houari2009

javascript:Insert_Emoticon('/imgs2/smile_approjavascript:Insert_Emoticon('/imgs2/smile_tongue.gif');ve.gif');


Cette discussion est classée dans : form, of, is, d2fctxa, d2fctx


Répondre à ce message

Sujets en rapport avec ce message

C++ questionaire [ par fcoutel ] Bonjour,On m'a donne un questionnaire a remplir est ce que quelq'un connait les reponses ? <SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verda MFC - Créer des composants draggables et étirables - Comment marche DrawCLI du MSDN [ par randriano ] Bonjour tout le monde !J'ai étudié depuis quelques temps le sample mfc du MSDN qui se nomme "DrawCLI" mais il semble compliqué : je me demande comment EM_GETLINE [ par vecchio56 ] Je dois utiliser le message EM_GETLINE pour récupérrer une ligne d'un Rich Edit.Pour lParam, la MSDN dit"Pointer to the buffer that receives a copy of Form personnalisé [ par Globox60 ] Bonjour,Je programme sous Builder et j aimerai faire des forms personnalisé. J en ai un peu marre des fenetres carrés.J espere que j ai ete assez expl probleme SKD [ par Arnaud16022 ] helloje suis sur VC6 et je voudrais charger des modeles md2 sous openGL. que faire? Évidemment un petit tour chez Digiben!! (bon je sais qu'il existe Mélange de appli console et form [ par PsyCaDi ] Je voulais savoir s'il y avait un moyen de faire une appli qui utilise le mode graphique (form... pour mon appli) et le mode console (pour le log par ecriture 3d [ par mat74 ] salut a ts voila j'ai un petit pb avec l'ecriture 3d en opengl , n'importe quel valeur que je mette ds le 1er param de createfont ne change pas la tai Manipulation d'un fichier formatté spécial [ par jb60 ] Bonjour,Je suis entrain d'essayer de faire un petit programme qui me sera utile dans mon travail.J'ai un fichier qui se nomme "fichier.raw" avec des d flux et manipulateurs [ par leprov ] salut a tous.j'ai un probleme que je n'arrive pas a m'expliquer, j'espere qu'on pourra m'aider. j'ai un fichier dont je dois extraire des chiffres qui recuperation du texte d'une boite de dialogue [ par demar016 ] pour ca j'utilise les tris focntions ci-dessous:GetNextDlgGroupGetDlgCtrIDGetDlgItemTextmais je n'arrive pas à récupérer l'identifiant du controle qui


Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

Photothèque

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 1,373 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales