Sie sind auf Seite 1von 1314

WorkForce Desktop® for Windows®

WAL for Windows


Programmer’s
Reference Manual

Release 5.0

302455

December 1996

FileNet, FolderView, OSAR, Revise, ValueNet, Visual WorkFlo,


WorkFlo, and Wor kForce Desktop are registered trademarks of
FileNet Corporation.

FileNet:WorkGroup, AutoForm, COLD, Foundation for Enterprise


Document Management, SMART, WorkFlo/Fax, WorkFlo/Print,
WorkFlo/Scan, and WorkShop are trademarks of FileNet
FileNet Corporation Cor poration.

All other product and brand names are trademarks or registered


3565 Harbor Boulevard trademarks of their respective companies.

Costa Mesa, California 92626 Due to continuing product development, product specifications
and capabilities are subject to change without notice.

7 14 •96 6•3 40 0 Copyright  1996 FileNet Corporation. All Rights Reserved.

9810886-001
Notices
This document contains information proprietary
to FileNet Corporation (FileNet). You may not
disclose or use any proprietary information or
reproduce any part of this document without
written permission from FileNet.

Even though FileNet has tested the hardware


and software and reviewed the documentation,
FileNet makes no warranty or representation,
either express or implied, with respect to the
hardware, software, or documentation, their
quality, performance, merchantability, or fitness
for a particular purpose. FileNet has made every
effort to keep the information in this manual cur-
rent and accurate as of the date of publication or
revision. However, FileNet does not guarantee
or imply that this document is error free or accu-
rate with regard to any particular specification.
As a result, this product is sold as is, and you
the purchaser are assuming the entire risk as to
its quality and performance.

In no event will FileNet be liable for direct, indi-


rect, special, incidental, or consequential dam-
ages resulting from any defect in the hardware,
software, or documentation, even if advised of
the possibility of such damages. In particular,
FileNet shall have no liability for any programs
or data stored in or used with FileNet products,
including the costs of recovering such programs
or data.

Some states do not allow the exclusion or limita-


tions of liability for incidental or consequential
damages, so the above limitation or exclusion
may not apply to your installation. You may also
have other rights that vary from state to state.

No FileNet agent, dealer, or employee is autho-


rized to make any modification, extension, or
addition to the above statements.
Contents

About This Manual xxxvii

Who Should Read This Manual? xxxvii

Conventions Used in This Manual xxxviii

Education xxxviii

Comments and Suggestions xxxix

1 Introduction 1
FileNet System Architecture 1
Hardware 1
Software 2
Distributed Architecture 2
Remote Procedure Call 4
Servers and Their Services 5
Root Server 5
Index Server 5
Storage Library Server 6
WorkFlo/Print Server 8
WorkFlo/Fax Server 8
WorkFlo/Scan Station 9
Application Server 9

Operating environment 10

Use of Imaging System 12


Retrieval Example 12
Committal Example 12

December 1996 WAL for Windows Programmer’s Reference Manual iii


Contents

Routing Examples 13

2 Getting Started 15
Build a FileNet WAL for Windows Application 15

Check Programming Environment 16


Troubleshooting 17

WAL for Windows Sample Applications 17


Floating Point Application 17
Date and Time Application 17
Log On Application 18
General Application 18
Image Application 19
Security Application 19
Folders and Query Application 20
Document Application 20
Security and TTY Application 21
Local Print Application 21
Commit Application 21
Auto Form Application 22
WorkFlo Queue Application 22
Cache Services Manager Application 22
Image Conversion Application 23
Indexing Application 23

3 Data Flow Diagrams 25


Archive/Restore 26

BATCHLIB 27

iv WAL for Windows Programmer’s Reference Manual December 1996


Contents

BES (Batch Entry) 28

CAM 33

DISPLIB 34

FILLIN 38

FN Index 40

FNP 42

FORM 43

Create Form 44
Object Maintenance 46
Form Fields 46
Character Map Functions 47
Menu, Menubar, and Validation Table Functions 48
Execute Form 48
Form and Field Validation Checking 50
Store Form 50

IAFLIB.I Management 51

IAFLIB Cache Management 54

IAFLIB Document Retrieval 55

IAFLIB Folders 57

IAFLIB Logon 59

IAFLIB Print (Remote) 60

QMR (Query Match Report) 62

RDD (Retrieval Data Dictionary) 63

SEC (Security) 65

TTY 66

WQS (WorkFlo Queue Services) 69

December 1996 WAL for Windows Programmer’s Reference Manual v


Contents

4 Error Messages 73
Error Message Display Program – MSG 73

Error Messages 74

Application Information 75

Archive 75

BATCHLIB 76

Batch Entry Service 76

Local Cache Manager 80

Remote Cache Services 81

Display 84

Document Services 87

Date/Time 90

Fill In 92

Local Print 93

Forms 94

Floating Point 98

IAF Library 99

Image Format Management 101

Index Form 104

Index Services 104

NCH - Network Clearing House 108

Remote Print 110

Query Match Report 113

Retrieval Data Dictionary 115

Restore 116

SCT 117

vi WAL for Windows Programmer’s Reference Manual December 1996


Contents

Security 118

Security Management 128

Service Name 128

SLACLIB 129

TTY 129

WorkFlo Queue Services 130

5 Image Formats 135


Banded Image Format 135
Page Layout 135
Memory Format 136
Coding Details 138

Tiled Image Format 139


Page Layout 139
Memory Format 140
Coding Details 143

Postage Stamp Format 144


Format 144

Images on Optical Disk 145

Special Limitations 147

image.h 148

tile.h 151

FN_page.h 155

6 Data Types and Structures 163


ASE_capability_typ 163

December 1996 WAL for Windows Programmer’s Reference Manual vii


Contents

ASE_doc_id_typ 164
ASE_document_status_typ 165
ASE_folder_id_typ 166
ASE_image_id_typ 167
ASE_migrate_status_typ 168
ASE_nch_name_type_typ 169
ASE_net_addr_typ 170
ASE_notify_option_typ 171
ASE_osar_id_typ 172
ASE_page_number_typ 173
ASE_page_range_typ 174
ASE_relational_op_typ 175
ASE_request_id_typ 176
ASE_server_id_typ 177
ASE_service_name_typ 178
ASE_session_number_typ 179
ASE_ssn_typ 180
ASE_surface_id_typ 181
ASE_surface_offset_typ 182
ASE_time_typ 183
BATCHLIB_BatchEntryStatus 184
BATCHLIB_BatchStatus 185
BATCHLIB_DocDesc 186
BATCHLIB_page_hdr_typ 187
BES_batch_cap_typ 188
BES_batch_id_typ 189
BES_ctl_desc_typ 190
BES_doc_desc_typ 191
BES_doc_list_typ 193

viii WAL for Windows Programmer’s Reference Manual December 1996


Contents

BES_dyn_hdr_desc_typ 194
BES_filter_typ 198
BES_handle_typ 200
BES_hdr_desc_typ 201
BES_image_desc_typ 202
BES_image_ix_desc_typ 204
BES_info_rec_typ 205
BES_info_spec_typ 206
BES_info_typ 207
BES_ixdir_desc_typ 208
BES_ixval_desc_typ 210
BES_ixval_spec_typ 211
BES_mkf_ixval_desc_typ 212
BES_stat_hdr_desc_typ 213
CAM_attr_typ 217
CAM Constants 218
cluster_key_typ 219
CSM_cache_access_mode 220
CSM_cache_id_typ 221
CSM_object_attr_typ 222
CSM_object_desc_typ 224
CSM_object_handle_typ 225
dir_entry_typ 226
DISPLIB Constants 227
DISPLIB_input_cb 230
DISPLIB_retrieve_cb 231
DOC_annotation_desc_typ 232
DOC_annotation_id_typ 234
DOC_annotation_typ 235

December 1996 WAL for Windows Programmer’s Reference Manual ix


Contents

DOC_committal_desc_typ 236
DOC_doc_attribute_value_typ 239
DOC_doc_location_desc_typ 240
DOC_family_create_server_typ 242
DOC_family_server_desc_typ 243
DOC_index_value_typ 245
DOC_migrate_order_typ 246
DOC_surface_desc_typ 247
DS_LIST 249
DS_LIST_ENTRY 250
DTM Masks 251
DTMdate_typ 253
DTM_tm 254
error_typ 255
ERM Constants 256
FILLIN_bkgrequest_rec_typ 257
FN_date_typ 259
FN_docnum_typ 260
FN_folnum_typ 261
FN_selection_typ 262
FN_server_version_typ 263
FN_time_typ 264
FNP_data 265
FNP_request_typ 266
FORM_BatchPageAttr_typ 267
FORM_BitmapField_typ 268
FORM_BkgAttr_typ 270
FORM_BkgImage_typ 271
FORM_BrushAttr_typ 272

x WAL for Windows Programmer’s Reference Manual December 1996


Contents

FORM_ButtonField_typ 273
FORM_CheckboxField_typ 275
FORM_Checked_typ 277
FORM_ColorAttr_typ 278
FORM_ComboboxField_typ 279
FORM_data_type 281
FORM_DateField_typ 282
FORM_DateMaskAttr_typ 285
FORM_DocField_typ 286
FORM_FieldAttr_typ 289
FORM_fielddesc_typ 296
FORM_FieldEvent_typ 297
FORM_FieldType_typ 298
FORM_FontAttr_typ 299
FORM_FormAttr_typ 300
FORM_GroupboxField_typ 303
FORM_HelpAttr_typ 304
FORM_IconAttr_typ 305
FORM_LineField_typ 306
FORM_ListboxField_typ 307
FORM_ListValue_typ 310
FORM_MenuAttr_typ 311
FORM_MenubarAttr_typ 312
FORM_MenuField_typ 313
FORM_MenuItem_typ 315
FORM_NumberField_typ 316
FORM_ObjectType_typ 319
FORM_PageAttr_typ 320
FORM_PatternField_typ 321

December 1996 WAL for Windows Programmer’s Reference Manual xi


Contents

FORM_PenAttr_typ 323
FORM_ProcAttr_typ 324
FORM_RadioField_typ 325
FORM_RectField_typ 327
FORM_ResourceAttr_typ 329
FORM_RoundRectField_typ 330
FORM_RuleAttr_typ 332
FORM_ScrollbarField_typ 333
FORM_SignatureField_typ 335
FORM_Softkey_typ 337
FORM_SoftkeyAttr_typ 338
FORM_StringField_typ 339
FORM_TableAttr_typ 342
FORM_Terminator_typ 343
FORM_TermProcAttr_typ 344
FORM_TextField_typ 345
FORM_ValFuncAttr_typ 347
FORM_ValItem_typ 348
FP_number 349
IAFLIB_image_object_typ 350
IAFLIB_prefetch_result 351
ILIB Constants 352
ILIB_DOC_annotation_id_typ 353
IMGFMT_custom_typ 354
IMGFMT_desc_typ 356
INX_closed_typ 357
INX_cluster_key_typ 358
INX_cluster_space_typ 359
INX_dcl_id_typ 360

xii WAL for Windows Programmer’s Reference Manual December 1996


Contents

INX_dcl_name_typ 361
INX_dir_typ 362
INX_doc_type_typ 363
INX_doc_index_rec_typ 364
INX_fam_id_typ 365
INX_fc_doc_ord_item_typ 366
INX_folder_desc_typ 367
INX_folder_name_typ 369
INX_folder_spec_typ 370
INX_index_id_typ 371
INX_index_name_typ 372
INX_index_value_typ 373
INX_query_match_typ 374
INX_retent_base_typ 376
INX_retent_disp_typ 377
INX_retent_offset_typ 378
INX_value_type_typ 379
NCH_AttributesDescValue 380
NCH_BatchDescValue 383
NCH_CacheDescValue 384
NCH_DefCacheDescValue 386
NCH_DefDeviceDescValue 387
NCH_DefServiceDescValue 388
NCH_DefService1DescValue 389
NCH_DomainName 391
NCH_ICRServiceDescValue 392
NCH_IMSDescValue 393
NCH_NetAddr_typ 394
NCH_ObjectName 395

December 1996 WAL for Windows Programmer’s Reference Manual xiii


Contents

NCH_PrintServDescValue 396
NCH_Property 397
NET_HostNum_typ 398
NET_ip_addr_typ 399
NET_NetAddr_typ 400
NET_NetNum_typ 401
PRI_annot_mark_typ 402
PRI_annot_marks_typ 403
PRI_doc_specifier_typ 404
PRI_eject_tray_typ 406
PRI_fax_mode_typ 407
PRI_option_typ 408
PRI_orientation_typ 410
PRI_overlay_typ 411
PRI_pages_printed_typ 412
PRI_paper_size_typ 413
PRI_position_typ 415
PRI_print_direction_typ 416
PRI_print_option_typ 417
PRI_print_option_typ2 423
PRI_printer_attr_typ 430
PRI_printer_attr_typ2 432
PRI_printer_op_status_typ 434
PRI_printer_status_typ 435
PRI_printer_type_typ 437
PRI_priority_typ 438
PRI_request_desc_typ 439
PRI_request_desc_typ2 444
PRI_request_filter_typ 450

xiv WAL for Windows Programmer’s Reference Manual December 1996


Contents

PRI_request_status_typ 452
PRI_request_type_typ 454
PRI_scaling_typ 455
PRI_service_status_typ 457
PRI_service_type_typ 458
PRI_sub_status_typ 459
PS_long_option_type 460
PS_options_rec_type 462
PS_printer_attr_desc_type 463
PS_printer_status_desc_type 465
QMR_ENTRY 467
QMR_INFO 468
QMR_Softkey_typ 469
RDD Constants 470
RDD_DC_INDEX_DESC 471
RDD_DCL_ID_TYP 472
RDD_DCLASS_DESC 473
RDD_INDEX_ID_TYP 474
RDD_IXFIELD_DESC 475
RDD_KEY_IXFIELD_DESC 477
RDD_MENU_DESC 478
RDD_MENUITEM_DESC 479
RDD_VALUE_TYPE_TYP 480
SCT_access_restrictions 481
SCT_handle 482
SCT_id 483
SCT_name 484
SCT_password 485
SEC_access_wanted_typ 486

December 1996 WAL for Windows Programmer’s Reference Manual xv


Contents

SEC_add_info_typ 487
SEC_AR_typ 489
SEC_AR_set_typ 490
SEC_delete_info_typ 491
SEC_find_func_mbr_info_typ 493
SEC_find_info_typ 494
SEC_find_term_mbr_info_typ 496
SEC_find_usr_info_typ 497
SEC_find_usr_mbr_info_typ 498
SEC_func_member_info_typ 499
SEC_func_name_typ 500
SEC_get_defaults_typ 501
SEC_get_system_info_typ 502
SEC_handle_typ 503
SEC_id_typ 504
SEC_info_type_typ 506
SEC_language_typ 507
SEC_memlist_typ 508
SEC_memlist_type_typ 509
SEC_name_typ 510
SEC_names_found_typ 511
SEC_security_defaults_typ 512
SEC_security_info_typ 513
SEC_set_defaults_typ 514
SEC_set_system_info_typ 515
SEC_stats_desc_typ 516
SEC_system_desc_typ 517
SEC_term_member_info_typ 519
SEC_time_range_typ 520

xvi WAL for Windows Programmer’s Reference Manual December 1996


Contents

SEC_update_info_typ 521
SEC_update_service_data_typ 522
SEC_update_service_info_typ 523
SEC_update_typ 524
SEC_update_usr_choice_typ 525
SEC_update_usr_info_typ 526
SEC_user_info_typ 527
SEC_usr_member_info_typ 528
TTY_softkey_label 529
WQS_delete_typ 530
WQS_dump_handle_typ 531
WQS_entry_id_typ 532
WQS_field_name_typ 533
WQS_field_unique_typ 534
WQS_incomplete_spec_typ 535
WQS_queue_field_typ 536
WQS_queue_handle_typ 537
WQS_queue_name_typ 538
WQS_sort_order_typ 539
WQS_status_spec_typ 540
WQS_sys_field_name_typ 541
WQS_user_field_desc_typ 542
WQS_workspace_name_typ 544
WQSLIB_fetch_spec_typ 545
WQSLIB_queue_desc_typ 548
WQSLIB_queue_entry_in_typ 550
WQSLIB_queue_entry_out_typ 551
WQSLIB_queue_field_choice_typ 552
WQSLIB_sys_field_value_typ 554

December 1996 WAL for Windows Programmer’s Reference Manual xvii


Contents

WQSLIB_user_field_value_typ 555

7 WAL Function Reference 557


Function Overview 557
Archive Functions 557
BATCHLIB Functions 558
BES Functions (Batch Entry Services) 559
Session Control Functions 559
Batch Functions 559
Image Functions 560
Index Functions 561
Document Functions 562
Miscellaneous BES Functions 562
CAM Functions 563
CSM Functions 563
CS Functions 564
DISPLIB Functions 564
DTM Functions 566
ERM Functions 567
FILLIN Functions 568
FN Functions (APPINFO) 569
FN Functions (INDXFORM) 569
FNP Functions (Local Printing) 570
FORM Functions 571
Initialization Functions 571
File Manipulation Functions 571
Object Maintenance Functions 572
Character Map Functions 573

xviii WAL for Windows Programmer’s Reference Manual December 1996


Contents

Field Manipulation and Maintenance Functions 573


Menu, Menu Bar, and Validation Table Functions 575
Execute Functions 576
Forms Server Functions 577
Forms Box Functions 577
Form Rule Functions 578
Miscellaneous Form Functions 579
FP Functions 579
IAFLIB Functions 582
Print Functions 582
Security Functions 583
Display Image Functions 584
Query Functions 584
Cache Functions 585
Document Functions 585
Folder Functions 586
Annotation Functions 587
Miscellaneous IAFLIB Functions 587
IMGFMT Functions 588
QMR Functions (Query Match Report) 588
RDD Functions (Retrieval Data Dictionary) 589
REST Functions 590
SEC Functions 591
ServName Functions 593
SLACLIB Functions 594
TTY Functions 595
WQS Functions (WorkFlo Queue Services) 596
Session Management Functions 596
Queue and Workspace Functions 597

December 1996 WAL for Windows Programmer’s Reference Manual xix


Contents

Queue Entry Functions 598

WAL Function Calls 599


ARCH_DocEntry() 600
BATCHLIB_BatchAbort() 603
BATCHLIB_BatchEntry() 604
BATCHLIB_commit_files() 607
BATCHLIB_commit_file_list() 610
BATCHLIB_enqueue_batch() 612
BATCHLIB_find_batch_docs() 613
BATCHLIB_find_batch_images() 616
BATCHLIB_find_batches() 618
BATCHLIB_get_batch_object() 620
BATCHLIB_update_batch() 622
BATCHLIB_update_batch_doc() 624
BES_abort_image() 626
BES_alloc_batch_name() 627
BES_alloc_ids() 628
BES_client_register() 629
BES_close_batch() 630
BES_close_csum_image() 631
BES_close_image() 633
BES_commit_batch_now() 635
BES_create_batch() 637
BES_create_doc() 639
BES_create_image() 641
BES_create_image_index() 643
BES_delete_batch() 645
BES_delete_doc() 646
BES_delete_image() 648

xx WAL for Windows Programmer’s Reference Manual December 1996


Contents

BES_delete_image_index() 649
BES_dequeue_batch() 651
BES_enqueue_batch() 652
BES_find_batches() 655
BES_find_docs() 657
BES_find_images() 659
BES_get_image_index() 661
BES_get_info() 663
BES_get_num_cluster_id() 665
BES_get_str_cluster_id() 666
BES_logoff() 667
BES_logon() 668
BES_modify_image_index() 669
BES_move_image() 671
BES_open_batch() 673
BES_open_image() 675
BES_put_info() 677
BES_query_index_dir() 679
BES_read_image() 680
BES_read_whole_image() 682
BES_renew() 684
BES_sync_commit() 685
BES_update_batch() 687
BES_update_doc() 688
BES_update_image() 690
BES_update_index_total() 692
BES_verify_image() 693
BES_write_image() 695
CAM_add_file() 697

December 1996 WAL for Windows Programmer’s Reference Manual xxi


Contents

CAM_delete_file() 699
CAM_exit() 700
CAM_find_file() 701
CAM_get_attr() 703
CAM_init() 706
CAM_set_attr() 707
CS_compute_csum() 709
Set Checksum 709
Get Checksum 710
CSM_close_object() 712
CSM_delete_object() 713
CSM_logoff() 714
CSM_logon() 715
CSM_modify_object() 717
CSM_open_object() 718
CSM_read_object() 720
CSM_renew() 721
DISPLIB_close_object() 723
DISPLIB_free_handle() 724
DISPLIB_free_object() 725
DISPLIB_get_attr() 726
DISPLIB_get_band_bitmap() 727
DISPLIB_get_format() 729
DISPLIB_init_handle() 730
DISPLIB_paint_bitmap() 731
DISPLIB_paint_object() 733
DISPLIB_register_object() 737
DISPLIB_retrieve_typ() 739
DISPLIB_set_attr() 741

xxii WAL for Windows Programmer’s Reference Manual December 1996


Contents

Scale-to-Gray 741
DISPLIB_set_retrieval() 743
DISPLIB_stretch_bitmap() 744
DISPLIB_yield_typ() 746
DTM_addtime() 747
DTM_asctime() 748
DTM_ctime() 749
DTM_date() 751
DTM_ftime() 752
DTM_getdate() 753
DTM_getmask() 754
DTM_getmasklength() 755
DTM_gmtime() 756
DTM_gp() 757
DTM_gtime() 758
DTM_localtime() 759
DTM_stime() 760
DTM_subdate() 761
DTM_subtime() 762
DTM_time() 763
DTM_verifymask() 764
ERM_display_error() 765
ERM_get_error() 766
ERM_log_error() 767
ERM_log_event() 768
FILLIN_bkg_commit() 770
FILLIN_bkg_commit_image() 772
FILLIN_commit() 774
FILLIN_commit_image() 776

December 1996 WAL for Windows Programmer’s Reference Manual xxiii


Contents

FILLIN_do_form() 779
FILLIN_get_doc_class() 780
FILLIN_get_form_name() 782
FILLIN_index() 784
FILLIN_local_print() 786
FILLIN_server_print() 787
FN_clear_index_form() 788
FN_copy_file() 789
FN_custom_index_form() 790
FN_get_app_info_int() 792
FN_get_app_info_string() 793
FN_get_window_pos() 794
FN_index_form() 795
FN_index_form_exit() 797
FN_index_form_init() 798
FN_index_handle_to_text() 800
FN_index_text_to_handle() 802
FN_index_verify() 804
FN_save_index_form() 806
FN_set_app_file() 808
FN_set_app_info() 809
FN_set_window_pos() 810
FN_show_index_form() 811
FN_show_new_values_in_form() 813
FNP_exit() 815
FNP_init() 816
FNP_print() 817
FNP_print_form_page() 819
FNP_print_from_file() 820

xxiv WAL for Windows Programmer’s Reference Manual December 1996


Contents

FORM_add_named_rule() 821
FORM_add_rule() 823
FORM_append_item() 825
FORM_bind_val_func() 827
FORM_box_add_item() 829
FORM_box_delete() 830
FORM_box_directory() 831
FORM_box_find_item() 832
FORM_box_get_count() 833
FORM_box_get_sel() 834
FORM_box_get_sel_count() 835
FORM_box_get_text() 836
FORM_box_get_text_len() 837
FORM_box_match_item() 838
FORM_box_select_list() 839
FORM_box_set_default() 840
FORM_box_set_sel() 841
FORM_change_menu_item() 842
FORM_check_syntax() 843
FORM_clear() 844
FORM_clear_field_value() 845
FORM_clear_form_values() 846
FORM_clone_form() 847
FORM_close_object() 848
FORM_close_volatile_objects() 849
FORM_create_field() 850
FORM_create_object() 853
FORM_default_field_value() 854
FORM_default_form_values() 855

December 1996 WAL for Windows Programmer’s Reference Manual xxv


Contents

FORM_delete_field() 856
FORM_do_form() 857
FORM_enable_fields() 858
FORM_enable_form_window() 859
FORM_escape_form() 860
FORM_evaluate() 861
FORM_execute_form() 863
FORM_exit() 864
FORM_find_file() 865
FORM_find_file_in_path() 866
FORM_find_file_in_path2() 867
FORM_generate_fill_in_page() 869
FORM_generate_form_file() 870
FORM_generate_image_page() 871
FORM_generate_one_form_file() 872
FORM_generate_pcode_file() 873
FORM_get_bitmap_handle() 874
FORM_get_field_attr() 875
FORM_get_field_attr_using_ord() 877
FORM_get_field_count() 878
FORM_get_field_info() 879
FORM_get_field_name() 880
FORM_get_file_list() 881
FORM_get_file_service() 882
FORM_get_last_field() 883
FORM_get_menu_items() 884
FORM_get_menubar_items() 885
FORM_get_object_attr() 886
FORM_get_object_list() 887

xxvi WAL for Windows Programmer’s Reference Manual December 1996


Contents

FORM_get_one_valtable_item() 888
FORM_get_row_text() 889
FORM_get_terminator() 890
FORM_get_valtable_items() 891
FORM_init() 892
FORM_install_list() 893
FORM_load_file() 894
FORM_load_form_from_page() 895
FORM_load_object() 896
FORM_make_groups_contiguous() 898
FORM_paint_in_DC() 899
FORM_server_copy_file() 900
FORM_server_delete_file() 901
FORM_server_rename_file() 902
FORM_server_retrieve_file() 903
FORM_server_save_file() 904
FORM_set_field_attr() 905
FORM_set_field_attr_using_ord() 906
FORM_set_field_focus() 908
FORM_set_file_service() 909
FORM_set_menu_items() 910
FORM_set_menubar_items() 911
FORM_set_object_attr() 912
FORM_set_one_valtable_item() 914
FORM_set_valtable_items() 915
FORM_show_form() 916
FORM_step_form() 917
FORM_text_out() 919
FORM_validate_form() 920

December 1996 WAL for Windows Programmer’s Reference Manual xxvii


Contents

FP_abs() 921
FP_add() 922
FP_assign() 923
FP_dbl2num() 924
FP_divide() 925
FP_eql() 926
FP_geq() 927
FP_getmode() 928
FP_gtr() 929
FP_isundef() 930
FP_leq() 931
FP_long2num() 932
FP_lss() 933
FP_multiply() 934
FP_neg() 935
FP_neq() 936
FP_num2dbl() 937
FP_num2long() 938
FP_num2mask() 939
Numeric Mask 939
FP_num2ora() 941
FP_num2sci() 942
FP_num2str() 943
FP_num2unslong() 944
FP_ora2num() 945
FP_retsign() 946
FP_round() 947
FP_rounddisp() 948
FP_setmode() 949

xxviii WAL for Windows Programmer’s Reference Manual December 1996


Contents

FP_setundef() 950
FP_str2num() 951
FP_subtract() 952
FP_trunc() 953
FP_unslong2num() 954
IAFLIB_add_notation() 955
IAFLIB_add_notation1() 957
IAFLIB_cancel_print() 959
IAFLIB_check_membership() 961
IAFLIB_check_password() 962
IAFLIB_continue_query() 963
IAFLIB_create_cache_object() 965
IAFLIB_create_folder() 967
IAFLIB_delete_annotation() 969
IAFLIB_delete_cache_object() 971
IAFLIB_delete_docs() 973
IAFLIB_delete_folders() 976
IAFLIB_file_doc() 978
IAFLIB_file_doc_after() 980
IAFLIB_find_folders() 982
IAFLIB_find_index_in_DIR() 984
IAFLIB_find_system_defaults() 985
IAFLIB_FreeAttr2Memory() 986
IAFLIB_free_client_handle() 987
IAFLIB_FreeRequest2Memory() 988
IAFLIB_FreeStatusMemory() 989
IAFLIB_get_annotations() 990
IAFLIB_get_cache_object_attrs() 992
IAFLIB_get_client_handle() 994

December 1996 WAL for Windows Programmer’s Reference Manual xxix


Contents

IAFLIB_get_current_IMS() 995
IAFLIB_get_default_restrictions() 996
IAFLIB_get_doc_attr() 998
IAFLIB_get_docs_in_folder() 1000
IAFLIB_get_file_text() 1002
IAFLIB_get_folder_attrs() 1004
IAFLIB_get_membership_list() 1006
IAFLIB_get_object() 1007
IAFLIB_get_object_text() 1009
IAFLIB_get_print_queues() 1011
IAFLIB_get_print_queues2() 1013
IAFLIB_get_print_service_info() 1015
IAFLIB_get_print_service_info1() 1017
IAFLIB_get_printer_info() 1019
IAFLIB_get_printer_info2() 1021
IAFLIB_get_security_info() 1023
IAFLIB_get_server_version() 1024
IAFLIB_get_single_DIR() 1025
IAFLIB_get_user_name() 1027
IAFLIB_get_user_stats() 1028
IAFLIB_get_version() 1029
IAFLIB_initialize_RDD() 1030
IAFLIB_is_annotated() 1031
IAFLIB_logon_user() 1033
IAFLIB_migrate_from_optical_disk() 1034
IAFLIB_migrate_to_optical_disk() 1036
IAFLIB_modify_print() 1038
IAFLIB_modify_print2() 1040
IAFLIB_move_cache_object() 1042

xxx WAL for Windows Programmer’s Reference Manual December 1996


Contents

IAFLIB_move_folder() 1045
IAFLIB_prefetch() 1048
IAFLIB_print_docs() 1051
IAFLIB_print_docs1() 1053
IAFLIB_print_files() 1055
IAFLIB_print_files1() 1057
IAFLIB_put_annotation() 1059
Creating an Annotation 1059
Modifying an Annotation 1059
IAFLIB_put_object() 1063
IAFLIB_query_db() 1066
Specifying the Key and Filter Condition 1067
System Indexes vs. User Indexes 1068
Key and Filter Indexing Fields 1068
Key and Filter Conditions 1068
Examples of Key Conditions 1069
Examples of Filter Conditions 1070
IAFLIB_reorder_folder() 1072
IAFLIB_resize_cache_object() 1074
IAFLIB_terminate_query() 1076
IAFLIB_unfile_docs() 1077
IAFLIB_update_db() 1079
IAFLIB_update_folder() 1081
IAFLIB_where_filed() 1083
IMGFMT_cmp_tiff() 1085
IMGFMT_compress() 1086
IMGFMT_convert_image() 1087
IMGFMT_convert_image_custom() 1092
QMR_build_doc_list() 1094

December 1996 WAL for Windows Programmer’s Reference Manual xxxi


Contents

QMR_create_match_window() 1095
QMR_format_report() 1097
QMR_query() 1099
QMR_select_match() 1101
RDD_exit() 1103
RDD_get_dclass_info() 1104
RDD_get_dclasses() 1105
RDD_get_handle() 1106
RDD_get_ix_info() 1107
RDD_get_key_info() 1108
RDD_get_menuitem_info() 1109
RDD_get_menuitems() 1110
RDD_get_valid_ixs() 1111
RDD_get_valid_keyixs() 1112
RDD_init() 1113
RDD_is_field_valid() 1114
RDD_is_key_valid() 1115
RDD_set_handle() 1116
REST_CloseArchive() 1117
REST_GetArchTime() 1118
REST_GetDirEntry() 1119
REST_GetFileName() 1120
REST_GetFileNames() 1121
REST_GetVolName() 1122
REST_OpenArchive() 1123
REST_RestoreDoc() 1125
REST_RestoreFile() 1127
SCT_serialize() 1129
SEC_add_info() 1130

xxxii WAL for Windows Programmer’s Reference Manual December 1996


Contents

SEC_check_access() 1132
SEC_check_functions() 1134
SEC_check_membership() 1136
SEC_delete_info() 1137
SEC_find_info() 1139
SEC_get_membership_list() 1141
SEC_get_security_info() 1143
SEC_get_system_info() 1145
SEC_logoff() 1147
SEC_logon() 1148
SEC_rename_info() 1150
SEC_renew() 1152
SEC_set_system_info() 1153
SEC_update_info() 1154
SECMAN_free_sec_handle() 1155
SECMAN_get_sec_handle() 1156
SECMAN_renew_sec_handle() 1158
ServiceNameCacheDefaults() 1159
ServiceNameDefaults() 1160
ServiceNameOptions() 1161
SLACLIB_GetAttr() 1162
SLACLIB_GetTimeStamp() 1163
SLACLIB_RegisterWindow() 1164
SLACLIB_ResetTimer() 1166
SLACLIB_SetAttr() 1167
SLACLIB_Shutdown() 1168
SLACLIB_UnRegisterWindow() 1169
SVN_get_Attr_desc() 1170
SVN_get_BES_desc() 1171

December 1996 WAL for Windows Programmer’s Reference Manual xxxiii


Contents

SVN_get_CSM_desc() 1172
SVN_get_DefDevice_desc() 1173
SVN_get_DefServ1_desc() 1174
SVN_get_IMS_desc() 1175
SVN_GetLocalAddr() 1176
SVN_get_PS_desc() 1177
SVN_IMSToStr() 1178
SVN_parse_service_name() 1179
TTY_clear() 1180
TTY_clear_input() 1181
TTY_clear_msg() 1182
TTY_clear_softkeys() 1183
TTY_create_window() 1184
TTY_display() 1186
TTY_display_msg() 1188
TTY_display_popup() 1190
TTY_exit() 1192
TTY_get_pos() 1193
TTY_init() 1194
TTY_make_current() 1195
TTY_read_input() 1196
TTY_scroll() 1198
TTY_set_app_info_key() 1200
TTY_set_pos() 1201
TTY_set_softkeys() 1202
TTY_update_window() 1204
WQS_close_queue() 1205
WQS_continue() 1206
WQS_count_entries() 1207

xxxiv WAL for Windows Programmer’s Reference Manual December 1996


Contents

WQS_create_queue() 1208
WQS_create_workspace() 1209
WQS_delete_entry() 1211
WQS_delete_queue() 1212
WQS_delete_workspace() 1214
WQS_end_dump() 1215
WQS_get_default_service() 1216
WQS_get_queue_desc() 1217
WQS_get_queue_names() 1219
WQS_get_server_name() 1221
WQS_get_workspace_info() 1222
WQS_get_workspace_names() 1223
WQS_insert_entry() 1224
WQS_is_WQS() 1226
WQS_logoff() 1227
WQS_logon() 1228
WQS_open_queue() 1230
WQS_qlogon() 1232
WQS_read_dump() 1234
WQS_read_entry() 1238
WQS_read_queue() 1240
WQS_renew() 1242
WQS_start_dump() 1243
WQS_update_entry() 1245
WQS_update_queue() 1247
WQS_update_workspace() 1249

Appendix A–IMS Security Services


and WAL 1251

December 1996 WAL for Windows Programmer’s Reference Manual xxxv


Contents

Managing Multiple Security Sessions 1251


User- and Group-defined Logon IDs 1252
System Administrators: Creating Users, Groups, and Passwords 1253
Example Password and Security Management Code 1254

Glossary 1257

xxxvi WAL for Windows Programmer’s Reference Manual December 1996


About This Manual

This manual accompanies Release 5.0 of WorkFlo Application


Libraries (WAL). It describes the FileNet System architecture, how to build a
WAL application, and the data structures and data types used with WAL, and
it provides a reference for all of the WAL functions. It also describes the WAL
error messages and image formats, and provides data flow diagrams for the
WAL functions.

Who Should Read This Manual?


Read this manual if you need to write WAL applications in the ‘C’ language
that interact with FileNet’s imaging systems from PC workstations.

The manual is organized as follows:

Chapter 1 – FileNet System Architecture

Provides an overview of the FileNet Document Image Processing System


and the environment in which the WorkFlo Application Libraries operate.

Chapter 2 – Getting Started

Describes how to build a WAL for Windows program, how to test your
programming environment, and each of the sample applications.

Chapter 3 – Data Flow Diagrams

Provides data flow diagrams for the WAL functions that illustrate the
individual functions and groups of functions that are necessary to perform
an operation. The data flow diagrams also show the order in which
functions are called.

Chapter 4 – Error Messages

Describes the error message display program (MSG.EXE) and the errors
specific to each library.

Chapter 5 – Image Formats

Describes the format of banded images, tiled images, postage stamp


images, and images on optical disk as used by FileNet.

December 1996 WAL for Windows Programmer’s Reference Manual xxxvii


About This Manual
Conventions Used in This Manual

Chapter 6 – Data Types and Structures

Describes the data types, constants, and data structures used with the
WorkFlo Application Libraries.

Chapter 7 – WAL Function Reference

Provides an alphabetically-arranged reference to all of the WAL functions.


This reference describes each function, its syntax, and each of its
parameters.

Appendix A – IMS Security Services and WAL

Describes changes in IMS Security Services with the IMS 3.1 release and
the corresponding WAL functions and data structures.

Glossary

Defines terms used in this manual.

Conventions Used in This Manual


The WAL documentation uses a few special conventions.

The first time we describe a new term, you see it in bold text. A definition for
every bolded term appears in Appendix A.

Italic type indicates the titles of books or manuals recommended for further
information.

Education
FileNet offers introductory and advanced classes for system administrators,
developers, management, and support personnel. These classes combine
lecture and lab sessions to provide both conceptual understanding of the
FileNet system and practice in its operation. For more information on class
content and schedules, please visit the Education topics in the Services and
Support area of FileNet’s web site (www.filenet.com).

xxxviii WAL for Windows Programmer’s Reference Manual December 1996


About This Manual
Comments and Suggestions

Comments and Suggestions


FileNet invites all customers to communicate with the Documentation group
on any question or comment related to FileNet manuals and on-line help. Just
fax, phone, mail, or e-mail any question or comment to Mike Calvert at one of
the numbers or addresses listed below. We guarantee a response to each
communication within one week. Your suggestions help us improve the
products we deliver.

Mike Calvert
Director of Documentation
FileNet Corporation
3565 Harbor Boulevard
Costa Mesa, California 92626-1420

Phone: 714.966.2449
Fax: 714.966.7153
E-mail: calvert@filenet.com

December 1996 WAL for Windows Programmer’s Reference Manual xxxix


About This Manual
Comments and Suggestions

xl WAL for Windows Programmer’s Reference Manual December 1996


1
1Introduction

This document describes the FileNet system and the client library functions
available to application developers who want to write software in the ‘C’
language that interacts with FileNet’s imaging systems from PC workstations.
The WorkFlo Application Libraries (WAL) provide a subset of the facilities
presently supporting WorkFlo Business Systems. As a group, the WAL
interfaces provide a broad variety of functions for storing, indexing,
transferring, and retrieving data objects.

This chapter provides an overview of FileNet Image Management Services


(IMS) and the environment in which the WorkFlo Application Libraries
operate. To gain a general understanding of the functions and the underlying
concepts of the FileNet system, read this chapter before using the remainder
of this manual.

Note The following system summary includes information concerning the FileNet
IMS software only. It does not include information about the AIX/6000
operating system.

FileNet System Architecture


The FileNet imaging system is a distributed system with software services on
a number of servers. The following paragraphs provide an overview of both
the FileNet hardware and the software architecture.

Hardware
The system hardware has the following three major categories:

• Workstations—allow users to communicate with system resources.


WorkFlo/Scan stations also require a scanner as a peripheral device.

• Servers—run the software that provides services, or main functions, for


the entire system. Each server has its own copy of the FileNet IMS
software.

December 1996 WAL for Windows Programmer’s Reference Manual 1


1 Introduction
FileNet System Architecture

The term “service” applies strictly to software. More than one service can
reside on the same server. Conversely, a particular service can reside on
more than one server. (This is discussed in greater detail in “Servers and
Their Services” on page 5.)

• Storage library—provides permanent storage of the scanned images. The


storage medium is a group of optical disks stored in a library, sometimes
referred to as a jukebox. A robotic arm retrieves optical disks and places
them in an optical disk drive as information from them is required. An
optical disk drive retrieves the image from the disk or writes an image to
the disk. The storage library contains at least one optical disk drive.

A network links these components into a system capable of distributed image


processing.

Software
This section overviews the most important characteristics of the software—its
distributed architecture and its implementation according to a client-server
model. A discussion of processes, abstracts, and remote procedure calls
provides supporting concepts.

Distributed Architecture
Each station and server in the system is a separate computer dedicated to
performing a specific task. The name generally describes that task. For
example, the Index server performs tasks relating to indexing. No single
computer provides all of the processing for the system. The computers, and
the associated tasks, are geographically spread across the FileNet system.

FileNet IMS permits the computers to share resources and tasks. Running
FileNet IMS system-wide supplies the software connection that allows the
system components to communicate with each other. This communication
and the sharing of tasks and resources form the distributed nature of the
system architecture.

Processes
A process refers to an executing program that performs a task. FileNet IMS
can run a process in the background or foreground. Running a process in the
background permits another process to run in the foreground at the same
time. The FileNet IMS automatically runs certain processes in the background
at determined time intervals; these are called “daemon” processes.

2 WAL for Windows Programmer’s Reference Manual December 1996


1 Introduction
FileNet System Architecture

Commands given at the keyboard sometimes invoke processes. Processes


execute at the particular station or server that issues the command. Some
processes, created by the system, perform system-wide functions.

The system assigns each process a process ID number. The microprocessor


can run several processes concurrently by quickly switching from one process
to another, performing part of a process before switching to another. To any
one user, it appears that the process has complete control of the system
resources. This feature allows multiple-user activity on the system.

Once a process is running, it can call another process or a request handler


abstract.

Abstracts
An abstract is a piece of software code that many processes use. The code
provides capabilities that a process lacks, and it extends the power of UNIX.
An abstract can be called by various processes and even by other abstracts.
To the system, the abstract is shareable: rather than repeat the code many
times, the code is written once, then used by each routine that calls it.

The called abstract provides a service to the calling process. The abstract
manages particular data structures and provides a procedural interface to the
data. In this way, an abstract insulates the calling process from having to
manage the data. The process just calls the abstract that will do the work for
it.

Since processes share abstracts, a system of interlocks control which process


has access to an abstract at a particular time. This mechanism avoids
contention among processes for the resources of an abstract. The calling
process or abstract links to the needed abstract and unlinks when finished
with the abstract.

December 1996 WAL for Windows Programmer’s Reference Manual 3


1 Introduction
FileNet System Architecture

Remote Procedure Call


Remote Procedure Call (RPC) refers to a mechanism that allows client
software (a program running on a station) to request services provided by the
software running on a server. The network and various DLLs implement the
formal client-server model so that computers spread across the network can
communicate and share resources.

Client DLLs (explained below) make the actual requests. Remote services
provide the requested services on a station other than the client. In this
process, the client and server pass requests and parameters so that the
network appears not to exist. Stubs, as described below, make the network
transparent to the client software.

Client DLLs
To call a service, the client software links to a DLL. This abstract first
determines whether the requested abstract (target abstract) resides locally or
remotely. The station containing the target abstract is called the target station.
If the target abstract is local, the client stub abstract links to the target abstract
and passes any parameters included in the original call.

If the target station is remote, the client stub abstract serializes parameters for
transmission over the network and sends them and the call to the target
station and the target abstract.The client DLL also deserializes the results
returned to it across the network from the target abstract.

Remote Services
On the server providing the remote service, the Server Stub program receives
and deserializes the request and the accompanying parameters sent from the
client across the network. The Server Stub program then links to and calls the
target abstract.

When the target abstract has executed, the Server Stub program returns
results to the client stub abstract over the network.

4 WAL for Windows Programmer’s Reference Manual December 1996


1 Introduction
FileNet System Architecture

Servers and Their Services


The FileNet system is based on a client-server model. The clients consist of
application software running on workstations. The following paragraphs
describe the other half of the model—the servers. The servers are the support
hardware where the service software runs. The service software provides
system services to the client application software.

Briefly, when a user at a workstation requests an action from the FileNet


system, the client station software asks the server software to perform the
requested function.

Root Server
Each FileNet system has one root server, which has the following
characteristics:

• FileNet IMS is a distributed file system. Every server runs its own copy of
the FileNet IMS system. All files, however, are part of a single “global” file
system. Whether the disk containing the file is local or remote to a given
server, the file name is the same. Furthermore, the file name contains no
indication of the physical location of the file.

• Commonly used subroutines are referred to as abstracts and are


dynamically loaded and shared among all programs running on a given
server. This reduces both memory and disk requirements.

• FileNet IMS allows programs to obtain “globally shared memory” which


can be accessed by more than one process.

• FileNet IMS moves an entire process out to the swap area, which is
referred to as “swapping.” Also, FileNet IMS always runs processes
contiguous in physical memory.

• Most processes cannot be stopped and restarted later.

Index Server
The Index server contains a magnetic disk that stores the index database.
Client applications can access this database. This server runs Index Services,
which stores, retrieves, and updates information in the document index
database. Currently, FileNet’s index database is a converted Oracle data
abstract, or a Sybase relational database.

December 1996 WAL for Windows Programmer’s Reference Manual 5


1 Introduction
FileNet System Architecture

There are two types of index fields, system and user. System index fields are
common across all document index records. Each document class contains
the same system index fields and different user-defined index fields. You
might also define an indexless document class which contains no user-
defined index fields.

The process of writing document index values into the Index database is
called cataloging. When cataloging is complete, documents can be retrieved
by querying using index values. Documents must be classified into document
classes. Documents also can be classified into folders.

Optionally, customers can use their own mainframes and their own databases
to keep track of the document indexes.

Storage Library Server


The Storage Library server connects the storage library with the rest of the
FileNet system. The server contains substantial magnetic disk. A large area of
the magnetic disk is called page cache. Because of the large memory
requirements for images, the page cache serves as a temporary holding area
for an image being written to or retrieved from optical disk.

A Storage Library server can control several storage libraries. An alpha-


numeric terminal (ANT), attached to the server, runs the Server Control
Program (SCP).The process of writing documents (image data) to optical disk
is called migrating. The process of combining several images into a document
and placing it into the permanent database is called committing. The process
of retrieving documents from the Storage Library server in the background as
a lower priority is called prefetching.

Two important databases reside on the server. The transient database,


fn_trans_DB, manages the space and the images in the page cache.
fn_trans_DB also tracks current transactions involving the storage library
(reads and writes). The permanent database, fn_perm_DB, contains the
addresses of the two optical disk locations for each document. This tracks the
optical disk locations of each document and its copy.

Software for the Storage Library server divides Storage Library server
functions into back-end and front-end processing. The front end provides
software that fields requests from other stations. That is, requests from other
stations for Storage Library services get queued by the front end for
processing by the back end. The back end processes requests from the front
end one at time. While the front end retrieves requests, the back end performs
the slow reads and writes between the page cache and an optical disk.

6 WAL for Windows Programmer’s Reference Manual December 1996


1 Introduction
FileNet System Architecture

Several services run on the Storage Library server—Storage Library


Services, Document Services, Cache Services, and Print Services. If a
system has more than one Storage Library server, Document Services runs
on one of these (and it is therefore normally called a Document Server) and
Storage Library Services runs on all of them.

Document Services
Document Services provides access to image documents. It maps document
numbers into optical disk and/or magnetic disk cache locations, and returns
the compressed bitmaps (for image documents) or the actual document
data (for ASCII and other types of documents). The IAFLIB document
functions are entry points to Document Services.

Storage Library Services


Storage Library Services controls a storage library’s robotic arm and its
optical drives. This service also transfers documents to and from the local
magnetic disk cache and the optical disks.

Cache Services
Cache Services stores and retrieves objects from magnetic disk caches. Only
one physical cache can exist on a server. The contents of the cache are
managed by a transient database. A physical cache can contain the following
logical caches:

Logical Cache Cache Name Description


Batch Entry bes_cache(n) Holds uncommitted images.
Retrieval page_cache(n) Holds committed documents waiting
migration to optical disk and
documents retrieved from the
storage library.
Application app_print_cache(n) Holds documents or images awaiting
Print printing.
Fill-in fillin_cache(n) Holds incoming form documents
awaiting migration to optical disk.
Revise revise_cache(n) Holds Revise Review/Markup/Edit
documents and overlays for retrieval
by workstations.

December 1996 WAL for Windows Programmer’s Reference Manual 7


1 Introduction
FileNet System Architecture

Logical Cache Cache Name Description


ICR icr_cache(n) Holds printable objects from
WorkFlo/ICR, the Intelligent
Character Recognition system.
System Print sys_print_cache(n) Hold printable objects, such as Apex
screens, text files, COLD documents,
and bitmap images, waiting to be
printed.

The (n) in the cache name represents the station number. The IAFLIB cache
functions are entry points to Cache Services.

Print Services
Print Services maintains queues of print requests. This service invokes
Document services. It runs on either the Document server or the Storage
Library server. Print Services uses the print cache to store documents that are
waiting to be printed. The IAFLIB print functions are entry points to Print
Services.

WorkFlo/Print Server
The WorkFlo/Print server is a PC-based server that controls printers that print
documents or files ranging from A-size documents to E-size drawings.
Although the server contains no magnetic disk, it does connect to an ANT.
(Note that Print Services runs on the Storage Library server, not the Print
server.)

WorkFlo/Fax Server
The WorkFlo/Fax server is a PC-based server. The necessary fax server
software resides on the hard disk of the PC. This software is a client of Print
Services.

The user can send or receive FileNet images via the fax server. When
receiving an image, the fax server optionally commits the image to the FileNet
system. The software also displays a journal of all fax server transactions.
This journal can be committed to the FileNet system.

8 WAL for Windows Programmer’s Reference Manual December 1996


1 Introduction
FileNet System Architecture

WorkFlo/Scan Station
The WorkFlo Scan station is a PC-based workstation for scanning
documents.

Application Server
The Application server is an additional server that is used to host any
combination of these services: WorkFlo Queue Services, Batch Entry
Services, Cache Services, Print Services, and SQL Services. This server, and
the associated software services, provides a performance improvement
option by replicating and distributing certain heavily-used services.

WorkFlo Queue Services


WorkFlo Queue Services provides access to WorkFlo queues. If you do not
have an Application Server running WorkFlo Queue Services, this service
runs on the Index Server.

A queue is a list of entries (one entry per row) that contains a specific number
of columns of information. Each column is called a queue field. There are two
types of queue fields, system and user. System queue fields are columns
common across all queues. User-defined queue fields can differ from queue
to queue.

A WorkFlo queue is created from WorkFlo Maintenance or by calling the


WQS_create_queue() function. A queue is classified into one of three types—
distributor, regular, or rendezvous—by the way that it is filled and processed.
The characteristics of these types of queues are:

• Distributor queues are filled automatically as documents are committed.


Queue entries can be processed after the committal.

• Regular queues can be filled when all required field values are available.

• Rendezvous queues can be filled even if some user-defined field values


are not available. The rendezvous queue entries cannot be processed
until all of the required fields are filled.

To define a distributor queue, you must:

• Define a user-defined field of type document. If you need to route index


information to the distributor queue, you need to define the queue field to
have the same name as the index name.

December 1996 WAL for Windows Programmer’s Reference Manual 9


1 Introduction
Operating environment

• Specify the WorkFlo system (workspace) name and the WorkFlo queue
name in the definition of the document class.

To define a rendezvous queue, you must define one user-defined field to be


the rendezvous field. The rendezvous field uniquely identifies the entry.

To define a regular queue, you must not define any user-defined field as a
rendezvous field.

Batch Entry Services


Batch Entry Services (BES) provides the ability to input batches of
documents. This service uses Index services, Cache services, and Document
services. If you do not have an Application Server running Batch Entry
Services, this service runs on the Storage Library Server.

Much of the disk space is dedicated to BES cache. BES cache stores images
that are waiting to be indexed and committed. A batch is a collection of
images and descriptions that indicate how the images should be combined
into documents. After the batch is committed, the batch is deleted from BES
cache.

The BATCHLIB and BES functions are entry points to Batch Entry Services.

Cache Services
If you have an Application server configured with Batch Entry Services, the
server must also contain Cache Services, which stores and retrieves objects
from magnetic disk caches.

Operating environment
The following diagram shows the location of the WAL services and their
relation to other software subsystems.

10 WAL for Windows Programmer’s Reference Manual December 1996


1 Introduction
Operating environment

PC Workstation

Application Programs

IAFLIB

WorkFlo Application
Libraries

Communications H/W
& S/W (Courier, RPC,
XNS, or TCP/IP, U-B
or 3Com)

FileNet FileNet FileNet


IMS IMS IMS
Server Server Server

LAN

Application programs are the user interface programs. This is the usual level
of the software to which the user at the workstation has direct access.

The IAFLIB layer contains the high-level library routines that are available to
the application programmer. These routines set up all of the necessary calling
parameter information and make all of the necessary calls to the WAL entry
points. These are also the routines that give meaning to the data that is stored
in the various objects manipulated by the WAL services.

The WorkFlo Application Libraries layer corresponds directly with the basic
functions that are provided by the FileNet servers. For the most part, none of
the libraries are built upon any of the others (i.e., WAL modules make few
calls to other WAL modules). It is this layer of the client software that deals
directly with the Courier communications software. The entry points, data
structures, and functions provided in this layer are not addressed in this
manual; they are transparent to the applications programmer.

The communications layer is the layer that actually uses the Courier
definitions and Remote Procedure Calls to communicate across the network
with the rest of the servers on the FileNet system.

December 1996 WAL for Windows Programmer’s Reference Manual 11


1 Introduction
Use of Imaging System

Use of Imaging System


The primary use of an imaging system is to store and retrieve documents. In
addition, an imaging system that uses queues can route millions of pages of
paper electronically and efficiently from employee to employee.

Retrieval Example
To retrieve documents that have been stored on a FileNet IMS system, you
start by accessing the Index Service. The Index Service contains data about
each document. Entry points (functions) into that service allow you to ask for
documents containing particular types of information—depending on how the
documents were indexed at the time they were stored. For example, perhaps
you want all the documents for account number 8834 or all the documents for
that account number received in July. The Index Service supplies you with the
IDs for the documents you need.

The next several steps can all be performed by one DISPLIB function, but it is
important to understand what is going on. The Document Service has a
database that lists the documents by ID and can find out what optical disks
contain the documents and where on those disks the documents can be
found. The Document Service calls a Cache Service and transfers the
documents to a cache.

Then each page can be transferred to memory and displayed.

Committal Example
The Batch Entry Service adds documents to the FileNet IMS system. Each
document starts out as a collection of images placed in a cache by a Cache
Service. The images are indexed using forms that are either customized or
supplied by the File Service. Some indices, such as the entry date for the
document, are required by the FileNet system. User-defined indices are
grouped by document class so that similar documents can have the same
indices.

Committal is the process by which:

• The documents are copied to optical disk in a storage library. For this
purpose, the Batch Entry Service calls the Document Service.

• The indices are added to an Index Service database.

12 WAL for Windows Programmer’s Reference Manual December 1996


1 Introduction
Use of Imaging System

Routing Examples
A queue is a table in a database, each row of which is a unit of work. The
columns in that row contain document IDs and other data required to process
the work.

You use queues:

• to record incoming documents as they are committed and cataloged. You


only use a queue for this purpose if you intend to process those
documents in the immediate future. This kind of queue fills up rapidly and
should empty just as rapidly.

• to route work to the correct worker or group of workers. In this case, each
queue is like an in-basket that operates on a first in–first out or prioritized
basis. Each row in a queue can be likened to an item or folder in an in-
basket on an employee’s desk.

• to route work from worker to worker. In this case, each queue is also like
an in basket that operates on a first in–first out or prioritized basis. Some
workplaces do work in much the same way that factories produce cars—
in an assembly line. The work is passed from one worker to the next.
Each worker performs a different task, and when all their tasks have been
completed, the work is considered done.

• to collect data for use in statistical reports. In this case, whenever work is
accomplished, you store data about what it was, who did it, and when it
was done. Sometimes you record how long it took to do as well. After you
make the report, you empty the queue.

• to save information for later behind-the-scenes work. Sometimes a task


needs a lot of extra processing. Rather than have the user wait, you store
the data in a queue and do the time-consuming processing (that does not
require a user) in the background or during off-hours.

December 1996 WAL for Windows Programmer’s Reference Manual 13


1 Introduction
Use of Imaging System

14 WAL for Windows Programmer’s Reference Manual December 1996


2
2Getting Started

Note This release does not include Document Entry, which is a 16-bit application.
Programmatically-controlled Document Entry applications must use the 16-bit
versions. New customers must plan for separate 16-bit stations for Document
Entry.

This manual assumes that you have the following background:

• You understand the FileNet system architecture and the basics of using
the FileNet system.

• You have experience using Microsoft C, Microsoft Windows, and the


Microsoft Windows SDK. At a minimum, you must know how to build a
simple Windows application using Microsoft Windows SDK functions.

Before using this reference manual, make sure that you have installed the
following software:

• The Microsoft C Compiler, Microsoft Windows, and the Microsoft


Windows SDK.

• The FileNet WAL for Windows. The WAL for Windows Installation Manual
leads you through the installation process.

Note WAL for Windows release 5.0 does not support long file names.

Build a FileNet WAL for Windows Application


In addition to knowing how to build a Windows application, you need to
include the following files:

• The corresponding include files in the C-language source (.C) file.

• The FileNet WAL for Windows libraries (.LIB) in the LINK statement or link
the WAL dynamic-link libraries (.DLL) at run time.

December 1996 WAL for Windows Programmer’s Reference Manual 15


2 Getting Started
Check Programming Environment

Most applications need to include the following three files before including any
other FileNet WAL include files:

#include <pcws.h> /* WAL for Windows defines */


#include <as_exter.h> /* Application Services Externals defines */
#include <filenet\limits.h> /* FileNet's limits defines */

The functions are defined in the prototype include (.I) files. There is one
prototype file (.I) that corresponds to one import library (.LIB) and one
dynamic-link library (.DLL). The .I file usually includes all the necessary
definition include files (.DEF and .H).

Check Programming Environment


The provided sample applications were compiled with the Microsoft Visual C
4.1.

To test your programming environment, you can compile and run the sample
log on application. Follow these steps:

1 Edit the log on application (the SAMPLOG.C file in the


C:\FILENET\SAMPLE\LOGON directory) to change the domain, user name,
and password to conform to your configuration.

2 Build the application. If you are using NMAKE, type the following and press
ENTER:

NMAKE SAMPLOG.MAK

The make file (SAMPLOG.MAK) accomplishes the following tasks:

a Compiles the resource script (.RC) file

b Compiles the C-language source (.C) file

c Links the source file with the run-time libraries

d Adds the resources to the executable file to build an application

3 Run the application.

December 1996 WAL for Windows Programmer’s Reference Manual 16


2 Getting Started
WAL for Windows Sample Applications

Troubleshooting
If the NMAKE file failed during the second step, check the following
possibilities:

• The execution path, LIB path, and INCLUDE path

• The compiler (CL.EXE) being used

• The Linker (LINK.EXE) being used

If the NMAKE file passes the second step and fails the third step, check the
network; you might have to reinstall WAL for Windows.

WAL for Windows Sample Applications


The WAL for Windows sample applications provide a springboard for writing
Windows applications that interface to the FileNet system.

Floating Point Application


This application demonstrates the Floating Point library with a popup
calculator.

The application is located in \filenet\sample\fp.

Date and Time Application


This application demonstrates the date and time functions by presenting the
user with a graphic time line.

The Start Date is a constant. The Current Date displays the current PC
system date.

The thumb of the scroll bar indicates the beginning of a time range. The
Difference in Days window displays the difference in days between the day
indicated by the thumb and the Current Date. To move the scroll bar thumb,
click to the right or left of the thumb or click on the left or right arrow on either
end of the scroll bar.

The application is located in \filenet\sample\dtm.

December 1996 WAL for Windows Programmer’s Reference Manual 17


2 Getting Started
WAL for Windows Sample Applications

Log On Application
This application enables you to log on and log off. It contains two menu items,
Logon! and Logoff! When you click on Logon!, a popup window appears
indicating that you are logged on. Click on OK. When you click on Logoff!, a
popup window appears indicating that you are logged off. You can select OK
or Cancel.

The user name, password, and domain in this sample application will need
modification to run on your system.

The application is located in \filenet\sample\logon.

General Application
The General application demonstrates a combination of functions, including
the IAFLIB functions.

Before using the General application, you must log on from the Log on
application. Also, once the General application has been opened, you must
select the Init option from the Init pulldown menu to enable most of the
options. This initializes a session.

The Environment option on the Init pulldown menu displays the services that
are currently selected.

The Output pulldown menu enables you to write text to the screen, erase text,
and to send text to the clipboard to exchange data with other applications.

The Display pulldown menu displays FileNet image files, documents, and
uncommitted documents. You can select various views. The file option
displays FileNet image format files from disk, such as d:\fn00000.fob.

The Annotations feature applies to the document option, but not the file
option. When there is more than one annotation, the Next and Prev options
are enabled to view the next and previous annotation.

You can print a file, a document, a single page, or get printer information from
the Print pulldown menu.

The RDD pulldown menu enables you to display document classes, index
fields, and index information.

December 1996 WAL for Windows Programmer’s Reference Manual 18


2 Getting Started
WAL for Windows Sample Applications

The Query pulldown menu enables you to search for documents using a key
and filter search. These options return a list of documents, not a full Query
Match Report.

The application is located in \filenet\sample\gen.

Image Application
The sample Image application demonstrates three ways to display a FileNet-
formatted image and one way to display a bitmap image.

The first option, DISPLIB_paint_object, displays an image using the


recommended function DISPLIB_paint_object(). This is the only method that
supports tiled images.

The second option, Paint a Bitmap File, displays a bitmap file. You can add an
interface that enables the user to select bitmap files.

The third option, DISPLIB_paint_bitmap, displays an image using a function


from a previous WAL software version. The fourth option, BitBlt, displays an
image using the Windows functions.

Try each option using the same image.

The application is located in \filenet\sample\image.

Security Application
This application demonstrates the use of the security functions. To obtain
various security information, first log on to the Security Services by pressing
F1.

You can then use the function keys or the mouse to obtain information about
user functions, system information, security information, and membership
lists.

This application also illustrates how to use SEC_renew_sec_handle(). This


function re-establishes a service session with the Security Service.

The application is located in \filenet\sample\security.

December 1996 WAL for Windows Programmer’s Reference Manual 19


2 Getting Started
WAL for Windows Sample Applications

Folders and Query Application


The FOLD2 application provides a demonstration of the Folder and QMR
functions.

The Folder pulldown menu enables you to create, delete, find, and get the
attributes of folders. Also, a move option enables you to move documents
from one folder to another.

The Find Docs pulldown menu opens a Query Match Report (QMR) window.
You can enter conditions for a document search using a Folder name, Folder
status, Document status, Key and Filter conditions.

Other Windows applications that have DDE (dynamic data exchange)


capabilities can request data from the QMR portion of this application. This
includes Windows applications with DDE capability such as MS Word and PC
WorkFlo. This application cannot send data via DDE.

The application is located in \filenet\sample\fold2.

Document Application
This application demonstrates the use of the document retrieval functions
within the IAFLIB library. The Document application has two pulldown menus:
Screen and Document.

The Screen pulldown menu enables you to display and repaint an image. You
can also clear the image and exit the application from this menu.

The Document pulldown menu provides various document operations. You


must display a document from the Screen menu before any of the options on
this menu become active.

You can delete the document. Note that this application currently implements
this function so that you can only delete documents that are not filed in a
folder.

The Get Attr option displays the attributes of the currently displayed
document.

The Update database option enables you to update the document indices.
This sample application currently updates the database with old values. You
can modify the code to update the database with new values.

December 1996 WAL for Windows Programmer’s Reference Manual 20


2 Getting Started
WAL for Windows Sample Applications

The lower half of the Document pulldown menu contains three folder options:
File Doc, Unfile Doc, and Where Filed. File Doc enables you to file a
document into a folder. You can also unfile a document. This option is enabled
only after you have located the document using Where Filed.

The application is located in \filenet\sample\document.

Security and TTY Application


This application demonstrates the use of the security functions as well as the
TTY functions. The message windows are displayed using the TTY library.

To obtain various security information, first log on to the Security Services by


pressing F1. You can then use the function keys or the mouse to obtain
information about user functions, system information, security information,
and membership lists.

The application is located in \filenet\sample\ttylib.

Local Print Application


The LPRINT sample is designed to simply print a document or a list of
documents to a local printer.

It contains three menus: Display, List, and Print. The Display menu displays a
document. The List menu enables you to view any documents that have been
queued in this application for printing. You can also reset the print list. The
Print menu prints the list of documents.

The application is located in \filenet\sample\lprint.

Commit Application
The Commit application commits a file to optical disk. This application makes
use of the BATCHLIB_BatchEntry() function, a multi-purpose BES function.

The application is located in \filenet\sample\commit.

December 1996 WAL for Windows Programmer’s Reference Manual 21


2 Getting Started
WAL for Windows Sample Applications

Auto Form Application


The Auto Form application demonstrates how to use of the following
FORMLIB library functions:

• Create a form

• Save the created form into a PC text file

• Load the form from a PC text file on a Microsoft Window

• Enable user input to the form

• Commit the form as PC Form format or FileNet image format

The application is located in \filenet\sample\form

WorkFlo Queue Application


The WorkFlo Queue application demonstrates how to use of the following
WorkFlo Queue service library functions:

• List existing workspaces

• List queues in a selected workspace

• Create and delete a queue

• Insert an entry into a queue

• List all the entries in a queue

• Move an entry form one queue to another

The application is located in \filenet\sample\WQS

Cache Services Manager Application


The Cache Services Manager (CSM) application demonstrates the use of the
CSM calls, including opening, reading, and closing a cache object, deleting a
object, modifying an object, and migrating an object from optical disk.

The application is located in \filenet\sample\CSM.

December 1996 WAL for Windows Programmer’s Reference Manual 22


2 Getting Started
WAL for Windows Sample Applications

Image Conversion Application


The IMGCONV application creates a local print list and prints it to a local
printer.

The application is located in \filenet\sample\imgconv.

Indexing Application
The FNINDEX application demonstrates how to display the default index form
and the filled in values. It also shows how to display the custom index form
(specified in LOGON.CFG) and get the filled in values.

The application is located in \filenet\sample\fnindex.

December 1996 WAL for Windows Programmer’s Reference Manual 23


2 Getting Started
WAL for Windows Sample Applications

24 WAL for Windows Programmer’s Reference Manual December 1996


3
3Data Flow Diagrams

This chapter provides data flow diagrams for the WAL functions. The data flow
diagrams:

• Illustrate the individual functions and groups of functions that are


necessary to perform an operation

• Show the order in which functions are called

• Show the various options you have in performing a particular operation

For example, a document can be displayed in three ways. See “DISPLIB”


on page 34.

• Show the most important input and output parameters of functions

For example, many times a handle is returned from an initialization


function that must be passed to each function in the function set. Many
times the output of one function is the input of another.

• Explain each diagram, to further clarify the options and to highlight any
caveats of which you should be aware.

December 1996 WAL for Windows Programmer’s Reference Manual 25


3 Data Flow Diagrams
Archive/Restore

Archive/Restore
The following diagram illustrates archive/restore data flow:

Archive/Restore Data Flow Diagram

ARCH_DocEntry() provides a high-level interface to create Archive


documents in batches of one document at a time.

REST_OpenArchive() obtains an archive handle, which does the actual


restore operation. Optionally, it returns a list of the files in the archive.

REST_GetVolName() returns the name of the volume from which an archive


was created. REST_GetDirEntry() returns the directory entry of a file in the
archive. REST_GetFileName() returns the name of a file in the archive.
REST_GetFileNames() returns a list of the files in the archive. REST_
GetArchTime() returns the time an archive was created.

REST_RestoreDoc() restores all files in the archive, with optional user


interface. REST_RestoreFile() restores specific files in the archive, with
optional user interface.

December 1996 WAL for Windows Programmer’s Reference Manual 26


3 Data Flow Diagrams
BATCHLIB

REST_CloseArchive() frees resources associated with a restore operation.

BATCHLIB
The following data flow diagram illustrates use of the BATCHLIB functions,
which provide high-level interface with the BES (Batch Entry Services)
functions. They are a simple way to perform batch entry operations without
using lower level BES functions.

BatchLib Data Flow Diagram

The BATCHLIB library of functions is on the same level as the IAFLIB


functions. They use the same client handle.

The upper branch on the left illustrates how to perform a batch entry operation
using one function, BATCHLIB_BatchEntry(). BATCHLIB_BatchEntry()
creates a batch, writes images to a batch, creates documents from images,
indexes a document, and commits the whole batch. It returns a handle to a
batch entry status structure.

BATCHLIB_commit_files() and BATCHLIB_commit_file_list() commit an array


of DOS files into a FileNet system as a single document. Each file contains a
FileNet format image. Each file will become one page of the document.

Optionally, you can use BATCHLIB_BatchAbort() to abort the batch entry in


progress. The batch is deleted.

The lower left branch shows the functions you use to verify images in the BES
cache. BATCHLIB_find_batch_images() opens the batch, returns an array of

December 1996 WAL for Windows Programmer’s Reference Manual 27


3 Data Flow Diagrams
BES (Batch Entry)

image descriptors, and closes the batch. BATCHLIB_get_batch_object()


retrieves the object from the Batch Entry Service, and places it in a file in the
PCs local cache.

The middle branch illustrates the functions that you use to verify, index, and
update a previously-created document.

The right branch illustrates the functions that you use to update batch
information and commit a batch.

BATCHLIB_find_batches() returns batch headers that match the specified


filter.

BATCHLIB_update_batch() opens the batch, updates the dynamic batch


header for the named batch, and closes the batch. This function must be
called whenever the images in a batch have been changed (usually by a BES
function).

BATCHLIB_enqueue_batch() opens the batch, enqueues the named batch in


the selected queue, and closes the batch. The system commits the batch
later, when the processor is available.

BES (Batch Entry)


The following data flow diagram illustrates use of the BES functions. These
functions provide a low-level interface to the Batch Entry Services.

Note The Batch Entry Services (BES) library contains additional optional functions,
explained at the end of this section.

December 1996 WAL for Windows Programmer’s Reference Manual 28


3 Data Flow Diagrams
BES (Batch Entry)

BES (Batch Entry) Data Flow Diagram I

BES_logon() establishes a Batch Entry Service session. It returns a pointer to


the session number.

The next block of functions, common to all BES operations, is required to


create a batch.

BES_alloc_batch_name() generates a unique batch name. The user can


input a name or the system can generate a name to guarantee that it is
unique. BES_alloc_ids() acquires a block of unique contiguous integers for

December 1996 WAL for Windows Programmer’s Reference Manual 29


3 Data Flow Diagrams
BES (Batch Entry)

document ID’s. After you have called BES_alloc_batch_name() and BES_


alloc_ids(), you can now create a batch. BES_create_batch() creates a batch
with the specified name.

The first three functions (BES_alloc_batch_name(), BES_alloc_ids(), and


BES_create_batch()) must be called before any other batch operations can
take place. If they have already been called by another routine, you can use
BES_find_batches() and BES_open_batch() to find the created batch and
open it.

The functions listed in the first branch of BES Data Flow Diagram I pass data
to and from the remote cache. These functions are explained more in the
“CAM (Cache Manager) Data Flow Diagram” on page 33.

The functions listed in the second branch manage and assemble documents.
BES_create_doc() creates a document from images and indices. BES_
query_index_dir() retrieves the directory of indices associated with the
specified batch. BES_update_doc() updates the document indexing
information. BES_delete_doc() deletes a document. BES_find_docs() finds
one or more document descriptors.

The functions of branch three on the right-hand side allow you to manage and
commit batches. These functions are further explained by “BES (Batch Entry)
Data Flow Diagram III” on page 32.

December 1996 WAL for Windows Programmer’s Reference Manual 30


3 Data Flow Diagrams
BES (Batch Entry)

BES (Batch Entry) Data Flow Diagram II

The functions in the left branch write a local file that contains one page image
into the BES cache. BES_create_image() opens the transaction and sets the
image attributes (e.g., allocates space). BES_write_image() writes the image
data into BES.

The functions in the middle branch can be used to verify the images in BES
cache. BES_open_image() opens an image for read. BES_read_image() or
BES_read_whole_image() copies the image data into a local file. You can use
the DISPLIB functions to display the image for verification. BES_verify_
image() sets the verify status of the image.

The functions in the right branch allow you to update the image. BES_update_
image() updates the image attributes. BES_write_image() writes the new
image data into BES. BES_move_image() moves an unassembled image
from one batch to another batch. BES_delete_image() deletes an
unassembled image.

The three functions shown at the bottom of the diagram allow you to close a
transaction. Normally, you use BES_close_image() to update the BES status.
BES_abort_image() allows you to cancel what you have done in the opened

December 1996 WAL for Windows Programmer’s Reference Manual 31


3 Data Flow Diagrams
BES (Batch Entry)

transaction. BES_close_csum_image() closes a checksummed image


transaction.

BES (Batch Entry) Data Flow Diagram III

Normally, batches are opened by BES_open_batch(). If the batch has been


enqueued into the committal queue, you must use BES_dequeue_batch() to
take the batch out of the committal queue and open the batch for update.

The functions in the left branch update the batch. The functions on the right
commit the batch. BES_enqueue_batch() places a previously-opened batch
into the specified queue, typically to enqueue a batch for committal. BES_
commit_batch_now() and BES_sync_commit() commit a batch
synchronously. Control returns to the user after the batch is committed.

The additional functions can be separated into the following three groups:

Functions Description
BES_create_image_index() Used for internal indexing, not for
BES_delete_image_index() document indexing. Used to store and
BES_get_image_index() control information passed to an image.
BES_modify_image_index() Could be used to control information
passed back from a scanner. After a batch
is committed, this information is deleted.
They are optional.

December 1996 WAL for Windows Programmer’s Reference Manual 32


3 Data Flow Diagrams
CAM

BES_get_info() Manage the additional information for a


BES_put_info() batch, a document, an image, or an index
value. This additional information is not
required by the BES on a FileNet server.
BES_get_num_cluster_id() Translate the FP_number cluster key or
BES_get_str_cluster_id() LPSTR type cluster key into a cluster ID.

CAM
The following data flow diagram illustrates use of the local cache
manager (CAM) functions. These functions manage the local cache.

CAM (Cache Manager) Data Flow Diagram

Local cache can be a RAM drive or any drive and directory on your PC. An
entry in the LOGON.CFG file specifies this location. For example:

December 1996 WAL for Windows Programmer’s Reference Manual 33


3 Data Flow Diagrams
DISPLIB

[PCWS]Primary Cache = d:\

When you retrieve an image, it is placed in the local cache.

Use CAM_init() once in an application to increment an internal client count


that CAM functions use to determine whether temporary files in the cache
should be deleted. If the cache is full and an object needs to be added into the
cache, CAM service uses the least-recently used (LRU) algorithm to
determine which object to delete.

CAM_add_file() writes a retrieved object to a file in the cache. If you use


CAM_add_file() to write the retrieved object one part at a time, you should use
CAM_set_attr() to set the attributes of the object to indicate the current status
of the object. This prevents other applications from treating the file as if it
contained the whole object.

When an image is retrieved from a server by IAFLIB_get_object(), the


checksum of the image, if it exists, will be saved in the local cache as the
CAM_attr_csum() attribute. You can use CAM_get_attr() to get the value of
the checksum to compare it with the locally computed checksum.

If you need to use the CAM_add_file() function with WorkForce Desktop


applications, you must input a real ssn value instead of a local ssn or invalid
ssn. This allows the Image Display application to recognize the object in the
local cache.

CAM_find_file() checks to see if the compressed image file for the specified
document ID and page number exists in the cache. If so, it returns the file
name of the temporary file in which it is stored. CAM_get_attr() returns
attribute information for the cache object.

CAM_delete_file() deletes a cache object. Use this function frequently to


reduce the use of the LRU deleting algorithm by the CAM service.

CAM_exit() deletes all temporary files in the cache. Call this function once
when ending a Windows application that uses CAM functions.

DISPLIB
DispLib Data Flow Diagrams I and II illustrate the use of DISPLIB (Display)
functions.

December 1996 WAL for Windows Programmer’s Reference Manual 34


3 Data Flow Diagrams
DISPLIB

DispLib Data Flow Diagram I

DispLib Data Flow Diagram I illustrates the recommended way to display an


image and an easy way to display, stretch, and rotate a bitmap. The functions
in the left branch use DISPLIB_paint_object() to display the image. The
functions in the right branch use DISPLIB_stretch_bitmap() to display the
bitmap.

DISPLIB_init_handle() returns a DISPLIB handle used by all other DISPLIB


functions. IAFLIB_get_object() retrieves images, locating images in the
following order: CAM, page cache, then optical disk. IAFLIB_get_object()
returns a filename.

If your application displays an image more than once, register the object
before you call DISPLIB_paint_object(). Then, free the object when you have
displayed the image. This way, the application does not have to take the time
to register and free the object each time it displays.

December 1996 WAL for Windows Programmer’s Reference Manual 35


3 Data Flow Diagrams
DISPLIB

When you don’t explicitly register an object, DISPLIB_paint_object() registers


and frees the object itself. The following illustration shows a loop that retrieves
and displays multiple images within one DISPLIB session. This is a simple
version of the left branch of the previous illustration.

Optional functions in this branch include:

DISPLIB_set_retrieval() is for displaying P-code image format with a


background image such as a COLD document. This function is for backward
compatibility only.

DISPLIB_yield_typ() allows the user to interrupt the application while painting


an image. This function is used for images that are displayed band by band.
The user can exit the display if the image is not the correct one.

December 1996 WAL for Windows Programmer’s Reference Manual 36


3 Data Flow Diagrams
DISPLIB

DispLib Data Flow Diagram II

DispLib Data Flow Diagram II illustrates two more ways to display an image.
We recommend using DISPLIB_paint_object() as shown in DispLib Data Flow
Diagram I. The path in DispLib Data Flow Diagram II is provided as a
compatible method for previously written WAL applications.

This method of image display loops to get and display bands until the image is
painted. You can use Windows functions (SelectObject(), BitBlt(), and
DeleteObject()) or DISPLIB_paint_bitmap(). DISPLIB_close_object() closes
any FileNet banded image file opened by DISPLIB_get_band_bitmap().

Finally, DISPLIB_free_handle() returns memory allocated for the DISPLIB


context handle obtained from a prior call to DISPLIB_init_handle().

December 1996 WAL for Windows Programmer’s Reference Manual 37


3 Data Flow Diagrams
FILLIN

FILLIN

FILLIN Data Flow Diagram

The FILLIN functions allow a user to fill in, index, print, and commit a form.

Before you call FILLIN_get_form_name(), call an initialization function


(FORM_init(), RDD_init(), etc.). FILLIN_get_form_name() gets a filename and
a form name from a user.

FORM_load_object() loads an object defined in the specified file and returns


a handle to the object.

Next, pass a pointer to an existing form to FILLIN_do_form(). This displays the


specified form, allowing the user to fill it in. The user presses the specified
terminator key to execute the form.

December 1996 WAL for Windows Programmer’s Reference Manual 38


3 Data Flow Diagrams
FILLIN

To commit the form, use FILLIN_get_doc_class() to get the name of a


document class from the user. Next, call FILLIN_index() so the filled-in form
can be indexed. To commit the form as a FileNet PC Form image, call FILLIN_
commit() or FILLIN_bkg_commit(). To commit the form as a FileNet Group III
banded image, call FILLIN_commit_image() or FILLIN_bkg_commit_image().
The FILLIN_bkg_commit() and FILLIN_bkg_commit_image() functions are
recommended because they return control to the user faster than FILLIN_
commit() and FILLIN_commit_image().

The FILLIN_server_print() and FILLIN_local_print() functions give your users


the option to print. Each function displays print softkeys. FILLIN_server_print()
prints remotely via Print Services to a FileNet printer. FILLIN_local_print()
prints to the local printer connected to the PC.

Post-processing includes FORM_exit() or another exit routine.

December 1996 WAL for Windows Programmer’s Reference Manual 39


3 Data Flow Diagrams
FN Index

FN Index

FN Index Data Flow Diagram

The FN index functions allow a user to index a document using a system


index form or a custom form, verify index values, clear the values from an
index form, and save a custom index form.

The first function, FN_index_form_init() allocates and initializes data for the
index form. It returns a data handle to the index form.

The next function, FN_index_text_to_handle() converts a text-formatted string


of index descriptions into a form suitable for input to FN_show_index_form()
or FN_custom_index_form(). This function makes input to the index functions
easier by simply creating a text string instead of filling in complex structures.
This step is optional.

December 1996 WAL for Windows Programmer’s Reference Manual 40


3 Data Flow Diagrams
FN Index

Next, the index form is displayed. You can use FN_show_index_form() to


display the system index form or you can display your own custom indexing
form using FN_custom_index_form().

FN_index_handle_to_text() converts a data handle returned from FN_show_


index_form() or FN_custom_index_form() to a text-formatted string of index
descriptions.

FN_index_verify() is an optional function that displays an indexing window to


let a user compare the original index values to those just entered in index
verification.

FN_show_new_values_in_form() dynamically updates the index values in a


displayed form. The form is usually displayed by FN_show_index_form() or
FN_custom_index_from().

FN_clear_index_form() is another optional function that clears field values in


an index window.

Finally, FN_index_form_exit() frees all resources allocated to the index form.

The function shown at the bottom of the flow diagram, FN_index_form(), is


provided for compatibility with previously written WAL for Windows
applications. This function collects and validates indexing information for a
document to be created by displaying an indexing form window.

FN_save_index_form() is used to save a custom indexing form. This function


saves an indexing form to an ASCII file with a .FRM file extension. You can
edit this file with an ASCII editor.

December 1996 WAL for Windows Programmer’s Reference Manual 41


3 Data Flow Diagrams
FNP

FNP

FNP (Local Print) Data Flow Diagram

This data flow diagram illustrates the use of the local print (FNP) functions.
For remote printing, see “IAFLIB Print (Remote)” on page 60.

FNP_init() allocates enough memory for an FNP_data data structure and fills
it with the corresponding information. For local printing, this function should be
called once by each application.

After initializing the data structure, you can print from three functions. FNP_
print() prints a list of documents. FNP_print_from_file() prints a document
page by specifying a filename (FileNet formatted), usually a CAM file. FNP_
print_form_page() prints a form page. Finally, FNP_exit() frees all resources
that were requested by FNPRINT. Call once before the application terminates.

December 1996 WAL for Windows Programmer’s Reference Manual 42


3 Data Flow Diagrams
FORM

FORM

FORM (Form Library) Data Flow Diagram I

This data flow diagram illustrates the use of the form library (FORM)
functions. This section presents the FORM functions in the following three
areas: Create Form, Execute Form, and Store Form.

Use FORM_init() to initialize the FORM library and use FORM_exit() to free
the resources used by the FORM library.

We recommend that you use the AutoForm System Development Kit (SDK) to
create forms and store them as form files.

The Create Form section explains how to:

• Create form objects and form fields

• Operate on a form’s character map

The Execute Form section explains how to:

• Display a form for fill-in

• Use validation rules, validation functions, and validation tables to check


the form and field values

December 1996 WAL for Windows Programmer’s Reference Manual 43


3 Data Flow Diagrams
Create Form

The Store Form section explains how to:

• Store a form (ASCII file) on the PC local disk, PC LAN server, or FileNet
system root server

• Commit a filled-in form to the FileNet system

• Load a form file or committed form page to memory

• Manipulate form files

Create Form

Create Form Diagram

The Create Form Diagram illustrates how the Create Form function creates or
modifies form objects and form fields. You can save a form in memory to a
form file. You can display a form that resides in memory by executing a form.
To execute a form from a file, load the form into memory, then call the execute
form functions.

December 1996 WAL for Windows Programmer’s Reference Manual 44


3 Data Flow Diagrams
Create Form

FORM File

The FORM File diagram illustrates how a form file can contain many form
objects. Form objects are forms, menubars, menus, and validation tables. For
performance reasons, we recommend that you create only one form per form
file.

To create a form using FORM functions, follow these steps:

1 Use FORM_create_object() to create an object of object type FORM_OT_


FORM.

2 Use FORM_set_object_attr() to set a single form attribute. Make this call once
for each form attribute you want to assign.

3 Use FORM_create_field() to create a single field. Make this call once for each
field you want to appear on the form.

4 Use FORM_set_field_attr() to set a single field attribute. Make this call once for
each field attribute you want to assign.

Use the form character map to write text and paint background images.

December 1996 WAL for Windows Programmer’s Reference Manual 45


3 Data Flow Diagrams
Create Form

Object Maintenance

FORM (Form Library) Data Flow Diagram II

Use FORM_create_object() to create a form, a menubar, a menu, or a


validation table with default attributes. You use FORM_set_object_attr() to
change the object attribute. Use FORM_close_object() to free the resources
associated with the object.

Use FORM_load_object() to load objects into a FORM session for


modification and execution. Use FORM_close_volatile_object() to close the
objects that were loaded during form execution.

Form Fields
A form can contain a menubar, a character map, menus, and form fields.
Because FORM_create_object() creates a form with default attributes, you
might find that the default form fields are adequate for a simple form.

There are two types of form fields: input fields and display fields.

• A user can use input fields or you can use FORM_set_field_attr() to


correct input during form execution. Input field types are string, number,
integer, date, time, document, folder, menu, listbox, combobox, checkbox,
button, radio button, vertical scrollbar, horizontal scrollbar, and signature.

• Use display fields to display objects in the background. Users cannot


interact with a display field. Display field types are rectangle, round
rectangle, line, ellipse, pattern, bitmap, text, and group box.

Use the following functions to create and maintain form fields:

FORM_create_field()
FORM_clear_field_value()
FORM_default_field_value()
FORM_delete_field()
FORM_enable_fields()

December 1996 WAL for Windows Programmer’s Reference Manual 46


3 Data Flow Diagrams
Create Form

FORM_get_bitmap_handle()
FORM_get_field_attr()
FORM_get_field_attr_using_ord()
FORM_get_field_count()
FORM_get_field_info()
FORM_get_field_name()
FORM_get_last_field()
FORM_make_groups_contiguous()
FORM_set_field_attr()
FORM_set_field_attr_using_ord()

The following two functions change all input field values in a form:

FORM_clear_form_values()
FORM_default_form_values()

The following functions create and maintain the contents of comboboxes and
listboxes:

FORM_append_item()
FORM_box_add_item()
FORM_box_delete()
FORM_box_directory()
FORM_box_find_item()
FORM_box_get_count()
FORM_box_get_sel()
FORM_box_get_sel_count()
FORM_box_get_text()
FORM_box_get_text_len()
FORM_box_match_item()
FORM_box_select_list()
FORM_box_set_default()
FORM_box_set_sel()
FORM_install_list()

Character Map Functions


Use the form character map to display background text and images. When
you use FORM_create_object() to create a form, the default values are 25
rows by 80 columns. To change the values, call FORM_set_object_attr().

December 1996 WAL for Windows Programmer’s Reference Manual 47


3 Data Flow Diagrams
Create Form

The FORM library provides the following character map functions:

FORM_text_out() writes background text to the character map.

FORM_get_row_text() retrieves background text.

FORM_clear() clears a background area.

Menu, Menubar, and Validation Table Functions


After FORM_create_object() returns the object handle, you can use the
following functions to create and maintain the contents of the object (menu,
menubar, or validation table):

FORM_get_menubar_items()
FORM_set_menubar_items()

FORM_change_menu_item()
FORM_get_menu_items()
FORM_set_menu_items()

FORM_get_valtable_items()
FORM_set_valtable_items()

Execute Form
A form is not visible to the user until you execute it. The form execution stages
include:

1 Display the form. You can display a form in many ways. For example, you can
display it as hidden, grayed, minimized, or maximized. To display a form for
fill-in, use:

FORM_do_form()
FORM_enable_form_window()
FORM_execute_form()
FORM_show_form()
FORM_step_form()

2 Update the form. A user can fill in form fields or you can use FORM_set_field_
attr() to update them. You can change menus and menubars during execution.

3 Terminate execution. Terminate a form with execute or cancel. Form-execute


updates all form fields. Form-cancel cancels all form field changes.

December 1996 WAL for Windows Programmer’s Reference Manual 48


3 Data Flow Diagrams
Create Form

Execute a form with any of the following methods:

• Select the Execute command from the form menu.

• Press SHIFT and ENTER.

• Select a softkey not defined as an escape.

• Select a menubar menu item not defined as an escape.

• Click a pushbutton not defined as an escape.

Cancel a form with any of the following methods:

• Call FORM_escape_form().

• Select the Cancel command from the form menu.

• Press the Escape key.

• Select a softkey defined as an escape.

• Select a menubar menu item defined as an escape.

• Click a pushbutton defined as an escape.

• Double click on a double click-defined field.

• Press ALT and F4.

• Close the window.

• Press CTRL and ESC.

• Press SHIFT and ESC.

FORM_step_form() can only be executed modally. You can execute FORM_


do_form() and FORM_execute_form() modally or modelessly.

After a user terminates a form, the function returns a terminator to indicate the
state of the execution. For modal form execution, the function returns the
terminator from the last parameter of the function. For modeless form
execution, use FORM_get_terminator() to retrieve the terminator value.

December 1996 WAL for Windows Programmer’s Reference Manual 49


3 Data Flow Diagrams
Create Form

Form and Field Validation Checking


You use form and field validation to restrict the fill-in values to a specific range.
You can use validation rules or a validation function to evaluate a form or a
form field. String type form fields can also be evaluated by a validation table.

Form validation is evaluated before the form is terminated by execute form. If


validation fails, the form is not terminated. An error is returned. You can also
use FORM_validate_form() to validate a form any time during the form
execution.

Field validation is evaluated before the field is updated. If validation fails, the
cursor remains in the current field. An error is returned.

Use FORM_bind_val_func() to bind a validation function to a form or a form


field.

Use the following functions to create and maintain validation rules:

FORM_add_named_rule()
FORM_add_rule()
FORM_check_syntax()
FORM_evaluate()

Store Form
A form is stored as an ASCII file on a FileNet system root server, a PC’s local
disk, or a PC LAN server.

You can store an unlimited number of form objects in a form file. For
performance reasons, we recommend that you store one form per file.

Each FileNet system has a remote file service. A remote file service allows
you to store and retrieve forms files on a FileNet server.

When storing form files to or retrieving form files from a FileNet server, you
can specify the form filename or a path and a form filename. When you
specify a filename only, the FileNet system uses the FN search path defined
in the LOGON.CFG file. When you specify a path and filename, the FileNet
system searches the specified path beneath the FN search path.

In the forms search path, FN can stand for the /fnsw/local/fs/FileNet/forms


directory on a Series 6000 system or any path that you specify in the
LOGON.CFG file.

December 1996 WAL for Windows Programmer’s Reference Manual 50


3 Data Flow Diagrams
IAFLIB.I Management

Use the following functions to search for form files:

FORM_find_file()
FORM_find_file_in_path()
FORM_get_file_list()

Use the following functions to manipulate form files in a FileNet system root
server:

FORM_get_file_service()
FORM_server_copy_file()
FORM_server_delete_file()
FORM_server_rename_file()
FORM_server_retrieve_file()
FORM_server_save_file()
FORM_set_file_service()

Before you execute a form that is stored as a file or committed to the FileNet
system, you must use the following functions to load a form from file or from a
committed form page into memory:

FORM_load_file()
FORM_load_form_from_page()
FORM_load_object()

Use the following functions to save a form file or a form/image page in


memory to disk:

FORM_generate_fill_in_page()
FORM_generate_form_file()
FORM_generate_image_page()
FORM_generate_one_form_file()
FORM_gererate_pcode_file()

IAFLIB.I Management
IAFLIB.I can be separated into the following eight sections:

IAFLIB_SECURITY IAFLIB_ANNOTATION
IAFLIB_CACHE IAFLIB_FOLDER
IAFLIB_INDEX IAFLIB_DISPLAY
IAFLIB_PRINT IAFLIB_OCR

December 1996 WAL for Windows Programmer’s Reference Manual 51


3 Data Flow Diagrams
IAFLIB.I Management

IAFLIB.I is a large file. It uses many define statements to separate sections so


that the compilation does not waste heap space. IAFLIB.I uses #define
statements to separate the file into eight sections. You include IAFLIB
sections by specifying the sections to include or the sections to exclude.

To specify sections to include, you define IAFLIB_SELECT and define the


sections you want to include. For example, the following statements include
the IAFLIB_CACHE and IAFLIB_INDEX sections only:

#define IAFLIB_SELECT
#define IAFLIB_CACHE
#define IAFLIB_INDEX
#include <IAFLIB.I>

To specify the sections to exclude, you define the sections that you want to
exclude, then include iaflib.i. For example, the following statements exclude
the IAFLIB_OCR and IAFLIB_DISPLAY sections:

#define IAFLIB_NOOCR
#define IAFLIB_NODISPLAY
#include <IAFLIB.I>

The IAFLIB_SECURITY section contains the log on functions for log on. The
rest of the functions are security functions. We recommend that, rather than
use the rest of these security functions, you use the SECLIB functions
whenever applicable.

The IAFLIB_CACHE section contains the functions that move objects


between the PC local cache, Remote logical caches, and the OSAR library.

The IAFLIB_INDEX section contains the functions that query the index
database and modify the indexing record (including delete).

The IAFLIB_PRINT section contains the functions that print a document to a


remote printer (controlled by the FileNet Print Service).

The IAFLIB_ANNOTATION contains the functions that create, retrieve, and


modify a document annotation.

The IAFLIB_FOLDER section contains the functions that manage the folders.

The IAFLIB_DISPLAY section contains the functions that display a FileNet


document in Microsoft Windows. It is provided as backward support for the
previously written WAL for Windows applications. New applications should
use the DISPLIB functions.

December 1996 WAL for Windows Programmer’s Reference Manual 52


3 Data Flow Diagrams
IAFLIB.I Management

The IAFLIB_OCR section contains the functions that are not supported.
Always exclude this section from IAFLIB.I for a WAL for Windows application.

Note The following IAFLIB functions are no longer supported:

IAFLIB_get_band_bitmap()
IAFLIB_close_image_file()
IAFLIB_paint_image()
IAFLIB_paint_bitmap()

Use the following DISPLIB functions instead:

DISPLIB_get_band_bitmap()
DISPLIB_close_object()
DISPLIB_paint_object()
DISPLIB_paint_bitmap()

December 1996 WAL for Windows Programmer’s Reference Manual 53


3 Data Flow Diagrams
IAFLIB Cache Management

IAFLIB Cache Management


This data flow diagram illustrates use of functions that manage the images in
remote cache.

IAFLIB Cache Management Data Flow Diagram

IAFLIB_create_cache_object() creates a cache object with the specified


attributes. IAFLIB_get_cache_object_attrs() retrieves the object attributes
from the specified Cache Service and returns them. IAFLIB_move_cache_
object() copies or moves a cache object to the specified cache, to an object
identified by object_desc. IAFLIB_resize_cache_object() allows the client to
modify the max_length attribute of an object. IAFLIB_delete_cache_object()
deletes an object from the cache. The object must not currently be opened by
another client.

The lower half of the diagram illustrates how data flows between the PC,
remote cache, and the optical disk.

December 1996 WAL for Windows Programmer’s Reference Manual 54


3 Data Flow Diagrams
IAFLIB Document Retrieval

IAFLIB_put_object() writes the data to the cache object, which must already
exist, or updates the object’s attributes, or both.

IAFLIB_migrate_to_optical_disk() migrates a committed document from


remote cache to optical disk.

IAFLIB_get_object() retrieves an object and places it in a file in the PC’s local


cache. It returns the name of the file containing the object in filename.

IAFLIB Document Retrieval


The following data flow diagram illustrates use of the Document Retrieval
functions.

IAFLIB Document Retrieval Data Flow Diagram

December 1996 WAL for Windows Programmer’s Reference Manual 55


3 Data Flow Diagrams
IAFLIB Document Retrieval

The main function used to initiate a query is IAFLIB_query_db(). This function


returns an array of DIR_h structures. IAFLIB_query_db() performs an Index
Database Query. Use IAFLIB_continue_query() to retrieve further matches
from the same query specification.

If a query or query continuation is in progress, IAFLIB_terminate_query()


interrupts it. Otherwise, if an incomplete query has been made for the client,
IAFLIB_terminate_query() terminates it, which frees up resources on the
Index server and closes the INX connection.

After the query, pass the array of DIR_h to Query Match Report (QMR)
functions to view the query data. Having viewed the document information,
documents can be selected. Pass the selected document ID (doc_id) to the
following sets of functions for further processing.

The function branch on the far left illustrates functions to use to display the
image. IAFLIB_prefetch() is an optional function for prefetching documents.
Your application might benefit from prefetching documents from optical disk to
remote cache. For example, your application can pass a range of document
ID’s to the IAFLIB_prefetch() function to be prefetched at night to be ready the
next day. IAFLIB_get_object() retrieves an object and places it in a file in the
PC’s local cache. It returns the name of the file containing the object in
filename.

The second branch from the left illustrates how to get document attributes. If
you want more information about a document, call IAFLIB_get_doc_attr().
IAFLIB_get_doc_attr() returns a handle to a DOC_doc_location_desc_typ()
structure for the specified document.

The third branch from the left illustrates how to:

• Detect whether a document has annotations

• Get annotations for a document

• Place new annotations on a document

• Modify existing annotations

• Delete annotations

IAFLIB_is_annotated() returns a flag indicating whether there is an annotation


on any page of the specified document. IAFLIB_get_annotations() returns a
handle to all the annotations for the specified page of a document. IAFLIB_
put_annotation() creates or modifies an annotation. It associates a new

December 1996 WAL for Windows Programmer’s Reference Manual 56


3 Data Flow Diagrams
IAFLIB Folders

annotation with a page of an existing document. Modifying an annotation


replaces an existing annotation with a new one. IAFLIB_delete_annotation()
deletes an existing annotation.

The branch on the far right of the illustration defines how to update document
index information. IAFLIB_get_single_DIR() performs a high-performance,
non-interruptible query. It returns a single document index record retrieving it
by its ID number. Given a Document Index Record (DIR) pointer and an index
ID, IAFLIB_find_index_in_DIR() returns a pointer to the value of the index in
the DIR if the index is present. This function provides an easy way to use or
change an index value via the returned pointer. IAFLIB_update_db() closes a
document, changes the index values of an existing document index record, or
both.

IAFLIB Folders
The following data flow diagram illustrates the use of the folder functions.

IAFLIB_create_folder() creates a new folder.

IAFLIB_file_doc() files a document into or unfiles (removes) a document from


a folder, depending on the value of file_flag. IAFLIB_file_doc_after() files an
array of documents into a folder following a specified document ID.

IAFLIB_find_folders() returns folder descriptors for folders matching the folder


specification. IAFLIB_get_folder_attrs() retrieves the attributes of a folder.
IAFLIB_move_folder() moves or copies a folder subtree from one parent to
another. IAFLIB_update_folder() can change the attributes of an existing
folder, close a folder, or both.

December 1996 WAL for Windows Programmer’s Reference Manual 57


3 Data Flow Diagrams
IAFLIB Folders

IAFLIB Folders Data Flow Diagram

Note Use folder_name to specify a specific file name. You can use wildcard
characters (* and ?) for matches in folder specification.

IAFLIB_get_docs_in_folder() returns a handle for an array of document IDs


that are filed in a specified folder. IAFLIB_reorder_folder() reorders
documents in a specified folder. IAFLIB_where_filed() returns an array of FN_
folnum_typ folder ID’s that contain the given document (doc_id).

IAFLIB_unfile_docs() unfiles a list of documents from a specified folder. If you


have FileNet system software Series 6000 3.0 or later, we recommend that
you use IAFLIB_unfile_docs() instead of IAFLIB_file_doc().

58 WAL for Windows Programmer’s Reference Manual December 1996


3 Data Flow Diagrams
IAFLIB Logon

IAFLIB_delete_folders() removes folders from the database.

IAFLIB Logon
The following data flow diagram illustrates the functions that are used to log
on and off of the FileNet system.

IAFLIB Logon Data Flow Diagram

The functions on the left show the logical flow of a log on application.The
functions on the right show the logical flow of an application using IAFLIB.

RDD_set_handle() registers a LOGON task with RDD. WinExec() spawns


base applications. In this case, it spawns the Logon Transport Services
application (LTS.EXE). This step is required to make a network connection.
These first three functions are required by a log on application.

ServiceNameDefaults() retrieves a Clearinghouse Default Service Descriptor


record from domain, unless domain is NULL, in which case the default domain
is used. IAFLIB_logon_user() validates the name and password by logging on
and off on the Security Service associated with IMS.

December 1996 WAL for Windows Programmer’s Reference Manual 59


3 Data Flow Diagrams
IAFLIB Print (Remote)

See the log on sample application for code that demonstrates the use of these
functions.

After you log on, LTS.EXE runs in the background. The log on application
yields to other applications. In the application path, you should use IAFLIB_
get_user_name() to check whether the user has logged on to the FileNet
system. IAFLIB_get_client_handle() allocates resources on behalf of a client
and returns a handle. This handle must be passed to most IAFLIB functions.

IAFLIB_free_client_handle() logs off all service sessions established for the


client and frees all resources allocated for the client. On return, the client
handle is no longer valid.

To log off, follow these steps:

1 Broadcast a shutdown message. For example:

msg = RegisterWindowMessage ((LPSTR)FN_LOGOFF_MSG_NAME);

SendMessage(-1,msg,NULL,0L);

2 Shutdown the LTS background application. For example:

if (rdd_handle = RDD_get_handle((LPSTR)”LTS”)) PostMessage(rdd_


handle,WM_CLOSE,0,0L);

3 Call IAFLIB_logon_user() again using NULL parameters.

IAFLIB Print (Remote)


The following data flow diagram illustrates the functions that are used to print
to remote printers.

The top left box in the flowchart includes two functions that get printer
information. On a large system, this type of information enables the routing of
print jobs to less-used printers so that printers do not become overloaded.

60 WAL for Windows Programmer’s Reference Manual December 1996


3 Data Flow Diagrams
IAFLIB Print (Remote)

IAFLIB Print (Remote) Data Flow Diagram

IAFLIB_get_printer_info() gets a list of printers for the specified Print Service,


and retrieves attribute information about these printers. These attributes
describe the capabilities of each of the printers under the service’s control.

IAFLIB_get_print_service_info() returns information about the status of a Print


Service along with information about the status of the individual printer and
fax machines this Print Service is controlling.

The print function you use depends on the type of file you want to print.
IAFLIB_print_files() prints the contents of a DOS file containing standard
ASCII text. It prints one file per call. IAFLIB_print_docs() submits a request to
print documents or uncommitted images.

Each of these functions returns a unique request ID. This request ID must be
specified when you modify or cancel a print request.

IAFLIB_get_print_queues() retrieves information about zero or more print


requests presently known to Print Services. This function is used to monitor
the status of print requests.

IAFLIB_modify_print() modifies print options of a print request and IAFLIB_


cancel_print() cancels print requests submitted earlier.

December 1996 WAL for Windows Programmer’s Reference Manual 61


3 Data Flow Diagrams
QMR (Query Match Report)

QMR (Query Match Report)


The following data flow diagram illustrates use of the query functions.

QMR (Query Match Report) Data Flow Diagram

The branch on the right calls one function, QMR_query(). QMR_query() is an


all-in-one call that performs a query, optionally displays QMR, and returns a
list of selected document ID’s. This function returns the data in ASCII strings
separated by tabs for DDE (Dynamic Data Exchange) with other DDE
programs such as Microsoft Excel and Word.

The branch on the left uses the IAFLIB query functions to perform the query.
The function used to initiate a query is IAFLIB_query_db(). This function
returns an array of DIR_h structures. IAFLIB_query_db() performs an Index
Database Query. Use IAFLIB_continue_query() to retrieve further matches
from the same query specification.

62 WAL for Windows Programmer’s Reference Manual December 1996


3 Data Flow Diagrams
RDD (Retrieval Data Dictionary)

QMR_select_match() invokes the Query Match Report window, which


displays the results of a query against the Index Database and allows the user
to select one or more of the documents.

QMR_format_report() formats the index data from document index records


into an ASCII text file suitable for displaying or printing.

If a query or query continuation is in progress, IAFLIB_terminate_query()


interrupts it. Otherwise, if an incomplete query has been made for the client,
IAFLIB_terminate_query() terminates it, which frees up resources on the
Index server and closes the INX connection.

RDD (Retrieval Data Dictionary)


The following data flow diagram illustrates the use of the RDD functions.
These functions provide access to the FileNet Retrieval Data Dictionary. The
Retrieval Data Dictionary stores most of the system required information.

An application can download this information from the Index Server by calling
RDD_init(), which loads the information into a local cache and returns a RDD
handle.

The functions in the branch on the far left get the names of document classes,
indexes, key indexes, and menu items. RDD_get_dclasses() returns a count
of document classes and a handle to an array of document class names.
RDD_get_valid_ixs() returns a handle to an array of index names. RDD_get_
valid_keyixs() returns a handle to an array of key indexnames. RDD_get_
menuitems() returns a handle to an array of menu item strings.

The functions in the middle branch get description information. RDD_get_


dclass_info() returns a handle to a memory buffer containing a document
class descriptor for the document class specified. RDD_get_ix_info() returns
an index descriptor for the index specified. RDD_get_key_info() returns a key
descriptor for the key index specified. RDD_get_menuitem_info() returns a
menu item descriptor for the menu item specified.

December 1996 WAL for Windows Programmer’s Reference Manual 63


3 Data Flow Diagrams
RDD (Retrieval Data Dictionary)

RDD (Retrieval Data Dictionary) Data Flow Diagram

The functions in the branch on the far right check the validity of indices and
key indices. RDD_is_field_valid() returns an index field descriptor if the
specified index is a valid index for one or more of the document classes listed
in the input. RDD_is_key_valid() returns index field descriptor if the specified
index is a valid key index for one or more of the document classes listed in the
input.

RDD_exit() performs cleanup.

The two functions at the bottom of the flow diagram allow you to use the RDD
memory area for purposes other than containing the Retrieval Data
Dictionary. These functions have nothing to do with the Retrieval Data
Dictionary but they take advantage of RDD memory.

64 WAL for Windows Programmer’s Reference Manual December 1996


3 Data Flow Diagrams
SEC (Security)

RDD_set_handle() registers a handle with RDD, so other modules can get it


efficiently using RDD_get_handle(). RDD_get_handle() returns the handle
requested (a handle previously registered with RDD_set_handle()).

SEC (Security)
The following data flow diagram illustrates the use of the security functions
which provide an interface to the security database and Security Service. This
library enhances the security features of the IAFLIB library.

SEC (Security) Data Flow Diagram

SECMAN_get_sec_handle() and SEC_logon() establish a service log on with


the Security Service. If needed, SECMAN_renew_sec_handle() and SEC_
renew() re-establish a service session with the Security Service.

SECMAN_get_sec_handle(), SECMAN_renew_sec_handle(), and


SECMAN_free_sec_handle() more efficiently manage multiple sessions of
security service log ons. We recommend that you use these functions instead
of the SEC_logon(), SEC_logoff(), and SEC_renew() functions. See
“Appendix A–IMS Security Services and WAL” on page 1251 for more
information.

December 1996 WAL for Windows Programmer’s Reference Manual 65


3 Data Flow Diagrams
TTY

The functions in the left branch check access privileges. SEC_check_


access() verifies that a user’s access is approved based on the set of access
restrictions passed to this routine and the type of access required. SEC_
check_membership() checks to see whether a user or group is a member of
the specified group. SEC_check_functions() verifies that a user has access to
the functions indicated.

The functions in the middle branch get security information. SEC_get_


security_info() retrieves information about a user or group and returns it to the
caller. SEC_get_system_info() retrieves system information from the security
database, or from the operating system. SEC_get_membership_list() collects
and returns the names of all the groups to which a user or group belongs.

The six functions in the right branch retrieve or modify security information.
SEC_find_info() retrieves information from the security database about users,
workstations, functions and their members. SEC_add_info() enables a
logged-on user to add information to the security database for users,
workstations, functions, and their members. SEC_delete_info() enables the
logged-on user to delete information from the security database for users,
workstations, functions, and their members. SEC_update_info() enables the
logged-on user to update information in the security database for a user,
group, or service process. SEC_set_system_info() enables the logged-on
user to set either system information in the security database, or the system
date/time. SEC_rename_info() changes the name of a user or group in the
security database to a new name.

Finally, SECMAN_free_sec_handle() or SEC_logoff() terminates a service log


on with a Security Service.

TTY
The TTY functions provide a simple window system for reading and writing
data.

The TTY data flow is shown in TTY Data Flow Diagrams I and II.

66 WAL for Windows Programmer’s Reference Manual December 1996


3 Data Flow Diagrams
TTY

TTY Data Flow Diagram I

TTY_init() returns a handle to client-relative data needed by the F3TTYLIB


DLL to perform its other functions. This function is called once for each TTY
window. TTY_init() does not create a window. The row, column, and title
parameters set the defaults for subsequent windows. Use this function to
change the defaults.

TTY_create_window() creates and displays a TTY window.

The functions in the left branch manipulate the cursor position and window.
TTY_set_pos() sets and TTY_get_pos() returns the caret position within the
TTY window. TTY_scroll() scrolls the rectangular area specified.

TTY_display() displays data at the current caret position. You can optionally
use TTY_update_window() to immediately show the results of any display
commands.

TTY_display_msg() replaces the contents of the message window with the


specified string and TTY_clear_msg() clears the message window.

TTY_exit() destroys the TTY window.

December 1996 WAL for Windows Programmer’s Reference Manual 67


3 Data Flow Diagrams
TTY

TTY Data Flow Diagram II

Again, TTY_init() returns a handle to client-relative data needed by the


F3TTYLIB DLL to perform its other functions.

TTY_display_popup() displays the data pointed to in a popup window.

TTY_read_input() displays characters from the keyboard buffer.

TTY_set_softkeys() puts the softkey labels into the menu bar.

TTY_clear_input() clears the input buffer and TTY_clear_softkeys() clears the


softkey labels in the menu bar.

TTY_exit() destroys the TTY window.

Other TTY functions, not shown in the diagrams, are as follows:

• TTY_make_current() performs the specified action(s): brings the TTY


window to the top and/or makes the TTY window active.

• TTY_set_app_info_key() sets the key under which window size and


position are saved in the LOGON.CFG file.

• TTY_clear() clears the specified rectangular area.

68 WAL for Windows Programmer’s Reference Manual December 1996


3 Data Flow Diagrams
WQS (WorkFlo Queue Services)

WQS (WorkFlo Queue Services)


WQS Data Flow Diagrams I and II illustrate the use of the WQS (WorkFlo
Queue Services) functions.

WQS Data Flow Diagram I

WQS_is_WQS() checks to see whether the user currently logged on to the


IMS is using the WQS server service or the WQM server service. WQS_is_
WQS() returns TRUE if the user has logged on to server software (IMS)
release 2.8 or later. TRUE indicates that F3WQS.DLL will talk to
F3WQSLIB.DLL. For example, you might have an application that runs
against two versions of the server software (2.6 and 3.0). Your application
could then include both 2.6 and 3.0 functionality. At runtime, the only way to
learn which WorkFlo queue library (WQS2WQM or WQSLIB) is being used is
to call WQS_is_WQS(). You can than change your application’s functionality
accordingly.

You can log on using WQS_logon() or WQS_qlogon(). You supply WQS_


logon() with the name of a Queue Service. To log on to the default Queue
Service, supply it with NULL. You can also get the name of the default Queue
Service by calling WQS_get_default_service().

If you know the name of the domain to search, the workspace name, and the
name of the queue, you can find the name of the Queue Service by calling
WQS_get_server_name(). It returns the name of the WorkFlo Queue Server
responsible for servicing the specified queue. Use WQS_qlogon() if you know
the name of the workspace and the name of the queue to be accessed. The

December 1996 WAL for Windows Programmer’s Reference Manual 69


3 Data Flow Diagrams
WQS (WorkFlo Queue Services)

log on functions return a queue session handle that is passed to all WQS
functions.

WQS_get_workspace_names() returns the names of the workspace defined


in the specified domain and WQS_get_queue_names() returns the number
and names of queues of a given workspace.

WQS_create_workspace() creates a workspace by setting up the necessary


directories and Clearinghouse entry. WQS_get_workspace_info() returns the
security information and the text description of the workspace. WQS_update_
workspace() allows you to change the workspace names, change the security
access restriction, and change the text description of the workspace. WQS_
delete_workspace() deletes a workspace by removing the directories and
Clearinghouse entry associated with the workspace.

WQS_create_queue() sets up a new queue. WQS_get_queue_desc() returns


the queue descriptor structure. WQS_delete_queue() deletes a queue from
the workspace.

WQS (WorkFlo Queue Services) Data Flow Diagram II

WQS_open_queue() opens a queue for processing and returns a handle for


other queue operations. You can open multiple queues at the same time.

70 WAL for Windows Programmer’s Reference Manual December 1996


3 Data Flow Diagrams
WQS (WorkFlo Queue Services)

The functions in the left branch illustrate how to browse a queue. These
functions can only read the contents of a queue. They cannot modify
anything. This is a fast way to read a queue.

WQS_start_dump() signals the beginning of a queue dump. WQS_read_


dump() reads one or more entries from a dumped queue and WQS_end_
dump() terminates a dump.

The functions in the middle branch of the diagram illustrate how to read and
update an entire queue. WQS_read_queue() retrieves one or more entries
that satisfy a set of filter conditions from a queue. WQS_update_queue()
modifies the definition of an existing queue.

The functions in the right branch illustrate how to modify individual queue
entries. A queue entry consists of system-defined queue fields and user-
defined queue fields. WQS_count_entries() returns the number of queue
entries in a queue that satisfy a specified set of filter conditions. WQS_read_
entry() retrieves a specific entry, the identification of which is already known.
WQS_insert_entry() inserts one or more entries into a queue. WQS_delete_
entry() deletes one or more entries from a queue and WQS_update_entry()
modifies a specific queue entry.

WQS_close_queue() closes a queue (when no further operations on the


queue will be performed).

WQS_logoff() terminates a service log on with a Queue Service and frees


resources associated with the session handle returned from WQS_logon().

December 1996 WAL for Windows Programmer’s Reference Manual 71


3 Data Flow Diagrams
WQS (WorkFlo Queue Services)

72 WAL for Windows Programmer’s Reference Manual December 1996


4
4Error Messages

This chapter describes the error message display program (MSG.EXE) and
the errors specific to each library.

The MSG utility provides explanatory text for FileNet error numbers (also
called error tuples). The remainder of the chapter describes the errors defined
in the header files.

Error Message Display Program – MSG


An error tuple is a three-number representation of the 32-bit typedef error_typ
used in all services software to specify the precise error. The most significant
byte represents the module, the second byte represents the function within
that module, and the last two bytes represent an error within that function. In
the same way, the first, second, and third numbers in the tuple represent the
module, function, and specific error, respectively.

When provided with an error tuple at the DOS prompt, MSG.EXE provides a
text description of the reason for failure. MSG uses the ERM.IDX and
ERM.DAT files. If MSG.EXE, ERM.IDX, and ERM.DAT are not in the same
directory, MSG.EXE must be in one of the execution PATH directories, and
ERM.IDX and ERM.DAT must be in one of the data path APPEND directories.

Syntax
MSG error

error can be any number of errors separated by spaces. Each error has one of
the following formats:

• Three decimal numbers separated by commas (no space in between)

• A decimal number followed by a period

• An eight-digit hexadecimal number

December 1996 WAL for Windows Programmer’s Reference Manual 73


4 Error Messages
Error Messages

When MSG is entered without entering any errors, the program displays a text
message showing the syntax of the command line.

Examples
msg 4,0,1 4,0,2 4,0,3

msg 67108865. 67108866. 67108867.

Error Messages
The include file PCWS.H defines the module identifiers for the various WAL
service functions as well as all other PCWS functions. Also included in
PCWS.H is the definition of the error-tuple packing routine that is used. This
routine packs the long value that contains the error-tuple format (category +
function + number) used to return errors.

For the most part, errors are passed through by all of the FileNet modules.
Thus, a call to a WAL entry point should return the error code of the actual
module that failed, along with the reason for failure, rather than mapping this
code to some error that is specific to the module called by the client
application program. This provides for a more specific error listing, which is
more useful to the client in pinpointing the cause of the problem.

Some library errors are divided into the following two categories:

• Those in the Courier protocol (function number is 0)

• Those not in the Courier protocol (function number is 1)

Those that are not in the protocol would typically represent an error in the
programming of the PC workstation (caused by the application programmer,
not the user). These are most often used by the developer when creating the
application programs, to debug the code.

Those errors that are in the protocol represent errors that are legitimate user
errors (that cannot be caught by the application program because they are
syntactically and semantically correct). An example of this type of error is a
user requesting a document for which there is insufficient access privilege.

As the interface to the FileNet system, the WAL for Windows function calls
return a wide variety of errors, some specific to the call, some related to
underlying subsystems, and some related to local or remote network layers.

December 1996 WAL for Windows Programmer’s Reference Manual 74


4 Error Messages
Application Information

How to handle an error condition depends on the application design. Some


classes of errors indicate that the calls should be retried; others should not.

The first column in the error message tables in the following sections
represents the error number. To form an error tuple, use the err_encode()
function. For example:

err_encode(10, 0, RDD_DCLASS_NOT_FOUND);

Application Information
Defined in appinfo.i.

Constant Tuple Description


APPINFO_no_logon_cfg <180,0,22> Log on configuration file not found.
APPINFO_open_error <180,0,23> Document class not given in call to IAFLIB_
index_form().
APPINFO_read_error <180,0,24> Document class has no user indices.
APPINFO_write_error <180,0,25> Could not create index window (low memory?).
APPINFO_remove_error <180,0,26> Invalid index data.
APPINFO_copy_error <180,0,27> User cancelled (not an error).
APPINFO_NoMemory_error <180,0,28> Memory conflict/out-of-memory.
APPINFO_CannotLockMem_error <180,0,29> Unable to lock memory.

Archive
Defined in archlib.i.

Constant Tuple Description


ARCHLIB_No_Mem <95,0,1001> Not enough memory.
ARCHLIB_Lock_Failed <95,0,1002> Global lock failed (not enough memory?).
ARCHLIB_File_Create <95,0,1003> Couldn’t create a file.
ARCHLIB_File_Create <95,0,1004> Couldn’t read file.
ARCHLIB_File_Write <95,0,1005> Couldn’t write file.
ARCHLIB_No_Files <95,0,1006> No files specified.

December 1996 WAL for Windows Programmer’s Reference Manual 75


4 Error Messages
BATCHLIB

Constant Tuple Description


ARCHLIB_TooManyFiles <95,0,1007> File exceeds array sizes.
ARCHLIB_TooManyFilesForBES <95,0,1008> Too many files. There is a limit of 1000 files.

BATCHLIB
Defined in batchlib.i.

Error Number Constant Tuple Description


BATCHLIB_Bad_Page_Count <88,50,4> Bad page count.
BATCHLIB_Bad_FileName <88,50,5> Bad file name.
BATCHLIB_User_Abort <88,50,6> User cancelled batch.
BATCHLIB_def_service_level_mism <88,50,7> Default Services record level mismatch.
BATCHLIB_Bad_DocClass <88,50,8> Bad document class.

Batch Entry Service


Defined in bes.def.

Constant Tuple Description


BES_err_bad_version <88,1,1> Incorrect abstract link version for BES.
BES_err_invalid_info_spec <88,1,13> The specified BES_info_spec_typ structure
contains invalid data, or is inconsistent with
other data.
BES_err_invalid_info_type <88,1,14> Invalid BES_info_typ.
BES_err_unexpected_end_of_info <88,1,15> The link-list of BES_info_rec_typ has too few
elements.
BES_err_bad_sess_id <88,0,3> Invalid Batch Entry Services session number.
BES_err_too_many_ids <88,0,4> Attempt to allocate too many image identifiers.
BES_err_no_resources <88,0,5> Cannot perform this operation; no resources
available.
BES_err_batch_exists <88,0,6> This batch already exists.
BES_err_batch_not_found <88,0,7> This batch does not exist.
BES_err_batch_busy <88,0,8> This batch is already in use.

December 1996 WAL for Windows Programmer’s Reference Manual 76


4 Error Messages
Batch Entry Service

Constant Tuple Description


BES_err_batch_not_open <88,0,9> This batch is not open.
BES_err_image_exists <88,0,10> This image already exists.
BES_err_image_not_found <88,0,11> This image does not exist.
BES_err_no_transaction <88,0,12> There is no transaction on this image.
BES_err_already_in_transaction <88,0,13> Can’t do requested operation when transaction
in process on image.
BES_err_doc_exists <88,0,14> This document already exists.
BES_err_bad_pages <88,0,15> Attempt to put page into new document without
removing from old.
BES_err_doc_not_found <88,0,16> Document does not exist.
BES_err_ixdir_not_found <88,0,17> Column name record does not exist.
BES_err_internal_rpc_error <88,0,18> Internal RPC error.
BES_err_non_debugging <88,0,19> Debugging not turned on.
BES_err_not_logged_on_to_db <88,0,20> Not logged on to BES and/or MKF database.
BES_err_invalid_batch_type <88,0,21> Invalid batch type.
BES_err_ctl_not_found <88,0,22> MKF Ctl record not found. Your data base was
OK when the system was booted, but now the
‘ctl’ MKF record is missing. Did someone delete
it?
BES_err_ixval_not_found <88,0,23> Index value record not found.
BES_err_bad_relop <88,0,24> The ‘rel_op’ parameter passed to BES_find_
batches() has an invalid value.
BES_err_too_many_pages <88,0,25> Attempt to create document with too many
pages.
BES_err_too_many_indices <88,0,26> Attempt to create document with too many
indices.
BES_err_bad_batch_total <88,0,27> Attempt to compute batch totals on non-
numeric field.
BES_err_ixval_cnt <88,0,28> Invalid parameter passed to BES_update_
doc(): num_indices. When changing the num_
indices field of a document, the index values
must be passed to the procedure (array pointer
must be non-null).

December 1996 WAL for Windows Programmer’s Reference Manual 77


4 Error Messages
Batch Entry Service

Constant Tuple Description


BES_err_page_cnt <88,0,29> Invalid parameter passed to BES_update_
doc(): pages_p. When changing the num_
pages field of a document, the page array must
be passed to the procedure (array pointer must
be non-null).
BES_err_bad_handle <88,0,30> Invalid handle passed to BES.
BES_err_invalid_queue <88,0,31> Attempt to enqueue batch to invalid queue.
BES_err_phase_incomplete <88,0,32> Attempt to commit batch when phase(s) not
complete.
BES_err_image_not_verified <88,0,33> Attempt to commit batch when image(s) not
verified.
BES_err_wrong_queue <88,0,34> Can’t open batch when queue not equal to
uncommit (1) or none (0).
BES_err_no_required_index <88,0,35> Can’t find required index for document when
batch committed.
BES_err_commit_batch_total <88,0,36> Batch total invalid when attempt made to
commit batch.
BES_err_index_not_verified <88,0,37> Index not verified when attempt made to
commit batch.
BES_err_batch_name_too_long <88,0,38> Attempt to create a batch with a batch name
which is too long.
BES_err_bad_service_name <88,0,39> Batch services name doesn’t match between
log on and existing batch. The batch service
name was changed in the configuration files
after this batch was created. Change the
configuration back and finish this batch.
BES_err_invalid_batch_cap <88,0,40> Attempted to read or write an image with an
invalid batch capability.
BES_err_connection_already_open <88,0,41> A connection has previously been opened.
BES_err_connection_not_open <88,0,42> This connection is not open.
BES_err_invalid_bulk_data_src <88,0,43> Invalid bulk data source. Should be bulk data
immediate.
BES_err_string_too_long <88,0,44> String passed across network exceeds
maximum length.
BES_err_batch_too_large <88,0,45> Too many documents in this batch.

December 1996 WAL for Windows Programmer’s Reference Manual 78


4 Error Messages
Batch Entry Service

Constant Tuple Description


BES_err_bad_image_batch_id <88,0,46> Corrupted record in batch_image table batch_
id2 is non-null, but does not match batch_id in
the batch_image table.
BES_err_image_in_doc <88,0,47> Can’t delete image because it is in a document.
An attempt has been made to delete an image
in a document but not the document itself. The
image can’t be deleted unless the document is
deleted too. This error indicates a programming
problem.
BES_err_image_index_exists <88,0,48> This image already has an index associated
with it.
BES_err_invalid_image_index <88,0,49> The image index value cannot exceed 240
bytes.
BES_err_no_image_index <88,0,50> This image does not have an associated index
value.
BES_err_session_busy <88,0,51> This batch entry session is in use by another
client.
BES_err_internal <88,0,52> Internal BES error.
BES_err_bad_index_type <88,0,53> Invalid index type.
BES_err_commit_failed <88,0,54> Synchronous committal failed. Check error
status in documents.
BES_err_batch_not_locked <88,0,55> Override flag is TRUE and batch is not locked.
BES_err_imagebuf_not_alloc <88,0,56> Image buffer in read, write, or update not
allocated.
BES_err_cross_committal <88,0,57> Error in committing to a compatible target IMS.
BES_err_too_many_images <88,0,58> Attempted to create too many images for a
batch.
BES_err_readonly_batch <88,0,59> Attempted to update a batch opened as read
only.
BES_err_batch_overwritten <88,0,60> Batch is overwritten by another user.
BES_err_unsupported_function <88,0,1000> Function not supported on the current server
release.
BES_err_invalid_version <88,0,1000> Invalid server version.

December 1996 WAL for Windows Programmer’s Reference Manual 79


4 Error Messages
Local Cache Manager

Local Cache Manager


Defined in cam.i.

Constant Tuple Description


CAM_EE_CREATE_TABLE <78,0,1> Unable to create CAM CACHE table; check
CACHE parameters with setup.
CAM_EE_LOCK_TABLE <78,0,2> Unable to lock table.
CAM_EE_ALREADY_EXIST <78,0,3> File already exists.
CAM_EE_FILE_NOT_FOUND <78,0,4> File not found.
CAM_EE_UNIQUE_NAME <78,0,6> Unique name error.
CAM_EE_CREATE_FILE <78,0,7> Cannot create CAM data file.
CAM_EE_CANNOT_MAKE_ROOM <78,0,8> Object exceeds cache size; increase cache size?
CAM_EE_ALLOC <78,0,9> Cannot allocate memory.
CAM_EE_WRITE_ERR <78,0,10> File write error during update of CACHE object.
CAM_EE_OPEN_ERR <78,0,11> File open error.
CAM_EE_READ_ERR <78,0,12> File read error.
CAM_EE_LOCK_DESC <78,0,13> Memory lock error.
CAM_EE_INVALID_ATTR <78,0,14> Invalid CAM_attr_typ attribute was passed to
CAM_set_attr() or CAM_get_attr() function.
CAM_EE_XACT_BUSY <78,0,15> Attempted to use object when CAM_attr_xact_
busy is TRUE.
CAM_EE_SGSYNC_FAILED <78,0,16> Shared global memory synchronization failed.
CAM_EE_FILEMAP_FAILED <78,0,17> Memory mapping function failed.

December 1996 WAL for Windows Programmer’s Reference Manual 80


4 Error Messages
Remote Cache Services

Remote Cache Services


Defined in csm.def.

Constant Tuple Description


CSM_already_exists <77,0,1> Attempted to create a CSM object which already
CSM_object_exists_in_target_cac exists.
CSM_invalid_object_handle <77,0,3> An invalid object handle has been encountered.
CSM_invalid_session_handle <77,0,4> CSM given invalid session handle; session
probably timed out.
CSM_IO_error <77,0,5> An I/O error was encountered.
CSM_no_permission <77,0,7> The client does not have permission for the
CSM_no_permission_in_target_cac requested operation.
CSM_no_resources <77,0,8> Lack of disk (current cache) or data base space
CSM_no_resources_in_target_cach for the desired operation.
CSM_no_such_cache <77,0,9> Unknown cache ID.
CSM_no_such_object <77,0,10> The specified object does not exist in the current
cache.
CSM_object_busy <77,0,11> The object is already open or shared access was
attempted on an object for which exclusive
access has already been granted to another
client.
CSM_other_error <77,0,12> This is a catchall for other errors encountered
inside the Cache Services software.
CSM_out_of_range <77,0,13> Attempt to read or write beyond end of object.
CSM_no_ageable_docs <77,0,40> Cannot put ageable document into this cache.
CSM_refcnt_incremented <77,0,42> Reference count incremented due to attempt to
create duplicate.
CSM_no_refcnts <77,0,50> Reference counts disabled.
CSM_bad_version <77,1,0> Bad abstract link version when calling CSM.
CSM_invalid_name_type <77,1,16> Invalid value for ‘name type’ argument of log on.
CSM_nil_data_pointer <77,1,17> A nil data pointer was passed.
CSM_nil_bytes_trans_pointer <77,1,18> A nil data transfer count pointer was passed.
CSM_not_a_legal_cache <77,1,20> Attempted to use a partition which is not a cache
services partition.

December 1996 WAL for Windows Programmer’s Reference Manual 81


4 Error Messages
Remote Cache Services

Constant Tuple Description


CSM_illegal_disk_partition <77,1,21> An illegal disk partition has been encountered in
cache services.
CSM_invalid_mode <77,1,22> Attempted to open an object with an invalid open
mode.
CSM_invalid_object_desc <77,1,23> An invalid object descriptor was passed for the
desired operation.
CSM_tools_unavailable <77,1,24> You cannot use this tool now, another client is
currently using CSM.
CSM_mult_open <77,1,25> Attempt to open same object twice with write
access.
CSM_invalid_close <77,1,26> Attempted to close object when external MKF
transaction was aborted. Client called CSM_
begin_transaction(), CSM_open_object(), then
the transaction was aborted. Then the client
called CSM_close_object() with update set to
TRUE. This sequence is illegal.
CSM_not_available <77,1,27> The CSM tools are being run; clients of CSM are
locked out.
CSM_no_such_known_cache <77,1,29> A cache service name was looked up when that
name was never saved.
CSM_fatal_err <77,1,30> A fatal, unrecoverable CSM error has been
detected.
CSM_invalid_cache_handle <77,1,31> An invalid cache handle has been encountered.
CSM_invalid_object_size <77,1,32> Probably an attempt to shrink an object below its
current size.
CSM_invalid_bulk_data_source <77,1,33> An invalid bulk data source has been specified.
CSM_invalid_bulk_data_sink <77,1,34> An invalid bulk data sink has been specified.
CSM_invalid_age_duration <77,1,35> The age duration specified is unknown to CSM.
CSM_invalid_maxlength <77,1,36> Invalid ‘max length’ field in object attribute during
create object.
CSM_invalid_relop <77,1,37> Invalid relational operation used to find objects in
cache.
CSM_invalid_wildcard <77,1,38> Invalid wildcards used in find objects.
CSM_nil_cursor <77,1,39> Nil cursor detected (CSM program error).

December 1996 WAL for Windows Programmer’s Reference Manual 82


4 Error Messages
Remote Cache Services

Constant Tuple Description


CSM_refcnt_overflow <77,1,41> The reference count on an object has exceeded
the maximum of 65534.
CSM_invalid_sas_handle <77,1,43> Session handle is not expected value for open
connection.
CSM_logon_when_connect_open <77,1,44> Attempt to log on when connection open.
CSM_undefined_procedure <77,1,45> Attempt to call an undefined CSM procedure.
CSM_no_temp_ids <77,1,46> No more temporary object IDs.
CSM_bulk_read_err <77,1,47> Bytes read doesn’t match the number of bytes
transferred.
CSM_err_internal_rpc_error <77,1,48> Internal RPC error occurred in CSM.
CSM_err_not_debugging <77,1,49> Debugging operation requested from non-
debugging CSM.
CSM_err_cannot_find_named_servi <77,1,51> Cannot find the named CSM service in the
Clearinghouse.
CSM_logon_access_mode <77,1,52> Mode on cache log on does not allow this
operation.
CSM_open_access_mode <77,1,53> Mode on object open does not allow this
operation.
CSM_not_implemented <77,1,54> This function not implemented.
CSM_temp_busy <77,1,55> A client of CSM should never see this error.
CSM_invalid_object <77,1,56> The record in the csm_used_space table is
inconsistent.
CSM_invalid_io_handle <77,1,57> The I/O handle is invalid. This error can be
returned when attempting to do asynchronous I/O
on a remote cache, when memory runs out, or
when a null handle is passed in for any other
reason.
CSM_invalid_checksum <77,1,58> Invalid checksum detected by Cache Services.
CSM_ilgl_csum_update <77,1,59> Update not allowed on object with checksum.

December 1996 WAL for Windows Programmer’s Reference Manual 83


4 Error Messages
Display

Display
Defined in displib.i.

Constant Tuple Description


DISPLIB_not_registered <116,0,1> Attempted operation on an unregistered
object.
DISPLIB_invalid_attr <116,0,2> Invalid attribute.
DISPLIB_invalid_format <116,0,3> Invalid object format.
DISPLIB_bad_client_handle <116,0,4> Invalid client handle.
DISPLIB_scan_line_range_err <116,0,5> Specified scan line is out of range.
DISPLIB_no_form <116,0,6> No current form.
DISPLIB_invalid_angle <116,0,7> Invalid rotation.
DISPLIB_invalid_scaling <116,0,8> Invalid scaling ratio.
DISPLIB_zero_scaling <116,0,9> Scale ratio contains a zero.
DISPLIB_invalid_scaling_mode <116,0,10> Invalid scaling mode.
DISPLIB_no_callback_support <116,0,11> No callback is supported.
DISPLIB_bad_render_size <116,0,12> Size of rendered object is invalid.
DISPLIB_load_lib_err <116,0,50> LoadLibrary failed.
DISPLIB_get_proc_err <116,0,51> GetProcAddress failed.
DISPLIB_invalid_res <116,0,100> Invalid resolution.
DISPLIB_invalid_band_format <116,0,101> Invalid band format.
DISPLIB_invalid_dib <116,0,102> Invalid Windows 3.0 Bitmap.
DISPLIB_invalid_tiled <116,0,103> Invalid FileNet tiled image.
DISPLIB_invalid_tile <116,0,104> Invalid title in FileNet tiled image.
DISPLIB_invalid_subpage_count <116,0,105> Invalid number of subobjects in FileNet
composite object.
DISPLIB_invalid_subpage_type <116,0,106> Invalid subobject type in FileNet composite
object.
DISPLIB_extension_code_found <116,0,107> Encountered unsupported Group 4 extension
code.
DISPLIB_invalid_eofb <116,0,108> Invalid EOFB in Group 4 compressed data.

December 1996 WAL for Windows Programmer’s Reference Manual 84


4 Error Messages
Display

Constant Tuple Description


DISPLIB_run_exceeded_width <116,0,109> Run length exceeded within data
decompression.
DISPLIB_invalid_wordflo <116,0,110> Invalid FileNet WordFlo format.
DISPLIB_invalid_bmp <116,0,111> Invalid Windows 2.0 bitmap format.
DISPLIB_invalid_msp <116,0,112> Invalid Microsoft Paint format.
DISPLIB_cmp_dib <116,0,113> Compressed Windows 3.0 bitmap
unsupported.
DISPLIB_color_bmp <116,0,114> Color Windows 2.0 bitmap unsupported.
DISPLIB_invalid_pcx <116,0,115> Invalid PCX file format.
DISPLIB_color_pcx <116,0,116> Color PCX unsupported.
DISPLIB_invalid_codeword <116,0,117> Invalid compressed image codeword
encountered.
DISPLIB_g4_multiple_strips <116,0,118> IFD contains multiple strips.
DISPLIB_g4_samples_per_pixel <116,0,119> Invalid SamplesPerPixel tag.
DISPLIB_g4_not_compressed <116,0,120> Uncompressed group4 data not supported
yet.
DISPLIB_g3_non_aligned_EOLs <116,0,121> TIFF group3 images with non-byte-aligned
EOL markers are not supported.
DISPLIB_tiff_raw_tiled_unsupp <116,0,122> TIFF raw tiled images are not supported.
DISPLIB_compact_err <116,0,200> Failed to compact memory.
DISPLIB_alloc_err <116,0,201> Insufficient memory.
DISPLIB_lock_err <116,0,202> Insufficient memory (memory lock failed).
DISPLIB_create_bitmap_err <116,0,203> Insufficient memory (create bitmap failed).
DISPLIB_create_DC_err <116,0,204> Insufficient memory (create DC failed).
DISPLIB_select_obj_err <116,0,205> Insufficient memory (GDI selection failed).
DISPLIB_expand_tbl_load_err <116,0,206> Decompression table could not be loaded.
DISPLIB_expand_tbl_find_err <116,0,207> Decompression table could not be found.
DISPLIB_expand_tbl_lock_err <116,0,208> Decompression table could not be locked.
DISPLIB_no_bitmap_data <116,0,209> No bitmap data available.
DISPLIB_create_metaf_err <116,0,210> Failed creating the metafile.

December 1996 WAL for Windows Programmer’s Reference Manual 85


4 Error Messages
Display

Constant Tuple Description


DISPLIB_create_dib_DC_err <116,0,211> Create DIB driver DC failure. Is DIB.drv
installed?
DISPLIB_read_err <116,0,300> File read failed.
DISPLIB_seek_err <116,0,301> File seek failed.
DISPLIB_open_err <116,0,302> File open failed.
DISPLIB_bitblt_err <116,0,400> Windows SDK BitBlt function failed.
DISPLIB_JPEG_dll_query_failed <116,0,500>
DISPLIB_JPEG_invalid_scaling <116,0,501> Vertical and horizontal scaling mut be equal
for JPEG.
DISPLIB_JPEG_decmp_dllbusy <116,0,502> JPEG file decompression failed.
DISPLIB_PIXERR_unknown <116,0,600> Pixel translations unknown error.
DISPLIB_PIXERR_Initialize <116,0,601> PixmInitialize error.
DISPLIB_PIXERR_SettingsNew <116,0,602> PixmSettingsNew error.
DISPLIB_PIXERR_SettingsSet <116,0,603> PixmSettingsSet error.
DISPLIB_PIXERR_RectPaint <116,0,604> PixmRectPaint error.
DISPLIB_PIXERR_SettingsFree <116,0,605> PixmSettingsFree error.
DISPLIB_PIXERR_DocNew <116,0,606> PixmDocNew error.
DISPLIB_ PIXERR_FileNew <116,0,607> PixmFileNew error.
DISPLIB_PIXERR_FileSet <116,0,608> PixmFileSet error.
DISPLIB_PIXERR_ViewNew <116,0,609> PixmViewNew error.
DISPLIB_PIXERR_ViewSet <116,0,610> PixmViewSet error.
DISPLIB_PIXERR_ViewPageLock <116,0,611> PixmViewPageLock error.
DISPLIB_PIXERR_ViewPageUnlock <116,0,612> PixmViewPageUnlock error.
DISPLIB_PIXERR_ViewFree <116,0,613> PixmViewFree error.
DISPLIB_PIXERR_DocFree <116,0,614> PixmDocFree error.
DISPLIB_PIXERR_DocAddFile <116,0,615> PixmDocAddFile error.
DISPLIB_PIXERR_Done <116,0,616> PixmDone error.
DISPLIB_PIXERR_EnvNew <116,0,617> PixmEnvNew error.
DISPLIB_PIXERR_EnvFree <116,0,618> PixmEnvFree error.
DISPLIB_PIXERR_PageStore <116,0,619> PixmPageStore error.

December 1996 WAL for Windows Programmer’s Reference Manual 86


4 Error Messages
Document Services

Constant Tuple Description


DISPLIB_PIXERR_PageSet <116,0,620> PixmPageSet error.
DISPLIB_PIXERR_PageNew <116,0,621> PixmPageNew error.
DISPLIB_PIXERR_PageGet <116,0,622> PixmPageGet error.
DISPLIB_PIXERR_PageEnd <116,0,623> PixmPageEnd error.
DISPLIB_PIXERR_FileFree <116,0,624> PixmFileFree error.
DISPLIB_PIXERR_Register <116,0,625> PixmRegister error.
DISPLIB_PIXERR_RectPaintNoMem <116,1,604> PixmRectPaint: not enough memory for
Scale-to-Gray, switching to Favor Black.
DISPLIB_PIXERR_RectPaintBadCode <116,1,611> PixmViewPageLock error: invalid index (bad
image?).
DISPLIB_PIXERR_RectPaintNoMemJ <116,2,604> PixmRectPaint: Bad compressed image
codeword.
DISPLIB_PIXERR_ViewPageLockIdx <116,3,604> PixmRectPaint: Not enough memory for
requested operation.

Document Services
Defined in doc.def.

Constant Tuple Description


DOC_err_bad_version <80,1,1> Bad abstract link version when calling DOC.
DOC_err_internal_rpc_error <80,1,2> Internal RPC error occurred in DOC.
DOC_err_not_debugging <80,1,3> Debugging operation requested from non-
debugging DOC.
DOC_err_connection_already_open <80,1,4> Connection already open when attempting to
open connection with DOC.
DOC_err_connection_not_open <80,1,5> Connection not open when attempting to close
connection with DOC.
DOC_err_id_wrap_around <80,1,6> Imaged IDs have wrapped around in DOC -
serious system problem.
DOC_err_bad_attribute_type <80,1,7> Bad attribute type given in DOC.
DOC_err_bad_document_status <80,1,8> Bad document status given in DOC.
DOC_err_bad_index_value_type <80,1,9> Bad index_value_type given to DOC.

December 1996 WAL for Windows Programmer’s Reference Manual 87


4 Error Messages
Document Services

Constant Tuple Description


DOC_err_cannot_find_named_servi <80,1,10> Cannot find the named DOC service in the
Clearinghouse.
DOC_err_invalid_relational_oper <80,1,11> Relational operator invalid for given DOC
service.
DOC_err_bad_session_type <80,1,12> Bad session type for a DOC session - bug in
DOC.
DOC_err_invalid_session_number <80,1,13> Invalid session number for a DOC session - not
currently logged in.
DOC_err_too_many_servers <80,1,14> An invalid number of servers was given to
DOC.
DOC_err_server_not_found <80,1,15> DOC encountered an unknown server ID -
internal software error.
DOC_err_other_error <80,0,1> Other errors were encountered inside the
Document Services software.
DOC_err_document_not_found <80,0,2> Document not found from the locator database.
DOC_err_invalid_family_name <80,0,3> Invalid family name given in DOC.
DOC_err_no_permission <80,0,4> No permission to perform specified DOC
function.
DOC_err_invalid_cache <80,0,5> Invalid cache name given to DOC.
DOC_err_document_already_migrat <80,0,6> Document already migrated when migration
requested of a document by DOC.
DOC_err_invalid_network_address <80,0,7> Invalid network address given to DOC when
migrating from optical disk.
DOC_err_invalid_request_id <80,0,8> An is-migrated or cancel migrate call was given
an invalid request ID.
DOC_err_invalid_osar_id <80,0,9> Invalid OSAR ID given to DOC when creating a
family.
DOC_err_invalid_image_id <80,0,10> During the committal, one or more of the
images could not be found in the requested
cache.
DOC_err_invalid_security <80,0,11> Invalid security given to DOC.
DOC_err_duplicate_doc_id <80,0,12> Duplicate document ID supplied to DOC when
committing a document.

December 1996 WAL for Windows Programmer’s Reference Manual 88


4 Error Messages
Document Services

Constant Tuple Description


DOC_err_duplicate_family <80,0,13> Duplicate family name supplied to DOC when
creating a family.
DOC_err_invalid_user_id <80,0,14> Invalid user ID supplied for logging on to DOC.
DOC_err_invalid_session_handle <80,0,15> DOC given invalid session handle; session
probably timed out.
DOC_err_no_matches <80,0,16> A locator database query was performed when
there are no records matching the given ID or
name.
DOC_err_too_many_ids_requested <80,0,17> Too many image IDs requested to be allocated
from DOC.
DOC_err_page_out_of_range <80,0,18> Page number out of range of pages in a
document given to DOC.
DOC_err_not_in_osar <80,0,19> Synchronous migration from optical disk was
requested when the disk was not in any OSAR,
the request will proceed without notification.
DOC_err_annotation_too_large <80,0,20> Annotation given to DOC was too large.
DOC_err_annotation_not_found <80,0,21> Annotation ID was not found for the specified
page.
DOC_err_no_capability <80,0,22> No capability for updating the given item
through DOC.
DOC_err_annotation_busy <80,0,23> DOC annotation is busy being updated by
another client.
DOC_err_invalid_number_of_osars <80,0,24> When creating family, the length of the client’s
sequence of OSAR IDs was non-zero and
differs from the preferred current surfaces
parameter.
DOC_err_invalid_number_of_surfa <80,0,25> Invalid number of surfaces given to DOC.
DOC_err_annotation_not_busy <80,0,26> Annotation not busy when override was
requested of DOC.
DOC_err_no_resource <80,0,27> No resources available to log on to DOC.
DOC_err_invalid_family_id <80,0,28> Invalid family ID given to DOC.
DOC_err_cache_not_local <80,0,29> Attempted to commit (with no migrate to optical
disk) a document to a cache that is not on the
same system as the Document Service.

December 1996 WAL for Windows Programmer’s Reference Manual 89


4 Error Messages
Date/Time

Constant Tuple Description


DOC_err_status_not_changeable <80,0,30> Attempted to modify a document attribute
when the status of the copy of a document is
not changeable (e.g. the document is not yet
on optical disk).
DOC_err_bad_cache_to_use <80,0,31> When prefetching from optical disk, an invalid
cache was specified.
DOC_err_too_many_prefetches <80,0,32> Number of prefetches (the page ranges)
specified to DOC exceeds the limit.
DOC_err_service_not_local <80,0,33> Returned by log on when the named service
does not exist or is not local to the server.
DOC_err_not_impl_pdb <80,0,34> Specified DOC function not implemented for
PDBs.
DOC_err_no_such_service <80,2,1> Specified service does not exist. This error is
for PCs only; cannot be returned from the
server.

Date/Time
Defined in dtm.def.

Constant Tuple Description


DTM_InvalidMask <33,0,3> Invalid date/time mask specified.
DTM_TooManyMaskItems <33,0,4> Too many items used in the date/time mask. Limit is 24.
DTM_NoCurrentTime <33,0,6> Cannot read the current time.
DTM_SetTimeFailed <33,0,9> Failed to set the system time.
DTM_InvalidInput <33,0,13> Wrong date/time input.
DTM_BadMaskMonth <33,0,14> Could not find the abbreviated month specified by the
mask.
DTM_BadMaskDay <33,0,16> Could not find the abbreviated day of week specified by
the mask.
DTM_BadMaskHour <33,0,17> Invalid hour specified for 12 hour mask (AM/PM).
DTM_InconsistantSep <33,0,18> Inconsistency between separators in the input and the
mask.

December 1996 WAL for Windows Programmer’s Reference Manual 90


4 Error Messages
Date/Time

Constant Tuple Description


DTM_NoNullTerm <33,0,19> Date string does not end with a NULL as specified by the
mask.
DTM_NumericLength <33,0,21> Length of numeric data too long.
DTM_MissingNumeric <33,0,22> No numeric data found although specified by the mask.
DTM_AlphaLength <33,0,23> Length of alphabetic data too large.
DTM_MissingAlpha <33,0,24> No alphabetic data found although specified by the
mask.
DTM_SecondRange <33,0,28> Specified second out of range; valid range is 0 to 59.
DTM_MinuteRange <33,0,29> Specified minute out of range; valid range is 0 to 59.
DTM_HourRange <33,0,30> Specified hour out of range; valid range is 0 to 23.
DTM_DayOfWeekRange <33,0,31> Specified day of week out of range; valid range is 0 to 6.
DTM_DayOfYearRange <33,0,32> Specified day of year out of range; valid range is 0 to
365.
DTM_28DayRange <33,0,34> Specified day of month for February greater than 28 in
normal year.
DTM_29DayRange <33,0,35> Specified day of month for February greater than 29 in a
leap year.
DTM_DayOfMonthRange <33,0,36> Specified day of month greater than maximum number
of days in that month.
DTM_MonthRange <33,0,37> Month out of range.
DTM_YearRange <33,0,38> Year out of range.
DTM_InvalidType <33,0,39> Wrong date/time type.
DTM_GeneralRange <33,0,40> Date/time out of range.
DTM_InvalidAmPm <33,0,41> Invalid AM/PM specification.
DTM_VersionMismatch <33,0,90> DTM version mismatched.
DTM_SetConstFail <33,0,91> Error in setting up the date/time constants.
DTM_UnlinkFail <33,0,92> Error in unlinking the abstract.
DTM_ConstantFileReadFail <33,0,94> Error in reading the date/time constant file.
DTM_NoMaskMemory <33,0,95> Not enough memory to hold the mask.
DTM_TwoWordsReqd <33,0,96> The two word DTM mask is missing one or both words.

December 1996 WAL for Windows Programmer’s Reference Manual 91


4 Error Messages
Fill In

Fill In
Defined in fillin.i.

Constant Tuple Description


FILLIN_errNoMemory <154,0,1001> Not enough memory.
FILLIN_errLockFailed <154,0,1002> Cannot lock memory handle.
FILLIN_errBadHandle <154,0,1003> Invalid handle.
FILLIN_errBadParam <154,0,1004> Invalid parameter.
FILLIN_errFileCreate <154,0,1005> Create file failed.
FILLIN_errUserCancel <154,0,1006> User cancelled (not an error).
FILLIN_errNoDocClasses <154,0,1007> No document classes.
FILLIN_errNoForms <154,0,1008> No forms exist in file.
FILLIN_errOneForm <154,0,1009> Only one form exists in file (not an error).
FILLIN_errWriteFailed <154,0,1010> Write file failed.
FILLIN_errNoBkgAllowed <154,0,1011> Background committal disabled (not an error).
FILLIN_errNoBkgIds <154,0,1012> All background IDs have been allocated.
FILLIN_errNoSpawn <154,0,1013> Unable to load spawn.exe.
FILLIN_errRegMsgFailed <154,0,1014> Register window message failed.
FILLIN_errSpawnFailed <154,0,1015> Spawn failed.
FILLIN_errBkgInProgress <154,0,1016> Foreground committals not allowed while
background in progress.
FILLIN_errStartPrtSrv <154,0,1017> Unable to start PrintSrv.
FILLIN_errDDEServerTerminate <154,0,1018>
FILLIN_errNotImplemented <154,0,1099> Not implemented yet.

December 1996 WAL for Windows Programmer’s Reference Manual 92


4 Error Messages
Local Print

Local Print
Defined in fnprint.i.

Error Number Constant Tuple Description


FNP_LOCK <137,0,1> Unable to lock memory.
FNP_OPEN_FILE <137,0,2> Unable to open file.
FNP_ALLOC <137,0,3> Unable to allocate memory.
FNP_NO_IMG_SUPPORT <137,0,4> No image support.
FNP_READ_DOC_FILE <137,0,5> Unable to read image file.
FNP_OPEN_DOC_FILE <137,0,6> Unable to open image file.
FNP_CREATE_BM <137,0,7> Unable to create bitmap.
FNP_BAD_BAND <137,0,8> Unable to get image band.
FNP_NOT_FN_IMAGE <137,0,9> Not a FileNet image.
FNP_LOAD_CODETAB <137,0,10> Unable to find compression code table.
FNP_FIND_CODETAB <137,0,11> Unable to load compression code table.
FNP_READ_FILE <137,0,12> Unable to read file.
FNP_FILE_TOO_BIG <137,0,13> File too big.
FNP_INVALID_PAGE <137,0,14> Invalid page number.
FNP_INVALID_DOC_ID <137,0,15> Invalid document ID.
FNP_INVALID_COPIES <137,0,16> Invalid copy number.
FNP_NO_DOC_ID <137,0,17> Document ID not available.
FNP_NO_PRTDC <137,0,18> Unable to create Printer device context.
FNP_NO_BITBLT <137,0,19> Printer does not support raster operation.
FNP_GET_BITMAP <137,0,20> Unable to get image bitmap.
FNP_PRT_BAND <137,0,21> Unable to print image bitmap. (Temp disk full?).
FNP_BAD_HANDLE <137,0,22> Invalid data handle.
FNP_NO_SPAWN <137,0,23> Unable to spawn background task.
FNP_CANNOT_START_DOC <137,0,24> Cannot start to print document.
FNP_BAD_FORM <137,0,25> Invalid form handle.
FNP_SEEK_DOC_FILE <137,0,26> File seek error.
FNP_UNSUPP_DOC_FORMAT <137,0,27> Unsupported page format.

December 1996 WAL for Windows Programmer’s Reference Manual 93


4 Error Messages
Forms

Error Number Constant Tuple Description


FNP_STRETCH_BLT_FAILED <137,0,28> StretchBlt failure.
FNP_BAD_PAGE_RANGE <137,0,29> Invalid page range.
FNP_LOAD_PRTDRV_ERR <137,0,30> Unable to load printer driver.
FNP_SET_LANDSCAPE_ERR <137,0,31> Printer driver cannot switch to landscape mode.
FNP_USER_CANCELLED <137,0,32> Print job cancelled by the user.

Forms
Defined in formlib.i.

Constant Tuple Description


FORM_errNoMemory <25,0,1> Not enough memory.
FORM_errBadHandle <25,0,2> Invalid session handle.
FORM_errNoWindow <25,0,3> Could not create window.
FORM_errBadObjAttr <25,0,4> Invalid object attribute.
FORM_errBadAttrForObjType <25,0,5> Invalid attribute for object type.
FORM_errInvalidFieldType <25,0,6> Invalid field type.
FORM_errInvalidObjType <25,0,7> Invalid object type.
FORM_errNullPointer <25,0,8> Null pointer.
FORM_errCannotLockMem <25,0,9> Cannot lock memory handle.
FORM_errLoadLibrary <25,0,10> Load library failed.
FORM_errBadObject <25,0,11> Invalid object.
FORM_errClipboardBusy <25,0,12> Clipboard busy.
FORM_errNoHelp <25,0,13> No available help.
FORM_errBadSoftkey <25,0,14> Invalid softkey.
FORM_errLoadBitmap <25,0,15> Load bitmap failed.
FORM_errNotBitmap <25,0,16> Non-bitmap file given where bitmap file is required.
FORM_errNotMenuItem <25,0,17> Menu item not in menu.
FORM_errNoTimer <25,0,18> Could not set timer (all timers are busy?).
FORM_errValFuncNotBound <25,0,19> Validation function not bound.
FORM_errValFuncNotFound <25,0,20> Validation function not found.

December 1996 WAL for Windows Programmer’s Reference Manual 94


4 Error Messages
Forms

Constant Tuple Description


FORM_errCorruptFieldList <25,0,21> Corrupt field list.
FORM_errFuncNameRequired <25,0,22> Function name required.
FORM_errNotMenuHandle <25,0,23>
FORM_errNotMenuBarHandle <25,0,24>
FORM_errNotValHandle <25,0,25>
FORM_errObjNotFound <25,0,26> Object not found.
FORM_errObjAlreadyExist <25,0,27> Object already exists.
FORM_errValFailed <25,0,28> Validation failed.
FORM_errCorruptObjDir <25,0,29> Corrupt object directory.
FORM_errBadMapSize <25,0,30> Invalid map size.
FORM_errFileNameRequired <25,0,31> File name required.
FORM_errReadFileFailed <25,0,32> Read file failed.
FORM_errOpenFileFailed <25,0,33> Open file failed.
FORM_errNoExecution <25,0,34> No execution.
FORM_errInProgress <25,0,35> Execution in progress (not an error).
FORM_errTimeOut <25,0,36> Execution timed out.
FORM_errDuplicateField <25,0,37> Duplicate field.
FORM_errFieldNotFound <25,0,38> Field not found.
FORM_errBadFieldAttr <25,0,39> Invalid field attribute.
FORM_errBadAttrForFieldType <25,0,40> Invalid attribute for field type.
FORM_errCannotSetThisAttr <25,0,41> Cannot set this attribute.
FORM_errLoadIconFailed <25,0,42> Load icon failed.
FORM_errNoInputFields <25,0,43> No input fields.
FORM_errBadValue <25,0,44> Value is out of range.
FORM_errBadRange <25,0,45> Range is invalid.
FORM_errNo400dpi DC <25,0,46> Unable to create DC (low memory?).
FORM_errBadSignature <25,0,47> Signature is invalid.
FORM_errNotLoggedOn <25,0,48> Not logged on to a FileNet system.
FORM_errNo400dpiFont <25,0,49> Unable to create font.

December 1996 WAL for Windows Programmer’s Reference Manual 95


4 Error Messages
Forms

Constant Tuple Description


FORM_errCannotServDelFile <25,0,50> Server unable to delete file.
FORM_errCannotServRenFile <25,0,51> Server unable to rename file.
FORM_errCannotServSaveFile <25,0,52> Server unable to save file.
FORM_errWriteFileFailed <25,0,53> Write file failed.
FORM_errCreateFileFailed <25,0,54> Create file failed.
FORM_errFileExists <25,0,55> File exists and is not writable.
FORM_errNotFormPage <25,0,56> Not form page.
FORM_errNoFormLanguage <25,0,57> No form language.
FORM_errGetFormNameFailed <25,0,58> Get form name failed.
FORM_errLoadFormFailed <25,0,59> Load form failed.
FORM_errNoValTab <25,0,60> String field has no validation table.
FORM_errNotStringField <25,0,61> Current field is not a string field.
FORM_errNoValTabItems <25,0,62> Validation table has no items.
FORM_errUserCancelled <25,0,63> User cancelled (not an error).
FORM_errInvalidDevice <25,0,64> Invalid device driver specified in config file.
FORM_errGDIFailed <25,0,65> GDI operation failed (low memory?).
FORM_errFileNotFound <25,0,66> File not found.
FORM_errCreateDirFailed <25,0,67> Unable to create directory.
FORM_errLowResBackground <25,0,68> Background image resolution must equal or
exceed driver resolution.
FORM_errListOrCombo <25,0,69> Listbox or combobox operation failed.
FORM_errTooManyFields <25,0,70> Attempted to create too many fields.
FORM_errDuplicateRegion <25,0,71> Attempted to create duplicate region.
FORM_errTooManyRegions <25,0,72> Attempted to create too many regions.
FORM_errRegionNotFound <25,0,73> Region not found.
FORM_errBadRegionAttr <25,0,74> Invalid region attribute.
FORM_errBadRegionItem <25,0,75> Item does not exist in the region.
FORM_errTermProcNotFound <25,0,76> Termination callback function not found.
FORM_errInputNotAllowed <25,0,78> Attempt to execute at or step to a disabled field.
FORM_errUnsupportedTiff <25,0,79> Unsupported image file format.

December 1996 WAL for Windows Programmer’s Reference Manual 96


4 Error Messages
Forms

Constant Tuple Description


FORM_errFormNotReady <25,0,80> Form being painted; not ready for input.
FORM_errTooManyItems <25,0,81> Validation table too large.
FORM_errNotImplementedYet <25,0,99> Not implemented yet.
FORM_errSyntaxError <25,0,2001> Syntax error in source given to Forms.
FORM_errSourceNotFound <25,0,2002> Unable to open Forms source file.
FORM_errCouldntInitialize <25,0,2003> Could not initialize a Forms module.
FORM_errBadPop <25,0,2004> Internal error in Forms upon popping a value from
rule stack.
FORM_errStackError <25,0,2005> Internal error in Forms upon checking rule stack
depth.
FORM_errResultNotBoolean <25,0,2006> Result of a Forms rule is not a non-null boolean
value.
FORM_errBadParamType <25,0,2007> Wrong type for parameter of an operator or function
in Forms rule.
FORM_errIncompatParamType <25,0,2008> Incompatible types for parameters of an operator or
function in Forms rule.
FORM_errUnknownType <25,0,2009> Internal error in Forms: unknown data type.
FORM_errBadVal <25,0,2010> val() function applied to invalid field type in Forms.
FORM_errBadConversion <25,0,2011> Invalid type conversion in Forms rule.
FORM_errOutOfRange <25,0,2012> Value out of range for conversion in Forms rule.
FORM_errBadStringIndex <25,0,2013> Bad string index used in Forms rule.
FORM_errBadTranslate <25,0,2014> Length of second and third parameters to translate
must be same in Forms rule.
FORM_errHugeString <25,0,2015> String too large in Forms rule.
FORM_errFileIOError <25,0,2016> I/O error on Forms file.
FORM_errUnknownSoftkey <25,0,2017> Internal error in Forms: unknown softkey.
FORM_errUnknownIcon <25,0,2018> Internal error in Forms: unknown standard icon.
FORM_errUnknownFieldType <25,0,2019> Internal error in Forms: unknown field type.
FORM_errUnknownMapMode <25,0,2020> Internal error in Forms: unknown field mapping
mode.
FORM_errUnknownBrushStyle <25,0,2021> Internal error in Forms: unknown field brush style.

December 1996 WAL for Windows Programmer’s Reference Manual 97


4 Error Messages
Floating Point

Constant Tuple Description


FORM_errUnknownPenStyle <25,0,2022> Internal error in Forms: unknown field pen style.
FORM_errUnknownStretch <25,0,2023> Internal error in Forms: unknown stretch mode.
FORM_errInvalidOpOnNull <25,0,2024> Invalid operation performed on null value in Forms
rule.
FORM_errIncompatValue <25,0,2025> Incompatible types for value and Forms field.
FORM_errCouldntCreateFile <25,0,2026> Forms could not create a file.
FORM_errUnknownHatchStyle <25,0,2027> Internal error in Forms upon finding an unknown
field hatch style.
FORM_errUnknownFontFamily <25,0,2028> Internal error in Forms upon finding an unknown
field font family.
FORM_errForceRulesValid <25,0,2029> OKIF condition true, stop testing rule list (not an
error).
FORM_errCheckSyntaxOfVal <25,0,2030> Can’t check syntax of expression using val()
function, because its data type is unknown.
FORM_errBadBox <25,0,2031> Box function applied to field type other than listbox
or combobox in Forms.
FORM_errCurSelOnMulti <25,0,2032> Single-selection function applied to multiselection
listbox field.
FORM_errSelOnSingle <25,0,2033> Multiselection function applied to single-selection
listbox field.

Floating Point
Defined in fp.def.

Constant Tuple Description


FP_Overflow <89,0,1> Overflow.
FP_Undefined <89,0,2> Undefined operation.
FP_IllegalFmt <89,0,3> Illegal format.
FP_InvalidMask <89,0,4> Invalid mask.
FP_badVersion <89,0,1000> Bad version.

December 1996 WAL for Windows Programmer’s Reference Manual 98


4 Error Messages
IAF Library

IAF Library
The IAF Library includes Folders, Document Retrieval, Cache Management,
Log on, Remote Print-Folders, and Remote Print.

Defined in iaflib.i.

Constant Tuple Description


IAFLIB_stub <42,0,1> Unimplemented function request.
IAFLIB_bad_input <42,0,2> Bad input parameters.
IAFLIB_too_many_clients <42,0,3> Not currently used.
IAFLIB_IMS_level_mismatch <42,0,4> IMS Desc record level mismatch.
IAFLIB_cache_level_mismatch <42,0,5> Cache Desc record level mismatch.
IAFLIB_def_srv_lvl_mismatch <42,0,6> Default Service record level mismatch.
IAFLIB_bad_continue <42,0,7> Continue attempted without valid query in
progress.
IAFLIB_bad_client_handle <42,0,8> Invalid client handle.
IAFLIB_annotation_changed <42,0,9> Annotation changed between Get and Get-and-
Lock.
IAFLIB_scan_line_range_err <42,0,10> Scan line requested is outside range.
IAFLIB_band_desc_lock_err <42,0,11> Unable to lock band descriptor table (low
memory?).
IAFLIB_lock_err <42,0,12> Unable to lock memory block (low memory?).
IAFLIB_create_DC_err <42,0,13> Unable to create Display Context (low memory?).
IAFLIB_create_bitmap_err <42,0,14> Unable to create bitmap (low memory?).
IAFLIB_image_file_open_err <42,0,15> Error opening image file.
IAFLIB_image_file_data_err <42,0,16> Error in data in image file (not a displayable
image?).
IAFLIB_image_file_read_err <42,0,17> Error reading image file.
IAFLIB_image_file_type_err <42,0,18> Not an image page type.
IAFLIB_expand_tbl_find_err <42,0,19> Error finding decompression table.
IAFLIB_expand_tbl_load_err <42,0,20> Error loading decompression table (low memory?).
IAFLIB_expand_tbl_lock_err <42,0,21> Error locking decompression table (low memory?).
IAFLIB_no_logon_cfg <42,0,22> Log on configuration file not found.

December 1996 WAL for Windows Programmer’s Reference Manual 99


4 Error Messages
IAF Library

Constant Tuple Description


IAFLIB_Bad_DClass <42,0,23> Document class not given in call to IAFLIB_index_
form().
IAFLIB_no_indices <42,0,24> Document class has no user indices.
IAFLIB_no_index_wnd <42,0,25> Could not create index window (low memory?).
IAFLIB_bad_index_data <42,0,26> Invalid index data.
IAFLIB_user_cancel <42,0,27> User cancelled (not an error).
IAFLIB_no_spawn <42,0,28> Spawn must be running (include in LOGON.CFG
basetasks).
IAFLIB_query_bkg_spawn_err <42,0,29> Can’t spawn background query (low memory or
missing querybkg.exe).
IAFLIB_no_memory <42,0,30> Not enough memory.
IAFLIB_load_library_err <42,0,31> Failed to load library DLL.
IAFLIB_func_not_found <42,0,32> Entry points in library not found.
IAFLIB_extension_code_found <42,0,33> Unsupported Group 4 extension code
encountered.
IAFLIB_invalid_eofb <42,0,34> Invalid Group 4 End-Of-Facsimile-Block code
encountered.
IAFLIB_run_exceeded_width <42,0,35> Lost synchronization during Group 4
decompression.
IAFLIB_text_range_err <42,0,36> Requested text outside of text dimensions.
IAFLIB_text_file_open_err <42,0,37> Error opening text page file.
IAFLIB_text_file_data_err <42,0,38> Error in data in text page file (invalid page?).
IAFLIB_text_file_read_err <42,0,39> Error reading text page file.
IAFLIB_text_file_type_err <42,0,40> Not a text page type.
IAFLIB_invalid_ DIR <42,0,41> Invalid index record type.
IAFLIB_logon_bkg_spawn_err <42,0,42> Recovered from internal log on failure (warning).
IAFLIB_no_short_prt_options <42,0,43> Number of short print options is exceeded.
IAFLIB_server_version_zero <42,0,44> If version number returned zero, you might not
have logged on yet.
IAFLIB_no_checksum <42,0,45> Object has no checksum.
IAFLIB_start_logon_failed <42,0,46> Attempt to start LOGON.EXE failed when trying to
auto log on.

December 1996 WAL for Windows Programmer’s Reference Manual 100


4 Error Messages
Image Format Management

Constant Tuple Description


IAFLIB_unable_to_logoff <42,0,47> Unable to log off when trying to auto log off.
IAFLIB_version_error <42,0,48> IAFLIB Library version mismatch. This error is only
returned when trying auto log on or auto log off.
IAFLIB_already_logged_on <42,0,49> Already logged on when trying to auto log on.
IAFLIB_not_logged_on <42,0,50> Not logged on yet when trying to auto log off.
IAFLIB_cannot_delete <42,0,51> Item protected or locked.
IAFLIB_invalid_page <42,0,52> Wrong or nonexistent page number.
IAFLIB_invalid_image_object <42,0,53> Not a defined image object type.
IAFLIB_obj_security_not_sup <42,0,54> Security services mismatch; check server IMS
SEC functions version.
IAFLIB_bad_PEP_client_type <42,0,55> Function does not support PEP.
IAFLIB_func_not_in_server <42,0,56> Invalid function call.
IAFLIB_bad_password_handle <42,0,57> Bad password handle.

Image Format Management


Defined in imgfmt.i, imglib.i.

Constant Tuple Description


IMGFMT_not_implemented <201,0,100> Conversion is not implemented.
IMGFMT_no_support <201,0,101> Conversion is not supported.
IMGFMT_non_op <201,0,102> Conversion is a non-operation.
IMGFMT_unknown_format <201,0,103> Unknown format.
IMGFMT_open_error <201,0,104> Error opening file.
IMGFMT_seek_error <201,0,105> Error in file seek operation.
IMGFMT_read_error <201,0,106> Error reading from file.
IMGFMT_write_error <201,0,107> Error writing to file.
IMGFMT_alloc_failed <201,0,108> Memory allocation failed (low memory?).
IMGFMT_lock_failed <201,0,109> Memory lock failed (low memory?).
IMGFMT_not_FN_image <201,0,110> Not a supported FileNet image.
IMGFMT_not_TIFF_image <201,0,111> TIFF data type is invalid.

December 1996 WAL for Windows Programmer’s Reference Manual 101


4 Error Messages
Image Format Management

Constant Tuple Description


IMGFMT_bad_width <201,0,112> Invalid width.
IMGFMT_bad_length <201,0,113> Invalid length.
IMGFMT_bad_resolution <201,0,114> Invalid resolution.
IMGFMT_no_image_data <201,0,115> No image data.
IMGFMT_bad_TIFF_data_type <201,0,116> Invalid TIFF format.
IMGFMT_dcx_hdr_error <201,0,117> Error in DCX header.
IMGFMT_bad_bmp <201,0,118> Invalid BMP format.
IMGFMT_bad_msp <201,0,119> Invalid MSP format.
IMGFMT_bad_pcx <201,0,120> Invalid PCX format.
IMGFMT_bad_dib <201,0,121> Invalid DIB format.
IMGFMT_color_unsupported <201,0,122> Color is not supported.
IMGFMT_createdc_failed <201,0,130> Failed to create device context.
IMGFMT_createbm_failed <201,0,131> Failed to create bitmap object.
IMGFMT_height_mismatch <201,0,132> Height mismatch with header.
IMGFMT_selectobj_failed <201,0,133> Failed to select bitmap object.
IMGFMT_get_proc_addr_failed <201,0,140> Unable to find function at runtime.
IMGFMT_load_library_failed <201,0,141> Unable to load library at runtime.
IMGFMT_end_of_file <201,0,150> Attempt to read past the end of the file.
IMGFMT_no_JPEG_parameters <201,0,160> JPEG parameters location error.
IMGFMT_invalid_ JPEG_resolution <201,0,161> Unsupported JPEG resolution.
IMGFMT_JPEG_dll_query_failed <201,0,162> Unreadable JPEG file header.
IMGFMT_JPEG_dll_compress_failed <201,0,163> Compression failure.
IMGFMT_JPEG_buffer_alloc_failed <201,0,164> Insufficient memory space allocated to
buffers during decompression. Increase
buffer size.
IMGFMT_JPEG_8bit_color_fail <201,0,165> 8-bit color BMP to JPEG is not supported.
Use 24-bit color BMPs or 8-bit grayscale
BMPs instead.
IMGFMT_DCX_not_supported <201,0,166> DCX is not supported.
IMGFMT_JPEG_not_supported <201,0,167> Use 24-bit color BMPs or 8-bit grayscale
BMPs instead.

December 1996 WAL for Windows Programmer’s Reference Manual 102


4 Error Messages
Image Format Management

Constant Tuple Description


IMGFMT_dll_expand_failed <201,0,168> JPEG expansion failed.
IMGFMT_input_eq_output_file_err <201,0,169> Image conversion input file name cannot
equal output file name.
IMGFMT_internal_usage_error <201,0,180> Internal usage error.
IMGFMT_PIXERR_unknown <201,0,200> Pixel translations unknown error.
IMGFMT_PIXERR_Initialize <201,0,201> PixmInitialize error.
IMGFMT_PIXERR_PageNew <201,0,202> PixmPageNew error.
IMGFMT_PIXERR_PageFree <201,0,203> PixmPageFree error.
IMGFMT_PIXERR_Done <201,0,204> PixmDone error.
IMGFMT_PIXERR_Register <201,0,205> PixmRegister error.
IMGFMT_PIXERR_dfltInit <201,0,206> PixmdfltInit error.
IMGFMT_PIXERR_DrvLoadInitPipe <201,0,207> PixDrvLoadInitPipe error.
IMGFMT_PIXERR_DrvLoad <201,0,208> PixDrvLoad error.
IMGFMT_PIXERR_DrvInitialize <201,0,209> PixDrvInitialize error.
IMGFMT_PIXERR_DrvLink <201,0,210> PixDrvLink error.
IMGFMT_PIXERR_TagSetAscii <201,0,211> PixTagSetAscii error.
IMGFMT_PIXERR_TagSetLong <201,0,212> PixTagSetLong error.
IMGFMT_PIXERR_RunZone <201,0,213> PixRunZone error.
IMGFMT_PIXERR_DrvRunZone <201,0,214> PixDrvRunZone error.
IMGFMT_PIXERR_DrvUnload <201,0,215> PixDrvUnload error.
IMGFMT_PIXERR_DrvUnloadPipe <201,0,216> PixDrvUnloadPipe error.
IMGFMT_PIXERR_dftlDone <201,0,217> PixdfltDone error.

December 1996 WAL for Windows Programmer’s Reference Manual 103


4 Error Messages
Index Form

Index Form
Defined in indxform.i.

Constant Tuple Description


INDXFORM_bad_client_handle <109,0,1> Invalid client handle.
INDXFORM_lock_err <109,0,2> Unable to lock memory block (low memory?).
INDXFORM_Bad_DClass <109,0,3> Document class not given in call to IAFLIB_index_
form().
INDXFORM_no_indices <109,0,4> Document class has no user indices.
INDXFORM_no_index_wnd <109,0,5> Could not create index window (low memory?).
INDXFORM_bad_index_data <109,0,6> Invalid index data.
INDXFORM_user_cancel <109,0,7> User cancelled (not an error).
INDXFORM_no_memory <109,0,8> Not enough memory.
INDXFORM_NoCustIndexForm <109,0,9> Unable to find custom index form.

Index Services
Defined in inx_err.h.

Constant Tuple Description


INX_err_other <90,0,1> This is for an error that occurs within the server
software that is not otherwise detailed.
INX_err_invalid_handle <90,0,2> Invalid session handle, might have timed out.
INX_err_no_permission <90,0,3> Permission denied.
INX_err_session_busy <90,0,4> Session in use.
INX_err_dup_record <90,0,5> Duplicate database entry.
INX_err_no_record <90,0,6> Attempted to make a reference to a non-existent
document index record.
INX_err_record_busy <90,0,7> Record already locked (e.g. from IAFLIB_get_single_
DIR()).
INX_err_no_menu <90,0,8> Specified menu does not exist.
INX_err_no_folder <90,0,9> Folder not found (maybe folder status?).
INX_err_not_in_folder <90,0,10> Document not filed in specified folder.

December 1996 WAL for Windows Programmer’s Reference Manual 104


4 Error Messages
Index Services

Constant Tuple Description


INX_err_already_in_folder <90,0,11> Document already filed in specified folder.
INX_err_inv_query <90,0,12> A query description was formed incorrectly.
INX_err_no_query <90,0,13> An operation such as IAFLIB_continue_query() or
IAFLIB_terminate_query() was performed when no
query was in progress.
INX_err_descendent_dest <90,0,14> Cannot move/copy the folder subtree to its own
descendant.
INX_err_no_capability <90,0,15> Attempted to update a document index record without
a valid capability.
INX_err_inv_record <90,0,16> Document index record is not valid.
INX_err_no_dcl <90,0,17> Specified document class does not exist.
INX_err_no_index <90,0,18> Specified index does not exist.
INX_err_reqd_is_null <90,0,19> One or more required items are null.
INX_err_no_key <90,0,20> Specified key does not exist.
INX_err_wrong_handle <90,0,21> With one session active on an open connection, a
second session handle was presented.
INX_err_date_conflict <90,0,22> Conflicting dates in folder description.
INX_err_inv_retent_base <90,0,23> Invalid retention base.
INX_err_not_imported <90,0,24> From an import batch, the document index record is
not imported.
INX_err_doc_id_range <90,0,25> Document ID number out of permitted range.
INX_err_inv_sys_col <90,0,29> System index has wrong type or value.
INX_err_unk_sys_col <90,0,30> Unknown system column.
INX_err_index_in_rec_twice <90,0,31> Two values for the same index in doc index record.
INX_err_inv_retent_disp <90,0,32> Invalid retention disposition.
INX_err_bad_value_type <90,0,33> Invalid index value type in doc index record.
INX_err_doc_is_filed <90,0,34> IAFLIB_delete_doc() was called to delete a document
which is currently in a folder.
INX_err_bad_direction <90,0,35> Direction value in query is invalid.
INX_err_bad_current_rec <90,0,36> Current record value in query is invalid.
INX_err_unknown_op <90,0,37> Unknown query filter operator.

December 1996 WAL for Windows Programmer’s Reference Manual 105


4 Error Messages
Index Services

Constant Tuple Description


INX_err_not_pdb <90,0,41> Function is not implemented for portable database.
INX_err_query_non_index <90,0,42> Cannot perform query on index which is not stored in
database.
INX_err_folder_closed <90,0,44> Folder is closed.
INX_err_interrupted <90,0,45> Query was interrupted.
INX_err_index_not_in_dcl <90,0,46> Index in DIR not defined in document class.
INX_err_cannot_change_dcl <90,0,47> DIR update cannot change document class number.
INX_err_bad_cap_type <90,0,48> Invalid capability type.
INX_err_too_deep <90,0,49> Attempted to create too many folder levels.
INX_err_no_more_cols <90,0,50> The limit has been reached on creating user indexes.
INX_err_bad_folder_atts <90,0,51> Invalid value(s) in folder description.
INX_err_not_empty <90,0,52> Deletion of non-empty folder (but not contents)
requested.
INX_err_bad_folder_name <90,0,53> Invalid folder name.
INX_err_not_impl <90,1,1> Function is not implemented.
INX_err_cannot_convert <90,1,2> Conversion from database type to wtype not
supported.
INX_err_no_init <90,1,3> Could not initialize server.
INX_err_bad_net_data <90,1,4> Incorrect data passed across network.
INX_err_string_too_long <90,1,5> Received string which exceeds size of buffer.
INX_err_bad_fork <90,1,6> Fork of child process failed.
INX_err_bad_db <90,1,7> Bad data found in database.
INX_err_internal <90,1,8> Internal error in index services.
INX_err_no_dict_param <90,1,9> Neither ID nor name specified for dictionary get desc
function.
INX_err_bad_version <90,1,10> Unrecognized version parameter on abst_link call.
INX_err_no_conn <90,1,11> No Courier connection open.
INX_err_have_conn <90,1,12> Already have Courier connection open.
INX_err_inv_proc_num <90,1,13> Unknown remote procedure number presented to
server.
INX_err_inv_rpc_msg <90,1,14> Unknown Courier msg_type.

December 1996 WAL for Windows Programmer’s Reference Manual 106


4 Error Messages
Index Services

Constant Tuple Description


INX_err_dict_not_found <90,1,15> No dictionary for specified ID.
INX_err_bad_move_sys_col <90,1,16> INX internal error in move_sys_col.
INX_err_bad_new_row_buf <90,1,17> Call to expand non-existent buffer made.
INX_err_no_service <90,1,18> Requested service name does not exist.
INX_err_old_service_def <90,1,19> Unrecognized INX service definition level in NCH
record.
INX_err_double_bg <90,1,20> Only one INX background process to run per
database.
INX_err_import_buf_len <90,1,21> Ran off end of import buffer.
INX_err_old_ims_def <90,1,22> Unrecognized IMS definition in NCH record.
INX_err_dict_level_wrong <90,3,4> PDB contains unknown dictionary level.
INX_err_pdb_folder <90,3,5> Folders not implemented in PDBs.
INX_err_pdb_header <90,3,6> Error reading PDB header: bad size or magic number.
INX_err_pdb_negchunks <90,3,7> Negative number of chunks computed from PDB
header.
INX_err_pdb_badoffset <90,3,8> Bad offset in PDB header.
INX_err_pdb_shortread <90,3,9> Short read of PDB chunk.
INX_err_pdb_numindexes <90,3,10> Compound keys in PDBs not implemented.
INX_err_keycondtype <90,3,11> Illegal key condition type.
INX_err_pdb_stgpoolsz <90,3,14> String pool size exceeded.
INX_err_pdb_numpoolsz <90,3,15> Number pool size exceeded.
INX_err_pdb_stackuflo <90,3,16> Stack underflow.
INX_err_pdb_stackoflo <90,3,17> Stack overflow.
INX_err_pdb_pushwrong <90,3,18> Push wrong element.
INX_err_pdb_badtype <90,3,19> Bad stack element type.
INX_err_pdb_fconssz <90,3,20> Filter constants pool overflow.
INX_err_pdb_badfcons <90,3,21> Bad filter constant number.
INX_err_pdb_nostopper <90,3,22> Stopper entry missing at end of buffer.
INX_err_no_resources <90,99,54> Not enough memory on the PC.

December 1996 WAL for Windows Programmer’s Reference Manual 107


4 Error Messages
NCH - Network Clearing House

Constant Tuple Description


INX_err_lock_failed <90,99,55> Failed to lock a handle.
INX_err_DIRS_too_big <90,99,56> The document index record is too big for the PC to
handle.

NCH - Network Clearing House


Defined in nchedefs.h

Constant Tuple Description


NCH_Parameter_Error <156,0,0> Bad or NULL parameters passed to the DLL
function.
NCH_Version_Error <156,0,1> Abstract link failed due to version mismatch.
NCH_UnImplFunc_Error <156,0,23> The NCH entry point is currently not implemented.
NCH_Net_Error <156,0,24> A network related error was encountered.
NCH_Exception <156,0,25> An exception condition was encountered in NCH and
logged.
NCH_NoServer <156,0,26> Unable to locate an NCH server for the specified
domain.
NCH_TimeOut_Error <156,0,64> PEP time-out in F3NCH DLL.
NCH_ShutDown_Error <156,0,65> Shutdown in progress.
NCH_Alloc_Failed <156,0,68> Memory allocation failure in NCH.
NCH_Lock_Failed <156,0,69> Memory locking problem in NCH.
NCH_RPC_RejectedError <156,0,70> The NCH operation was rejected by the server.
NCH_BadMessage_Error <156,0,71> Invalid Courier message in NCH.
NCH_Unknown_Error <156,0,72> Invalid Courier message in NCH.
NCH_Invalid_Eth2TR_Config <156,0,80> Invalid ethernet to token ring configuration.
NCH_MaxListObjects <156,0,81> Too many objects found in a listobjects operation.
NCH_NoProtocolAddr <156,0,82> No NCH address found for your protocol family.
NCH_BadAddressList <156,0,83> An invalid NCH address list returned.
NCH_BadIPAddress <156,0,84> The local IP address is not valid.
NCH_BadIPSubAddr <156,0,85> The IP subnetwork mask is not valid.
NCH_BadIPNCHRemoteNet <156,0,86> The IPNCHRemoteNet mask is invalid.

December 1996 WAL for Windows Programmer’s Reference Manual 108


4 Error Messages
NCH - Network Clearing House

Constant Tuple Description


NCH_AccessRights_Error <156,1,1> Operation prevented by access controls.
NCH_TooBusy_Error <156,1,2> NCH Server too busy to service this request.
NCH_ServerDown_Error <156,1,3> A required NCH server was found to be down.
NCH_useCourier_Error <156,1,4> Courier must be used for this operation.
NCH_Other_Error <156,1,5> Encountered an unsupported function or exception
condition.
NCH_IllProp_Error <156,2,10> Illegal NCH property value.
NCH_IllOrg_Error <156,2,11> Syntax error in an organization field.
NCH_IllDomain_Error <156,2,12> Syntax error in a domain field.
NCH_IllObject_Error <156,2,13> Syntax error in an object field.
NCH_NoSuchOrg_Error <156,2,14> The name’s organization does not exist.
NCH_NoSuchDomain_Error <156,2,15> The name’s domain does not exist.
NCH_NoSuchObject_Error <156,2,16> The name’s object does not exist.
NCH_MissingProp_Error <156,3,20> The object exists but the property does not.
NCH_WrongTypeProp_Error <156,3,21> The property was found to be of the wrong type.
NCH_NoChange_Error <156,4,30> The operation would not change the database.
NCH_OutOfDate_Error <156,4,31> More recent information was found in the database.
NCH_ObjectOverflow_Error <156,4,32> The particular object would have too much data
associated with it.
NCH_DatabaseOverflow_Error <156,4,33> The server’s database is full.
NCH_WrongServer_Error <156,5,0> The server does not handle the specified domain.
NCH_Authentication_Error <156,6,0> The client failed the authentication checks.

December 1996 WAL for Windows Programmer’s Reference Manual 109


4 Error Messages
Remote Print

Remote Print
Defined in pri.def.

Constant Tuple Description


PRI_err_invalid_session_handle <87,0,1> The session handle given to Print Services is
either invalid or has not been used for a certain
period of time.
PRI_err_no_permission <87,0,2> The user is trying to initiate, modify, cancel, or
find information about a request and does not
have the security credentials required to do so.
PRI_err_invalid_option <87,0,3> One or more of the options specified by the user
when initiating or modifying a print request could
not be satisfied. This could be caused by
specifying an option that none of the printers
owned by this Print Service can provide (such
as stapling or a very large paper size). It could
also be caused by none of the printers currently
being up and the user asking the Print Service
to choose a printer for them.
PRI_err_no_such_request <87,0,4> A request was made to cancel, modify, or find
information about a specific print request and
this request either never existed or has been
deleted from the Print Services database tables.
(Print Services deletes any print requests that
completed more than 60 seconds ago or any
print requests that were cancelled more than 10
minutes ago.)
PRI_err_no_such_service <87,0,6> Either the service name given in a call or the
service name specified in the print_config file
does not exist in the NCH database. The service
name is either the name of an application
service, a print cache, or a printer.

December 1996 WAL for Windows Programmer’s Reference Manual 110


4 Error Messages
Remote Print

Constant Tuple Description


PRI_err_invalid_page_range <87,0,7> A request was made to print a specific number
of pages in a document and some or all of those
pages do not exist. A print request initiation can
either specify a first and last page of 0, which
means that all pages will be printed, or it can
specify a specific first and last page. If the
specific first and last page given are outside the
range of pages in the document or if the first
page is greater than the last page, this error is
returned.
PRI_err_invalid_parameter <87,0,8> One or more parameters of the RPC were
invalid.
PRI_err_invalid_staple <87,0,9> The selected printer is not physically capable of
stapling. (Currently, there are no printers with
this capability.)
PRI_err_invalid_two_sided <87,0,10> The selected printer is not physically capable of
printing on both sides. (Currently, there are no
printers with this capability.)
PRI_err_invalid_priority <87,0,11> Priority must be in the range of 0 through 9.
PRI_err_invalid_fax_collate <87,0,12> Invalid option for fax.
PRI_err_invalid_fax_form <87,0,13> Invalid option for fax.
PRI_err_invalid_pri_form <87,0,14> Selected form name size is invalid.
PRI_err_invalid_fax_copies <87,0,15> Invalid option for fax.
PRI_err_invalid_pri_copies <87,0,16> The number of copies to print is larger than an
unsigned short.
PRI_err_invalid_note <87,0,17> Selected note option size is out of range.
PRI_err_invalid_req_header <87,0,18> Selected request header is invalid.
PRI_err_invalid_doc_header <87,0,19> Selected document header is invalid.
PRI_err_invalid_fax_scaling <87,0,20> Invalid option for fax.
PRI_err_invalid_pri_scaling <87,0,21> The scaling value must be in the range 0 to 6.
PRI_err_invalid_fax_orientation <87,0,22> Invalid option for fax.
PRI_err_invalid_pri_orientation <87,0,23> The orientation value must be in the range 0 to
3.
PRI_err_invalid_fax_overlay <87,0,24> Invalid option for fax.

December 1996 WAL for Windows Programmer’s Reference Manual 111


4 Error Messages
Remote Print

Constant Tuple Description


PRI_err_invalid_pri_overlay <87,0,25> Invalid overlay option.
PRI_err_invalid_pri_phone <87,0,26> You can only specify phone number to a fax call.
PRI_err_invalid_fax_phone <87,0,27> Specified fax phone number is not valid.
PRI_err_invalid_pri_headline <87,0,28> Head line message too long.
PRI_err_invalid_fax_headline <87,0,29> Head line message too long.
PRI_err_invalid_pri_mode <87,0,30> Tried to send a print job to a fax machine.
PRI_err_invalid_fax_mode <87,0,31> Tried to send a fax job to a printer.
PRI_err_invalid_pri_footnote <87,0,32> The footnote option is only available for fax
requests.
PRI_err_invalid_status <87,0,33> Not a defined print status.
PRI_err_invalid_status_cancel <87,0,34> Cancel request is not allowed on the current
print status.
PRI_err_bad_version <87,1,1> Bad abstract link version.
PRI_err_internal_rpc_error <87,1,2> Internal RPC error occurred.
PRI_err_not_debugging <87,1,3> Debugging operation requested from non-
debugging PRI.
PRI_err_connection_already_open <87,1,4> Connection already open when attempting to
open PRI connection.
PRI_err_connection_not_open <87,1,5> Connection not open when attempting to close
PRI connection.
PRI_err_no_notify_waiting <87,1,6> There is no notification pending for this request.
PRI_err_request_cancelled <87,1,7> The given request has been cancelled.
PRI_err_no_such_printer <87,1,8> The specified printer is not known to this
service.
PRI_err_invalid_pointer <87,1,9> The client tried to free an area using an invalid
pointer.
PRI_err_notify_timeout <87,1,10> The asynchronous notify time-out has expired.
PRI_err_invalid_request <87,1,11> Requested operation is invalid (system/request
status improper).
PRI_err_invalid_annotation <87,1,12> The annotation returned from DOC is in an
invalid format.

December 1996 WAL for Windows Programmer’s Reference Manual 112


4 Error Messages
Query Match Report

Constant Tuple Description


PRI_err_invalid_data_file <87,1,13> The specified file is empty (you cannot print an
empty file).
PRI_err_no_faxes_defined_or_up <87,1,14> No fax devices are defined or none have status
of available.
PRI_err_no_printers_defined_or_up <87,1,15> No printers are defined or none have status of
available.
PRI_err_no_printer_by_that_name <87,1,16> No printer (or fax device) exists with the name
specified.
PRI_err_invalid_paper_size <87,1,17> No printers (or fax devices) handle the paper
size specified.
PRI_err_invalid_option_for_fax <87,1,18> One of the options specified is invalid for a fax
request.
PRI_err_invalid_option_for_printer <87,1,19> One of the options specified is invalid for a print
request.
PRI_err_no_printers_for_options <87,1,20> No printers (or fax devices) can satisfy all
options specified.
PRI_err_name_must_be_given <87,1,21> Printer security is enforced, a printer name is
mandatory.
PRI_err_outbox_timeout <87,2,1> Timed out during retrieval of doc requiring
operator intervention.
PRI_err_inbox_timeout <87,2,2> Timed out while trying to retrieve an in-box
document.

Query Match Report


Defined in qmr.i.

Constant Tuple Description


QMR_Write_Fail <99,0,20> Error writing to match report file.
QMR_Unknown_IX <99,0,21> Unknown index.
QMR_DIR_No_ DCID <99,0,22> Document index record has no Doc Class ID.
QMR_Lock_Failed <99,0,23> Global lock failed (possibly low memory).
QMR_No_Mem <99,0,24> Global Alloc failed (possibly low memory).
QMR_No_QMR_File <99,0,25> Match report file missing.

December 1996 WAL for Windows Programmer’s Reference Manual 113


4 Error Messages
Query Match Report

Constant Tuple Description


QMR_Full <99,0,26> Match report has maximum allowable number of
matches.
QMR_Bad_EntryNo <99,0,27> Bad entry number.
QMR_No_Entry <99,0,28> No entry number.
QMR_Bad_Offset <99,0,29> Bad offset.
QMR_EOF <99,0,30> Unexpected end of match report file.
QMR_No_Wnd <99,0,31> Create window failed.
QMR_No_Help <99,0,32> Help is unavailable.
QMR_Init_Failed <99,0,33> Initialization failed.
QMR_Print_Ini <99,0,34> Printer initialization failed.
QMR_Create_DC <99,0,35> Create Display Context failed (possibly low
memory).
QMR_Print_Disk <99,0,36> Printing disk error.
QMR_Print_Mem <99,0,37> Printing memory error.
QMR_Print_Err <99,0,38> Printing error.
QMR_No_Matches <99,0,39> Match report is empty.
QMR_Cant_Spawn_Prt <99,0,40> Unable to spawn Printsrv (possibly low memory).
QMR_bad_handle <99,0,41> Invalid handle.
QMR_bad_dde_topic <99,0,42> Unsupported DDE topic.
QMR_bad_dde_atom <99,0,43> Invalid DDE atom.
QMR_bad_dde_format <99,0,44> Unsupported clipboard format requested.
QMR_bad_dde_msg <99,0,45> Unsupported DDE transaction requested.
QMR_indxform_load_err <99,0,46> Index library load error.
QMR_indxform_fn_not_found <99,0,47> Indexform function not found.
QMR_FN_File_Create_Fail <99,0,48> Failed to create the match report file.
QMR_Read_Fail <99,0,49> Failed to read the match report file.
QMR_FN_File_Write_Fail <99,0,50> Failed to write the match report file.
QMR_Load_Lib_Error <99,0,51> Unable to load one of the DLL library. Should
check path.

December 1996 WAL for Windows Programmer’s Reference Manual 114


4 Error Messages
Retrieval Data Dictionary

Constant Tuple Description


QMR_Proc_Address_Error <99,0,52> Unable to get the DLL function address. Might be
caused by a typo of the function name.
QMR_Bad_Ret_Period <99,0,53> Invalid retention period specified.
QMR_Bad_Sec_Name <99,0,54> Invalid access restriction specified.
QMR_custom_form_not_found <99,0,55> Unable to find custom form file.
QMR_User_Cancelled <99,0,56> User chose cancel.
QMR_No_Text_In_Field <99,0,57> Must choose an index name.
QMR_enry_not_exist <99,0,58> Could not find the document. Verify that the
document still exists.

Retrieval Data Dictionary


Defined in rdd.i.

Error Number Constant Tuple Description


RDD_DCLASS_NOT_FOUND <44,0,1> Document class not found.
RDD_UNABLE_TO_LOCK <44,0,2> Global lock failed.
RDD_IX_NOT_FOUND <44,0,3> Index not found.
RDD_INIT <44,0,4> Initialization error.
RDD_INVALID_IX <44,0,5> Invalid index.
RDD_KEY_IX_NOT_FOUND <44,0,6> Key index not found.
RDD_MENUITEM_NOT_FOUND <44,0,7> Menu item not found.
RDD_MENU_NOT_FOUND <44,0,8> Menu not found.
RDD_NO_RET <44,0,9> No data returned from internal call.
RDD_NO_DEF_DCLASSES <44,0,10> No document classes.
RDD_UNABLE_TO_ALLOC <44,0,11> Not enough memory.
RDD_TOO_MANY_HANDLES <44,0,12> Too many handles.
RDD_UNEXPECTED_NO_IXS <44,0,13> Unexpected number of indices.
RDD_RECORD_NOT_LOCATED <44,0,14> Record not located (internal error).
RDD_IAFLIB_LOAD_ERROR <44,0,15> IAFLIB load error.
RDD_IAFLIB_FUNCTION_NOT_FOUND <44,0,16> IAFLIB function not found.

December 1996 WAL for Windows Programmer’s Reference Manual 115


4 Error Messages
Restore

Error Number Constant Tuple Description


RDD_INXLIB_LOAD_ERROR <44,0,17> INXLIB load error.
RDD_INXLIB_FUNCTION_NOT_FOUND <44,0,18> INXLIB function not found.
RDD_SERVNAME_LOAD_ERROR <44,0,19> SERVNAME load error.
RDD_SERVNAME_FUNCTION_NOT_FOUND <44,0,20> SERVNAME function not found.
RDD_UNABLE_TO_REALLOC <44,0,21> Memory reallocation failure.
RDD_DISPLAY_NOT_RESERVED <44,0,22> Display instance not reserved.
RDD_DISPLAY_ALREADY_USED <44,0,23> Display instance already used.
RDD_CREATE_FILE <44,0,24> Create file failed.
RDD_READ_FILE <44,0,25> Read file failed (recoverable).
RDD_WRITE_FILE <44,0,26> Write file failed.
RDD_SG_SYNC_FAILED <44,0,27> Shared global memory synchronization
failed.
RDD_REFCOUNT_ERROR <44,0,28> All reference counts are not released.
RDD_LIST_OVERUN <44,0,29> RDD list overflow, too many servers.
RDD_FILEMAPPING_FAILED <44,0,30> Memory mapping function failed.

Restore
Defined in restlib.i.

Constant Tuple Description


RESTLIB_No_Mem <96,0,1001> Not enough memory.
RESTLIB_Lock_Failed <96,0,1002> Global lock failed (not enough memory?).
RESTLIB_File_Create <96,0,1003> Couldn’t create a file.
RESTLIB_File_Read <96,0,1004> Couldn’t read a file.
RESTLIB_File_Write <96,0,1005> Couldn’t write a file.
RESTLIB_No_Files <96,0,1006> No files specified.
RESTLIB_Not_Archive <96,0,1007> Not an archive document.
RESTLIB_Cannot_Prompt <96,0,1008> Attempt to prompt user failed.
RESTLIB_User_Cancel <96,0,1009> User cancelled (not an error).

December 1996 WAL for Windows Programmer’s Reference Manual 116


4 Error Messages
SCT

Constant Tuple Description


RESTLIB_OutOfRange <96,0,1010> File index out of range for this archive.
RESTLIB_No_Files_Restored <96,0,1011> No files restored.

SCT
Defined in sct.def

Constant Tuple Description


SCT_BadVersion <92,1,1> Bad version.
SCT_BadDatabase <92,1,2> Bad database.
SCT_BadUserName <92,2,1> Bad user name.
SCT_BadPassword <92,2,2> Bad password.
SCT_BadTerminal <92,2,3> Bad terminal.
SCT_NotMember <92,2,4> Not member.
SCT_ReadDenied <92,2,5> Read denied.
SCT_WriteDenied <92,2,6> Write denied.
SCT_AppendOrExecuteDenied <92,2,7> Append or execute denied.
SCT_GroupNotFound <92,2,8> Group not found.
SCT_NotEnoughSpaceForCopy <92,2,9> Not enough space for copy.
SCT_CannotDecodeAR <92,2,10> Cannot decode access restrictions.
SCT_BadHandle <92,2,11> Bad handle.
SCT_BadLanguageName <92,2,12> Bad language name.
SCT_CredentialsExpired <92,3,1> Credentials expired.
SCT_VerifierExpired <92,3,2> Verifier expired.

December 1996 WAL for Windows Programmer’s Reference Manual 117


4 Error Messages
Security

Security
Defined in secdefs.h.

Constant Tuple Description


SEC_err_invalid_session_handle <118,0,2> Invalid session handle. Handle is not from
an SEC_logon() call, or session has timed
out.
SEC_err_invalid_info_type <118,0,3> Invalid Infotype.
SEC_err_predefined_group <118,0,4> Cannot delete a system defined group.
SEC_err_record_not_found <118,0,5> The specified database record not found.
SEC_err_name_already_exists <118,0,6> This user name already exists in the
database.
SEC_err_invalid_name <118,0,7> Invalid format in specified name.
SEC_err_max_members_exceeded <118,0,8> Maximum number of members has been
exceeded.
SEC_err_invalid_parameter <118,0,9> One or more parameters passed were
invalid.
SEC_err_access_denied <118,0,10> Not authorized to execute the requested
command.
SEC_err_duplicate_logon <118,0,11> A duplicate log on was performed.
SEC_err_max_sessions <118,0,13> The user has already reached the maximum
allowable number of sessions.
SEC_err_cant_remove_inheritance <118,0,14> Cannot remove inheritance if logged on.
SEC_err_cant_decode_AR <118,0,100> SEC could not decode the access
restriction.
SEC_err_invalid_nbr_options <118,0,101> Too many options were passed for this data
structure.
SEC_err_invalid_object_class <118,0,102> An invalid object class was specified.
SEC_err_invalid_device_class <118,0,103> An invalid device class was specified.
SEC_err_invalid_admin_class <118,0,104> An invalid administrative class was
specified.
SEC_err_invalid_time <118,0,105> An invalid start/end log on time was
specified.

December 1996 WAL for Windows Programmer’s Reference Manual 118


4 Error Messages
Security

Constant Tuple Description


SEC_err_invalid_sess_override <118,0,106> An invalid session override value was
specified.
SEC_err_invalid_max_sessions <118,0,107> An invalid max-sessions value was passed
to SEC.
SEC_err_duplicate_object <118,0,108> A duplicate object already exists in the data
base.
SEC_err_invalid_object_name <118,0,109> The object name provided was in an
incorrect format.
SEC_err_invalid_comments <118,0,110> The comment length provided exceeded the
maximum allowable.
SEC_err_invalid_object_filter <118,0,111> An invalid object filter was passed to SEC.
SEC_err_invalid_system_filter <118,0,112> An invalid system filter was passed to SEC.
SEC_err_invalid_log <118,0,113> An invalid log field was passed to SEC.
SEC_err_invalid_dev_security <118,0,114> An invalid device security value was passed
to SEC.
SEC_err_invalid_func_def <118,0,115> An invalid no-function-definition-ok value
was passed to SEC.
SEC_err_invalid_pwd_spec_char <118,0,116> An invalid password-special-character value
was passed to SEC.
SEC_err_invalid_pwd_min_length <118,0,117> An invalid password minimum length value
was passed to SEC.
SEC_err_invalid_pwd_aging <118,0,118> An invalid password aging value was
passed to SEC.
SEC_err_invalid_pwd_attempts <118,0,119> An invalid number of password attempts
was passed to SEC.
SEC_err_invalid_pwd_suspending <118,0,120> An invalid password-suspending time was
passed to SEC.
SEC_err_invalid_pwd_memory <118,0,121> An invalid password-memory time limit was
passed to SEC.
SEC_err_invalid_key_num <118,0,122> An incorrect key_num type was passed to
SEC.
SEC_err_invalid_member_deletion <118,0,123> The member ID and group ID were identical.
This is illegal.
SEC_err_no_such_service <118,0,124> The service specified does not exist.

December 1996 WAL for Windows Programmer’s Reference Manual 119


4 Error Messages
Security

Constant Tuple Description


SEC_err_device_access_denied <118,0,125> The device security prevents access.
SEC_err_not_user <118,0,126> The object is required to be of the user
class.
SEC_err_invalid_device_name <118,0,127> The device name provided is in an incorrect
format.
SEC_err_bad_magic <118,0,128> A bad magic number was discovered in
memory.
SEC_err_invalid_comments_search <118,0,129> Searching for a comment is not a supported
feature.
SEC_err_user_expired <118,0,130> The account has expired and is no longer
valid.
SEC_err_invalid_password <118,0,131> The password provided does not match that
in the data base.
SEC_err_bad_service <118,0,132> A bad service name was provided.
SEC_err_read_denied <118,0,133> Read permission is denied.
SEC_err_write_denied <118,0,134> Write permission is denied.
SEC_err_ax_denied <118,0,135> Append/execute permission is denied.
SEC_err_illegal_instruction <118,0,136> The function call executed is not legal.
SEC_err_not_member_serv <118,0,137> The requested object does not have a
membership intersection.
SEC_err_invalid_function_name <118,0,138> The function name provided was in an
invalid format.
SEC_err_invalid_logon_time <118,0,139> The calculated duration of this log on
instance has been exceeded.
SEC_err_device_expired <118,0,140> The device specified has exceeded its
expiration date.
SEC_err_group_expired <118,0,141> The group specified has exceeded its
expiration date.
SEC_err_invalid_pwd_renewal_days <118,0,142> The number of renewal days is out of range.
SEC_err_invalid_grace_period <118,0,143> The specified grace period is out of range.
SEC_err_invalid_failure_mins <118,0,144> The specified number of failure minutes is
out of range.

December 1996 WAL for Windows Programmer’s Reference Manual 120


4 Error Messages
Security

Constant Tuple Description


SEC_err_invalid_search_param <118,0,145> The parameter specified is not a search
filter.
SEC_err_primary_not_found <118,0,146> The primary group specified was not found.
SEC_err_invalid_primary <118,0,147> The primary group specified is not a group.
SEC_err_invalid_conditional <118,0,148> The conditional operator specified is invalid.
SEC_err_invalid_sysopt <118,0,149> An invalid system option was provided.
SEC_err_invalid_objopt <118,0,150> An invalid object option was provided.
SEC_err_system_not_found <118,0,151> The system defaults information could not
be found.
SEC_err_group_not_found <118,0,152> The group information could not be found.
SEC_err_deleted_not_found <118,0,153> The deleted object information could not be
found.
SEC_err_object_not_found <118,0,154> The user, group, or device object
information could not be found.
SEC_err_duplicate_group <118,0,155> The group-member in the data base already
exists.
SEC_err_duplicate_deleted <118,0,156> The specified object has already been
deleted.
SEC_err_duplicate_system <118,0,157> The specified system structure already
exists in the data base.
SEC_err_invalid_system_options <118,0,158> The system option list provided is invalid.
SEC_err_invalid_option_update <118,0,159> The specified option to update is not
allowed.
SEC_err_invalid_title <118,0,160> The title option is in an invalid format.
SEC_err_invalid_form <118,0,161> The form option is in an invalid format.
SEC_err_invalid_tmask <118,0,162> The tmask option is in an invalid format.
SEC_err_invalid_dmask <118,0,163> The dmask option is in an invalid format.
SEC_err_invalid_nmask <118,0,164> The nmask option is in an invalid format.
SEC_err_invalid_mmask <118,0,165> The mmask option is in an invalid format.
SEC_err_invalid_language <118,0,166> The system language option is in an invalid
format.
SEC_err_function_not_found <118,0,167> The specified function name was not found.

December 1996 WAL for Windows Programmer’s Reference Manual 121


4 Error Messages
Security

Constant Tuple Description


SEC_err_funcmbr_not_found <118,0,168> The specified function member combination
was not found.
SEC_err_duplicate_function <118,0,169> The specified function name already exists.
SEC_err_duplicate_funcmbr <118,0,170> The specified function member combination
already exists.
SEC_err_funcmbr_out_of_sync <118,0,171> The function IDs or member IDs are out-of-
sync.
SEC_err_invalid_min_range <118,0,172> The specified minute range is invalid.
SEC_err_invalid_hour_range <118,0,173> The specified hour range is invalid.
SEC_err_invalid_dweek_range <118,0,174> The specified day of week range is invalid.
SEC_err_invalid_call <118,0,175> The executed entry-point is not supported in
this state.
SEC_err_invalid_handle_ssn <118,0,176> The ssn stored in the handle is invalid.
SEC_err_pwd_attempts_exceeded <118,0,177> The number of allowable failed password
attempts has been exceeded.
SEC_err_password_expired <118,0,178> The password has expired.
SEC_err_no_special_char <118,0,179> The specified password requires a special
character.
SEC_err_invalid_handle <118,0,180> The specified handle should be non-null.
SEC_err_invalid_tag_type <118,0,181> The buffer tag definition is not of a
recognized type.
SEC_err_obj_update_denied <118,0,182> The object update is denied.
SEC_err_member_add_denied <118,0,183> The member addition is denied.
SEC_err_obj_delete_denied <118,0,184> The object deletion is denied.
SEC_err_terminate_logon_denied <118,0,185> The termination of a log on is denied due to
inadequate permissions.
SEC_err_pwd_update_denied <118,0,186> The password update is denied due to
inadequate permissions.
SEC_err_member_delete_denied <118,0,187> The deletion of the specified member from
the group is denied.
SEC_err_obj_add_denied <118,0,188> The addition of the specified object is
denied.

December 1996 WAL for Windows Programmer’s Reference Manual 122


4 Error Messages
Security

Constant Tuple Description


SEC_err_func_add_denied <118,0,189> The user does not have permission to add a
function.
SEC_err_func_delete_denied <118,0,190> The user does not have permission to delete
a function.
SEC_err_fmbr_add_denied <118,0,191> The user does not have permission to add a
function member.
SEC_err_fmbr_delete_denied <118,0,192> The user does not have permission to delete
a function member.
SEC_err_too_many_termids <118,0,193> The terminal identifier maximum has been
reached for this server.
SEC_err_invalid_termid <118,0,194> An invalid terminal identifier was detected.
SEC_err_groups_out_of_sync <118,0,195> The member /group relationship in the
groups table is out of sync.
SEC_err_cannot_update_primary <118,0,197> Changing the primary group of a group is an
illegal operation.
SEC_err_maximum_logons_reached <118,0,198> The concurrent license limit has been
reached.
SEC_err_invalid_terminal_name <118,0,199> The terminal name provided is in an
incorrect format.
SEC_err_invalid_password_opt <118,0,201> The semantic use of the password option is
invalid.
SEC_err_invalid_admin_group_opt <118,0,202> It is illegal to add or update the admin group.
SEC_err_invalid_exp_time_opt <118,0,203> You are not allowed to search for an object
by expiration time.
SEC_err_invalid_success_opt <118,0,204> You are not allowed to update an object by
success_where.
SEC_err_invalid_failed_opt <118,0,205> You are not allowed to update or add an
object by failed_where.
SEC_err_invalid_error_opt <118,0,206> You are not allowed to update or add an
object by its failure error.
SEC_err_invalid_comments_opt <118,0,207> You are not allowed to search for an object
by its comment field.
SEC_err_invalid_admin_opt <118,0,208> You cannot set the admin class for a non-
user/system object.

December 1996 WAL for Windows Programmer’s Reference Manual 123


4 Error Messages
Security

Constant Tuple Description


SEC_err_invalid_language_opt <118,0,209> You are not allowed to add or update the
language of a non-user/system.
SEC_err_invalid_dev_class_opt <118,0,210> You are not allowed to set the device class
for a non-device/system.
SEC_err_invalid_obj_class_opt <118,0,211> You are not allowed to change the object
class of an existing object.
SEC_err_invalid_max_sess_opt <118,0,212> You are not allowed to set the maximum
sessions for a device object.
SEC_err_cannot_specify_pri mary <118,0,213> You are not allowed to specify a primary
group for a group object.
SEC_err_invalid_time_range <118,0,214> You specified an invalid time combination
for the dweek/min/hour values.
SEC_err_obj_read_denied <118,0,215> The user does not have the admin
permission required to read the object.
SEC_err_sys_read_denied <118,0,216> The user does not have the admin
permission required to read the system
defaults.
SEC_err_mbr_read_denied <118,0,217> The user does not have the admin
permission required to read the member list.
SEC_err_grp_read_denied <118,0,218> The user does not have the admin
permission required to read the group list;
the user must be of an administrative class
to view function membership.
SEC_err_fun_read_denied <118,0,219> The user does not have the admin
permission required to read the function list;
the user must be of an administrative class
to view function membership.
SEC_err_fmbr_read_denied <118,0,220> The user does not have the admin
permission required to read the function
members; the user must be of an
administrative class to view function
members.
SEC_err_pwd_len_out_of_range <118,0,221> The length of the password provided is out
of range. A password can have 0 to 8
characters.

December 1996 WAL for Windows Programmer’s Reference Manual 124


4 Error Messages
Security

Constant Tuple Description


SEC_err_bad_filename <118,0,222> An error occurred when attempting to open
the specified file.
SEC_err_bad_import_version <118,9,223> The import version contained in the import
file is not recognized.
SEC_err_invalid_char_set <118,0,224> The export file has a different default char
set than the import system. An export/import
must be performed across systems which
have the same default char set; it is not
possible to convert systems across different
char sets due to encrypted password
incompatibilities.
SEC_err_bad_import_format <118,0,226> The import file is in an incorrect format. The
import file may be corrupt or may have been
manually edited.
SEC_err_invalid_import_param <118,0,227> Import parameters are missing or invalid.
SEC_err_invalid_domain <118,0,228> The domain name length cannot be more
than 20 characters.
SEC_err_conflicting_obj_class <118,0,229> The import object class conflicts with that of
an existing object. The import cannot
continue.
SEC_err_invalid_service_name <118,0,230> An invalid security service name was
provided.
SEC_err_export_denied <118,0,231> A user who is not SysAdmin attempted to
export the security database.
SEC_err_import_denied <118,0,232> A user who is not SysAdmin attempted to
import the security database.
SEC_err_stale_session <118,0,234> The session handle is stale. The security
service was rebooted.Typically, this error is
seen only internal to the security service so
that the client can determine if it needs to re-
log on to the security service after a server
reboot.
SEC_err_invalid_relogon <118,0,235> The re-log on information provided to the
security service by the client is inaccurate.
SEC_err_admingrp_not_found <118,0,236> The provided admin group does not exist in
the security database.

December 1996 WAL for Windows Programmer’s Reference Manual 125


4 Error Messages
Security

Constant Tuple Description


SEC_err_invalid_admingrp_opt <118,0,237> The admin group option cannot have an id of
0 (NONE), 1 (ANYONE), or 6
(UNDEFINED).
SEC_err_invalid_admingrp <118,0,238> The provided admin group is not a group.
SEC_err_invalid_epassword <118,0,239> The encrypted password in the database
consists of nulls.
SEC_err_missing_license <118,0,240> The concurrent license is either expired or
missing.
SEC_err_pid_not_found <118,0,250> The fnfork program could not find the pid in
the term_id list.
SEC_err_invalid_pc_admin <118,0,252> Only the SysAdmin user can perform this
operation.
SEC_err_sessgrp_not_found <118,0,252> The specified session group does not exist
in the security database.
SEC_err_invalid_sessgrp <118,0,253> The session group supplied is not a group.
SEC_err_invalid_allow_override <118,0,254> An illegal value was provided for the allow_
override field.
SEC_err_cannot_specify_sessgrp <118,0,255> It is illegal to add or update a session group
for a group or device object.
SEC_err_namemap_not_found <118,0,256> The database name map information could
not be found.
SEC_err_dbinfo_not_found <118,0,257> The database name information could not
be found.
SEC_err_duplicate_namemap <118,0,258> The FileNet to database name map
information already exists.
SEC_err_duplicate_dbinfo <118,0,259> The database map name already exists.
SEC_err_invalid_db_filter <118,0,260> The dbinfo table search filter is not
recognized.
SEC_err_invalid_dbpassword <118,0,261> The database password is in an incorrect
format.
SEC_err_invalid_dbname <118,0,262> The database name provided is in an
incorrect format.
SEC_err_db_delete_denied <118,0,263> The user does not have permission to delete
a dbinfo record.

December 1996 WAL for Windows Programmer’s Reference Manual 126


4 Error Messages
Security

Constant Tuple Description


SEC_err_db_update_denied <118,0,264> The user does not have permission to
update a dbinfo record.
SEC_err_db_add_denied <118,0,265> The user does not have permission to add a
dbinfo record.
SEC_err_dbmap_denied <118,0,266> The user does not have permission to map
to a db user.
SEC_err_invalid_dbopt <118,0,267> The option specified is not valid.
SEC_err_cannot_specify_dbmap <118,0,268> It is illegal to specify a db name map for a
non-user.
SEC_err_invalid_pointer <118,0,269> The pointer passed is NULL.
SEC_err_invalid_nbr_bytes <118,0,270> The number of bytes value is zero.
SEC_err_nomap <118,0,271> The requesting user is refused access to the
native database.
SEC_err_not_member <118,1,1> Bad abstract link version when calling SEC.
SEC_err_no_access <118,1,2> Internal RPC error occurred in SEC.
SEC_err_no_resources <118,1,95> Access denied.
SEC_err_bad_version <118,1,96> Logged on user is not a member of specified
group.
SEC_err_internal_rpc_error <118,1,97> Not enough memory to hold return values.
SEC_mem_err <118,1,98> Memory allocation failed.
SEC_lock_err <118,1,99> Failed to lock memory segment.

December 1996 WAL for Windows Programmer’s Reference Manual 127


4 Error Messages
Security Management

Security Management
Defined in secman.i.

Constant Tuple Description


SECMAN_errBadHandle <92,0,2001> Invalid session handle.
SECMAN_errCannotLockMem <92,0,2002> Cannot lock memory.
SECMAN_errNoMemory <92,0,2003> Cannot allocate memory.
SECMAN_errMaxListSizeReached <92,0,2005> Maximum number of concurrent SEC
sessions has been reached. Currently,
you can have up to 32 concurrent SEC
sessions.
SECMAN_errMemoryCorrupted <92,0,2006> The session handle memory has become
corrupted.
SECMAN_errFuncNotFound <92,0,2007> Cannot find the function in DLL.
SECMAN_errCannotLoadLibrary <92,0,2008> Cannot load the specified DLL.
SECMAN_errSessionNotEstablished <92,0,2009> The SEC session has not yet been
established.

Service Name
Defined in servname.i.

Constant Tuple Description


SVN_NOMEM <156,10,1> Insufficient memory.
SVN_CANCELLED <156,10,2> User cancelled (not an error).
SVN_BAD_PROPLEVEL <156,10,3> Clearinghouse property level mismatch.
SVN_BAD_SVC_TYPE <156,10,4> Invalid service type code.
SVN_BAD_SVC_NAME <156,10,5> Invalid service name.
SVN_BAD_STRUCT <156,10,6> Invalid IMSDlgInfo structure.
No message is returned from MSG (3.1).
SVN_BAD_USER_NAME <156,10,7> Invalid user name.
SVN_CONFIRMED <156,10,99> Object name confirmed (not an error).

December 1996 WAL for Windows Programmer’s Reference Manual 128


4 Error Messages
SLACLIB

SLACLIB
Defined in slaclib.i.

Constant Tuple Description


SLACLIB_key_exists <163,4,101> Key already exists.
SLACLIB_key_n ot_found <163,4,102> Key not found.
SLACLIB_key_table_full <163,4,103> Key table is full.
SLACLIB_invalid_table <163,4,104> Invalid table.
SLACLIB_invalid_attr <163,4,110> Invalid attribute specified.
SLACLIB_hwnd_required <163,4,111> HWND required.
SLACLIB_disabled <163,4,120> SLACLIB is disabled.
SLACLIB_OCX_mismatch <163,4,130> OCX register/unregister mismatch.

TTY
Defined in ttylib.i.

Constant Tuple Description


TTY_bad_tty_handle <117,0,1> Bad handle.
TTY_no_memory <117,0,2> No memory.
TTY_no_window <117,0,3> No window.
TTY_win_open <117,0,4> Window open.
TTY_bad_position <117,0,5> Bad position.
TTY_no_timer <117,0,6> No timer.
TTY_map_too_big <117,0,7> Map too big.
TTY_softkey_not_available <117,0,8> Softkeys other than F1 to F8 are not available.

December 1996 WAL for Windows Programmer’s Reference Manual 129


4 Error Messages
WorkFlo Queue Services

WorkFlo Queue Services


Defined in wqsdef.h.

Constant Tuple Description


WQS_err_no_resources <151,0,1> Insufficient resources.
WQS_err_invalid_service_handle <151,0,2> Invalid service handle.
WQS_err_invalid_queue_handle <151,0,3> Invalid queue handle.
WQS_err_invalid_dump_handle <151,0,4> Invalid dump handle.
WQS_err_queue_not_empty <151,0,5> Queue is not empty.
WQS_err_queue_in_use <151,0,6> Queue is in-use.
WQS_err_queue_not_defined <151,0,7> Undefined queue.
WQS_err_invalid_user_field <151,0,8> Invalid user field.
WQS_err_invalid_sys_field <151,0,9> Invalid system field.
WQS_err_invalid_sys_field_data <151,0,10> Invalid system field data.
WQS_err_field_specified_twice <151,0,11> Field specified more than once.
WQS_err_illegal_write_field <151,0,12> Illegal write field - status.
WQS_err_required_field_missing <151,0,13> Required field missing.
WQS_err_rendez_field_missing <151,0,14> Rendezvous field missing.
WQS_err_no_entry_selected <151,0,15> No entry selected.
WQS_err_bad_version <151,0,16> Version error.
WQS_err_service_not_available <151,0,17> The named service is undefined.
WQS_err_queue_already_defined <151,0,18> Queue already defined.
WQS_err_queue_not_open <151,0,19> Queue is not open.
WQS_err_corrupted_queue_file <151,0,20> Corrupted queue field.
WQS_err_26_conversion <151,0,21> Pre-2.6.3 format conversion error.
WQS_err_security_violation <151,0,22> Security violation.
WQS_err_invalid_field_type <151,0,23> Invalid field type.
WQS_err_db_open <151,0,24> Database open error.
WQS_err_db_logon <151,0,25> Database log on error.
WQS_err_invalid_entry_id <151,0,26> Invalid entry-id.

December 1996 WAL for Windows Programmer’s Reference Manual 130


4 Error Messages
WorkFlo Queue Services

Constant Tuple Description


WQS_err_invalid_find_field <151,0,27> The fetch spec contains an undefined user-
field.
WQS_err_field_desc_change <151,0,29> Illegal field definition change.
WQS_err_internal_rpc_error <151,0,30> Internal RPC error.
WQS_err_table_not_built <151,0,31> Database error - table not built.
WQS_err_no_cursor_open <151,0,32> Database error - no cursor opened.
WQS_err_entry_not_tagged <151,0,33> Internal error - entry not tagged.
WQS_err_cursor_too_large <151,0,34> Cursor too large.
WQS_err_invalid_workspace <151,0,35> The specified workspace does not exist.
WQS_err_load_new_queue_desc <151,0,36> Error while loading new queue desc.
WQS_err_workspace_not_created <151,0,37> Create workspace failed.
WQS_err_workspace_not_deleted <151,0,38> Workspace not deleted - possibly not-empty.
WQS_err_invalid_field_value <151,0,39> Invalid field value detected on insertion.
WQS_err_invalid_queue_desc <151,0,40> Queue description contains invalid data.
WQS_err_dup_unique_val <151,0,41> An entry already exists with the same value
for a unique field.
WQS_err_invalid_field_length <151,0,42> Fields of type string or selection cannot be
zero length.
WQS_err_local_func_only <151,0,43> Function can only be run on local server.
WQS_err_wrong_server <151,0,44> Must log on to the server responsible for the
queue.
WQS_err_row_busy <151,0,45> Selected row is busy (status flag set).
WQS_err_invalid_security_id <151,0,46> An ID in the access restriction list is invalid.
WQS_err_bad_workspace_name <151,0,47> Workspace names must begin with a letter
(upper or lower case).
WQS_err_all_qs_must_be_closed <151,0,48> All queues in the workspace must be closed
for this operation.
WQS_err_illegal_new_name <151,0,49> Qinstall: <new name> must be NULL when
<old name> contains wild-card characters.
WQS_err_queue_def_changed <151,0,50> Definition of the queue changed while the
session was timed out.
WQS_err_bogus_session_handle <151,0,51> The session handle is invalid.

December 1996 WAL for Windows Programmer’s Reference Manual 131


4 Error Messages
WorkFlo Queue Services

Constant Tuple Description


WQS_err_corrupted_ws_desc <151,0,52> The workspace description file is corrupted.
WQS_err_invalid_null_domain <151,0,53> A domain name parameter cannot be NULL
in client libraries.
WQS_err_invalid_area_magic <151,0,54> The area to be freed has invalid area magic
or type.
WQS_err_err_no_user_field <151,0,55> Same area might have been freed twice, or
pointer is invalid.
WQS_err_err_illegal_to_drop_field <151,0,56> The number of user fields in an updated
queue description is less than the original.
Make sure to describe each and every field in
the original order, whether changed or not.
Fields to be added should follow the original
fields.
WQS_err_invalid_sort_field <151,0,57> The specified sort field is not a valid user-
defined field for the queue.
WQS_err_too_many_opened_queues <151,0,58> Too many queues opened.
WQS_err_ws_already_defined <151,0,59> The specified workspace is already defined.
WQS_err_needs_file_to_db_convert <151,0,60> The specified queue has a file based
description and must be converted.
WQS_err_invalid_server_number <151,0,61> The service number is invalid. The WQS
Service must not be assigned a number
greater than 999.
WQS_err_invalid_table_name <151,0,62> The specified or generated tale name is too
long.
WQS_err_cannot_modify_field <151,0,63> This database does not support modifying
existing fields.
WQS_err_wqss_memory_limit <151,0,64> WQSs process exiting: exceeded memory
limit from environment (WQS_MEM_LIMIT).
WQS_err_invalid_field_unique_type <151,0,71> Invalid field unique type.
WQS_err_sql_overflow <151,0,74> Internal error: SQL statement overflowed
buffer.
WQS_err_different_servers <151,0,75> The two queues specified must reside on the
same server.
WQS_err_not_rendez <151,0,76> Function not allowed on rendezvous queue.

December 1996 WAL for Windows Programmer’s Reference Manual 132


4 Error Messages
WorkFlo Queue Services

Constant Tuple Description


WQS_err_cannot_update_two <151,0,77> WQS_update_selected must specify unique
entry - two entries found.
WQS_err_load_library_failed <151,0,1001> Unable to link to F3WQS DLL at runtime.
WQS_err_get_proc_addr_failed <151,0,1002> Can not find the function in F3WQS DLL at
runtime.

December 1996 WAL for Windows Programmer’s Reference Manual 133


4 Error Messages
WorkFlo Queue Services

134 WAL for Windows Programmer’s Reference Manual December 1996


5
5Image Formats

This chapter describes the format of banded images, tiled images, postage
stamp images, and images on optical disk as used by FileNet.

Although this chapter contains sections that reflect creation of an image by


Image Acquisition Interface (IAI), FileNet’s UNIX-based image scanning
subsystem, the format applies to any document, regardless of the actual
creator and subsequent manipulators. This format, though, describes only the
actual image itself. While IAI is acquiring the image, it is wrapped in structures
that manage the memory and expedite image collection. When the image
finally reaches the optical disk, it has been wrapped up in other structures.
The underlying image remains the same in all cases, as discussed below.

This chapter is a primer that introduces and supplements the information


contained in the corresponding header files.

Note WAL for Windows supports some TIFF image formats. If you need more
information, contact FileNet for details about which TIFF image formats are
supported.

Banded Image Format


The traditional FileNet image storage format is the banded image.

Page Layout
Each page is composed of a number of horizontal strips known as bands.
Each band usually contains the same number of scan lines, except for the last
band, which might be short. An A-size banded image usually contains
34 bands of 64 scan lines each. An additional, final band has about 24 lines.
The following figure shows an image divided into bands.

December 1996 WAL for Windows Programmer’s Reference Manual 135


5 Image Formats
Banded Image Format

band 0, 64 scan lines


band 1, 64 scan lines
.
.
.

last band, might have fewer


scan lines

Dividing an Image Into Bands

Memory Format
In memory, a banded image starts with a header that provides general
information about the image. This information includes:

• The height of the image in lines

• The width of the image in pixels

• The number of bands in the image

The banded image header also contains a field to record the resolution of the
image. Note that there are two #defines that refer to a density of 200 SPI. The
most appropriate code to use when creating images is SPI200. The other
code, SPI200A, is provided for compatibility with old documents that were
processed through a rotation routine that zeroed the density field as a side-
effect.

136 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
Banded Image Format

Following the banded image header is an array of band descriptors, one entry
per band. Each entry indicates:

• What type of data is in the band

• The number of lines in the band

• The size of the band, in bytes

Each band is stored in the format that best suits the data inside it. A field in
the band descriptor indicates what type of band is being examined. Most
bands are compressed one-dimensionally (CCITT Group III), without
extension codes. Their band descriptors flag them as CMP_BAND. In
addition, lines in excess of 220 bytes wide are split in half and treated as two
lines. For more information, see “Special Limitations” on page 147.

• Other bands are compressed one-dimensionally, with extension codes.


Their band descriptors are marked MG3_BAND. These bands do not
have the 220-byte width limit.

• As a user option, bands can be compressed two-dimensionally (CCITT


Group IV). Their band descriptors flag them as G4_BAND.

• Some data is stored uncompressed and the area is marked as a RAW_


BAND. IAI creates this type of band when the data in the band causes the
compression algorithm to generate more output data than input. Such a
band is said to have exploded.

• Some bands contain no data. These are marked NULL_BAND. This


usually happens when space is pre-allocated for band descriptors and the
image is shorter than expected.

• Some bands are marked RDC_BAND. This means that the image data in
the band has been reduced 2:1 along each axis. The data itself is stored
uncompressed. In such a band, the band_size field is correct, but the
nlines field reflects the unreduced band. Since the line_width field is
maintained on an image level and not a band level, it also reflects the
unreduced band.

IAI creates this type of band when the image threatens to exceed a
reasonable size limit. Following the array of band descriptors is the image
data (bitmap), grouped into bands, each of which is long-word aligned.
The bands are in the same relative positions as the band descriptors.

December 1996 WAL for Windows Programmer’s Reference Manual 137


5 Image Formats
Banded Image Format

The following figure shows the memory layout of a banded image.

image_header

band 0 descriptor
band 1 descriptor
band 2 descriptor
.
.
.
band n descriptor

band 0 data
band 1 data
band 2 data
.
.
.
band n data

Banded Image in Memory

Coding Details
The complete description of banded images can be found in the header file
image.h. A copy of this file is included in this chapter; see “image.h” on
page 148.

Given the following declarations:

struct image_header *image_p;


struct band_desc *band_p;
unsigned long *bitmap_p;

If image_p points to the beginning of the image in memory, then

band_p = (struct band_desc *) (image_p +1);

locates the first band descriptor. And

138 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
Tiled Image Format

bitmap_p = (unsigned long *) (band_p + band_p->nbands);

locates the beginning of the bitmap.

From there, the band descriptors are randomly addressable, such as band_
p[3]; the pointer can also be incremented for sequential access. The portion of
the bitmap corresponding to each band is not easily addressed and must be
located by adding up the sizes of each of the preceding bands, if any, and
offsetting that much from bitmap_p.

Tiled Image Format


The FileNet image format known as tiled images stores large images.

Page Layout
As the name implies, the image is segmented into small rectangular regions
called tiles. The tiles are made up of bands of scan lines, in much the same
way as a simple banded image.

The following figure shows a C-size image divided into tiles. Note that the tiles
are numbered sequentially from left to right and top to bottom. Tile zero is in
the upper left corner.

December 1996 WAL for Windows Programmer’s Reference Manual 139


5 Image Formats
Tiled Image Format

tile 0, 1024x1024 pixels, in 16 bands of


64 scan lines

tile 1, 1024x1024 pixels, in 16 bands of


64 scan lines

tile 5

the last row of tiles


might have fewer
scan lines than
normal

the last column of tiles might not


be as wide as normal tiles

Dividing an Image into Tiles

Memory Format
In memory, a tiled image starts with a header that provides general
information about the image. This information includes:

• The height of the image in pixels (height)

• The width of the image in pixels (width)

• The height of a tile in pixels (tile_height)

• The width of a tile in pixels (tile_width)

140 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
Tiled Image Format

Following the image header is an array of tile pointers, one per tile in the
image. The tile pointer locates the tile structure within the image data and
gives the size of the tile. The location is given as a byte offset from the
beginning of the tiled image header to the beginning of the tile. A tile is always
located by using its pointer, not its relative position in the image data. There
might be extra tile pointers in the array. The process dealing with the image
uses no more tiles than is appropriate.

The number of tiles in the image is not stored anywhere. It is computed by


dividing tile dimensions into the overall image dimensions. After this
computation,save the remainders for future use. For the balance of this
section, assume that the remainders are remainder_width and remainder_
height.

The tile pointer locates the tile, which consists of:

• A tile header

• An array of band descriptors

• The band data

There is insufficient information in a tiled image to allow each tile to be of an


arbitrary size. At most, a tiled image contains tiles of four sizes:

• Normal tiles form the bulk of the image. They are tile_width by tile_height.
Both of these dimensions are usually set to 1024.

• Any tile that is not exactly this size is smaller. Such tiles are, collectively,
considered “runts.'

• The right side of the image contains tiles that are narrower than the rest
when tile_width does not divide evenly into width. These runt tiles are
remainder_width by tile_height.

• If tile_height does not divide evenly into height, the last row of tiles
contains runt tiles that are tile_width by remainder_height.

• If both the last row and right column of tiles are fragmentary, the runt tile
in the bottom right corner has the unique dimension of remainder_width
by remainder_height.

It is possible to play tricks with the tiled image header and produce interesting
images. The FileNet fax server, for instance, removes the header from a
banded image and installs a special header. This makes it look like a tiled

December 1996 WAL for Windows Programmer’s Reference Manual 141


5 Image Formats
Tiled Image Format

image, with one huge tile. OEMs are cautioned to avoid variation in image
format unless FileNet engineering has approved the change.

Since runt tiles must be detected by dividing tile dimensions into the image
dimensions, they must be located with no additional positioning data: they
default to the right and bottom edges. If an image is rotated, the runt edges
are assumed to rotate along with the image. Any process that manipulates
tiled images must examine the xform field in the image header. If rotation was
applied, the process must look for runts along the appropriate edges. For
example, an image that was rotated 90 degrees clockwise might have runts
along only the bottom and left edges instead of right and bottom edges.

The figure “Tiled Image in Memory” on page 142 shows the memory layout of
a tiled image. In this example, the image is well-behaved in that the i-th tile
happens to be in position i for every case. This is not always true for every
tiled image and, in fact, will probably not be the case with any rotated image
you encounter. To get to a tile, you must follow the corresponding pointer.

tiled image header

tile 0 pointer
tile 1 pointer
tile 2 pointer
...
tile n pointer

tile 0 header
band list
band data
tile 1 header
band list
band data
tile 2 header
band list
band data
...
tile n header
band list
band data

Tiled Image in Memory

142 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
Tiled Image Format

Coding Details
The ultimate description of tiled images can be found in the header file tile.h.
See a copy of this file, under “tile.h” on page 151.

Given the following declarations:

struct tiled_image_hdr *tiled_image_p;


struct tile_ptr *tile_ptr_p;
struct tile_hdr *tile_hdr_p;
struct band_desc *band_p;
unsigned long *bitmap_p;
unsigned long num_tiles_high, num_tiles_wide, num_tiles;

if tiled_image_p points to the beginning of the tiled image in memory, then

tile_ptr_p = (struct tile_ptr *) (tiled_image_p + 1);

locates the first tile pointer and

num_tiles_high = (width + tile_width - 1) / tile_width;


num_tiles_wide = (height + tile_height - 1) / tile_height;
num_tiles = num_tiles_high * num_tiles_wide;

must be computed before you can find anything else. After that,

tile_hdr_p = (struct tile_hdr *) (tile_ptr_p + num_tiles);

locates the first tile header. Once you locate the tile header,

band_p = (struct band_desc *) (tile_hdr_p + 1);

finds the first band descriptor for this tile and

bitmap_p = (unsigned long *) (band_p + bandp->nbands);

locates the beginning of the bitmap.

The band descriptor and bitmap portions of a tile are identical to those of a
banded image and can be processed by common routines.

December 1996 WAL for Windows Programmer’s Reference Manual 143


5 Image Formats
Postage Stamp Format

Tile headers can be located by adding the offset in the tile pointer to the base
address of the tiled_image_header itself. The computation needs a few casts,
as follows:

tile_hdr_p = (struct tile_hdr *)


((char *) tiled_image_p + tile_hdr_p->offset);

The comp_alg field in the tiled_image_hdr is reserved for future use. It must
currently be zero for all documents.

Postage Stamp Format


The postage stamp is an A-size (or smaller) reduction of a larger tiled image.
The postage stamp has traditionally been used as an overview of the tiled
image from which you select an area for display at full resolution.

The full image and postage stamp are stored together by the application level
for subsequent retrieval and display. This association is not a part of the
image format itself. For more information, see “Images on Optical Disk” on
page 145.

A postage stamp is created at 100 SPI by IAI. Its orientation is the same as
that of the full image.

A tiled image does not necessarily include a postage stamp. The FileNet fax
server, for instance, creates tiled images with only a single huge tile and no
postage stamp. Code that demands the presence of a postage stamp breaks
when it runs into one of these.

Format
The postage stamp is stored in tiled image format. Unlike standard tiled
images, the entire image is captured as a single tile. This is indicated by width
equal to tile_width and height equal to tile_height.

144 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
Images on Optical Disk

Images on Optical Disk


Once an image is reduced to a banded or tiled storage format, additional
information is wrapped around it for placement on optical disk and in magnetic
disk caches. The layout of this structure is detailed in the header file FN_
page_header.h. See a copy of this file under “FN_page.h” on page 155.

The figure “Optical Disk Header” on page 146 shows the layout of the header
attached to an image on optical disk. Note that, although the header is usually
built with room for 80 subpages, only some of them are populated. The
number of populated entries is given by the count field.

Following the main header is the data area. The subpage descriptor’s offset
field is used to locate the beginning of the actual page within the data area.
Once at the actual page, the banded or tiled image header is applied, as
appropriate.

As an exception to this, there are page types that are not actually pages. If a
subpage descriptor’s type field is tiledImageWidthHeight, the offset and length
fields carry data and do not refer to an actual image.

A complete tiled image on optical disk or in magnetic disk cache will be of


composite type with three pages. The pages, not necessarily in this order,
are: postage stamp, full image, and height/width.

December 1996 WAL for Windows Programmer’s Reference Manual 145


5 Image Formats
Images on Optical Disk

32 bits

page type | (fill) | (fill) | (fill) main header


(FN_PageHeader)

number of subpages count

subpage type subpage 0

offset

length

subpage type subpage 1

offset

length

subpage type subpage 2

offset

length

... ...

subpage type subpage 79

offset

length

Optical Disk Header

146 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
Special Limitations

Special Limitations
Compressed image data in a FileNet image approximately follows the CCITT
standard for Group-III or Group-IV compression. The exceptions are
important, so read this section carefully.

Office document images are banded so that they can be decompressed and
examined a section at a time, if necessary. This is the same reasoning behind
the use of tiles on large documents. Because a tile is usually 1024x1024
pixels, it is small enough that banding to further sharpen the decompression
granularity is unnecessary. However, we provided banding. A subsequent
image format can be added to provide unbanded tiles.

Due to certain constraints within various FileNet subsystems, an arbitrary size


limit of 500K bytes has been placed on banded images. This refers to the
complete, compressed image with headers. It is possible to make images that
exceed this limit. If you do this, however, the image may run into trouble later
in the system. It is a good idea to stay within the limit. If a banded image
threatens to exceed this limit, reduce the largest bands to make the image fit.

Before the full availability of VLSI compression/decompression chips, FileNet


used an emulator board that provided a subset of the functionality. This board
had several shortcomings that either became arbitrary limitations or
compatibility issues. In general, anything that the emulator produced can be
decompressed by the newer VLSI implementation. The reverse is not true, the
most notable example of which is Group-IV compression.

Due to hardware limitations inherent in the compression emulator board, for


bands that are compressed 1-D and marked as CMP_BAND, a wide
scanline (one that exceeds 220 bytes) now has twice the number of lines and
half of the width. Bands marked MG3 are assumed to be 1-D bands of a
newer vintage and are not split. The emulator makes no band compressed 2-
D, so one of these is never split (because this would invalidate the reference
line).

The compression emulator was also incapable of processing scan lines with
an odd number of bytes. As a result, images produced by FileNet have an
even number of bytes per scanline and the compressed data is laid with
bands starting on long-word boundaries. Attempts to use the emulator to
decompress images with odd lengths fail, usually producing corrupted output.
Attempts to decompress such images using the VLSI compression chip work,
but place a warning message in the station error log. Images that are intended
to be completely compatible with FileNet images should follow the even-
length and long-bound conventions.

December 1996 WAL for Windows Programmer’s Reference Manual 147


5 Image Formats
image.h

The group of bands comprising a 1-D compressed image is also treated


slightly differently depending on its position in the image:

• The first band has a CCITT EOL code at the beginning of the band.

• Bands in the middle have neither an EOL code at the beginning nor an
RTC code at the end. They do have EOL codes at the end of each line.

• The last band has a CCITT RTC code at the end.

The intent is that multiple bands can be decompressed at once, should the
user so desire, the collection appearing as a complete image. Alignment
requirements for the beginning of bands make it likely that the unused
padding space between bands contains useless data. If you wish to
decompress more than one band at a time, overwrite the padding with time-fill
codes.

For your convenience, we include copies of the header files image.h, tile.h,
and FN_page_header.h.

image.h
/*********************************************************************
* IMAGE.H
*
* -------------------------------------------------------------
* ( The following lines are for source control identification
* purposes. Please do not alter or delete. )
*
* $Revision: 1.2 $
* Checked-in $Date: 20 Jun 1996 12:23:36 $
* -------------------------------------------------------------
**********************************************************************/

#include "pshpack1.h"

#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */

148 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
image.h

/*
* Physical layout :
* --------------------------
* | |
* | image_header |
,* | |
,* --------------------------
,* | | - Number of entries is image_header.nbands
,* | band list |
,* | (array of |
,* | band_desc) |
* --------------------------
* | - All band data is long-word aligned.
* | band data |
* | |
* --------------------------
*/

struct image_header {
char format; /* = 2 .. this is image format #2 */
char config; /* see defines below */
short nbands; /* number of bands in image */
short line_width; /* number of pixels in scan line */
short nlines; /* number of lines in image */
};

/* image_header.config defines */
# define IROT_NULL 0 /* image rotation is in low order 2 bits */
# define IROT_90 1
# define IROT_180 2
# define IROT_270 3
# define IMIRROR 0x04 /* Mirrored image if this bit set */
# define IRESMASK 0x70 /* Mask to extract resolution information */
# define IEDITTED 0x80 /* Image has been editted if this bit set */

December 1996 WAL for Windows Programmer’s Reference Manual 149


5 Image Formats
image.h

/* resolution codes (as extracted from config via IRESMASK) */


# define SPI100 0x40
# define SPI200A 0x00
# define SPI200 0x10
# define SPI300 0x20
# define SPI400 0x30

struct band_desc {
unsigned char band_format; /* see band_format defines below */
unsigned char nlines; /* scan lines in band */
unsigned short band_size; /* number of bytes in band */
};

/* band_desc.band_format defines */
# define NULL_BAND 0x00 /* null: no data, just place holder */
# define RAW_BAND 0x01 /* raw: bitmap at scanned res. */
# define CMP_BAND 0x02 /* compressed: compressed at scanned res. */
# define RDC_BAND 0x03 /* reduced: bitmap scaled 2:1 from scanned res */
# define GRY_BAND 0x04 /* grey: future .. grey scale/half tone/? */
# define MG3_BAND 0x05 /* makeup codes/G3: CMP_BAND w/ makeup codes */
# define G4_BAND 0x06 /* G4: compressed G4-2d at scanned res. */

union image_ptr
{ struct image_header *header;
struct band_desc *band;
char *image;
int *param;
};

#ifdef __cplusplus
} /* End of extern "C" { */
#endif /* __cplusplus */

150 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
tile.h

#include "poppack.h"

tile.h
/*
* FileNet Tiled Image Format Definitions
*
* Initial Version 10/3/85 dan
* Changed tiled_image_hdr magic field from to unsigned long. 10/8/85 dan
* Modified tile_image_hdr to have all long fields and added comp_alg. Changed
* TILED_MAGIC to TILED_IMAGE_MAGIC, and changed value to 0x12345678. Added
* magic field to tile_hdr and manifest constant TILED_HDR_MAGIC. 851202 lkp
* Put ifdefs around IROT defines so that this file can be included in a
* compilation that also includes <sys/image.h>. 860424 lkp
* Added disp_xform by shortening the xform field to a short. Also bumped the
* version manifest constant to 1. 870325 lkp
* Added defines for for new band kinds to support G4 compression and
* compression with makeup codes. Bumped version manifest constant to 2.
* 880328 lkp
*
*/

#include "pshpack1.h"

#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */

/*
* Tiled Image File Physical Layout:
*
* ---------------------------
* | |
* | tiled_image_hdr |

December 1996 WAL for Windows Programmer’s Reference Manual 151


5 Image Formats
tile.h

* | |
* ---------------------------
* | |
* | tile pointers |
* | (array of tile_ptr) |
* | |
* ---------------------------
* | |
* | tile |
* | |
* ---------------------------
* .
* .
* .
* ---------------------------
* | |
* | tile |
* | |
* ---------------------------
*/

/*
* Tile Physical Layout:
*
* ---------------------------
* | |
* | tile_hdr |
* | |
* ---------------------------
* | |
* | band list |
* | (array of |
* | band_desc) |
* | |
* ---------------------------

152 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
tile.h

* | |
* | band data | Note: All Band Data is word aligned.
* | |
* ---------------------------
*/

struct tiled_image_hdr {
unsigned long magic; /* MAGIC Number for validation */
unsigned long format; /* FileNet Image format */
unsigned long version; /* FileNet Image version */
unsigned short disp_xform; /* Display-time transformations */
unsigned short xform; /* Image Transformations */
unsigned long resolution; /* Image scan resolution (spi) */
unsigned long comp_alg; /* Compression algorithm used */
unsigned long width; /* Image width in pixels */
unsigned long height; /* Image height in pixels */
unsigned long tile_width; /* Tile width in pixels */
unsigned long tile_height; /* Tile height in pixels */
};

struct tile_ptr {
unsigned long offset; /* Tile offset from beginning */
unsigned long length; /* Length of entire tile in bytes:
header, band list, and data */
};

struct tile_hdr {
unsigned long magic; /* Magic number for validation */
unsigned long nbands; /* Number of bands in a tile */
};

#ifndef IROT_NULL /* band_desc is dup of struct in <sys/image.h> */

struct band_desc {

December 1996 WAL for Windows Programmer’s Reference Manual 153


5 Image Formats
tile.h

unsigned char band_format; /* see defines below */


unsigned char nlines; /* scan lines in band */
unsigned short band_size; /* number of bytes in band data */
};

#endif

/*
* Manifest Constants
*
*/

#define TILED_IMAGE_MAGIC 0x12345678


#define TILED_HDR_MAGIC 0x33323349
#define TILED_IMAGE_BMAGIC 0x12 /* first byte of magic numbers .. 68000 */
#define TILED_HDR_BMAGIC 0x33 /* 68000 (for downward compatibility) */
#define TILED_IMAGE_FORMAT 3
#define TILED_IMAGE_VERSION 2

/* Defines for tiled_image_hdr.xform (dups from <sys/image.h>) */

#ifndef IROT_NULL

#define IROT_NULL 0 /* Image Rotation Constants */


#define IROT_90 1
#define IROT_180 2
#define IROT_270 3
#define IMIRROR 0x04 /* Mirror Image if this bit is set */

/* Defines for band_desc.band_format (dups from <sys/image.h>) */

# define NULL_BAND 0x00 /* null: no data, just place holder */


# define RAW_BAND 0x01 /* raw: bitmap at scanned res. */

154 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
FN_page.h

# define CMP_BAND 0x02 /* compressed: compressed at scanned res. */


# define RDC_BAND 0x03 /* reduced: bitmap scaled 2:1 from scanned res */
# define GRY_BAND 0x04 /* grey: future .. grey scale/half tone/? */
# define MG3_BAND 0x05 /* makeup codes/G3: CMP_BAND w/ makeup codes */
# define G4_BAND 0x06 /* G4: compressed G4-2d at scanned res. */

#endif

#ifdef __cplusplus
} /* End of extern "C" { */
#endif /* __cplusplus */

#include "poppack.h"

FN_page.h
/*
* Page Header structure
*
* Definitions of the page header structures for various types of pages.
*
* original: 1984 by Fred Wilcox
* updated: July, 1986 by Preston L. Bannister
* updated: December, 1987 by Preston L. Bannister
* updated: June, 1988 by Preston L. Bannister
* updated: August, 1988 by Preston L. Bannister
* updated: July, 1990 by Preston L. Bannister
* updated: October, 1992 by Debbie Botros -- added cmp page types
*/

#include "pshpack1.h"

#ifndef FN_page_header_h
#define FN_page_header_h

December 1996 WAL for Windows Programmer’s Reference Manual 155


5 Image Formats
FN_page.h

#ifndef ExplicitData_h
#include <Explicit.h>
#endif

#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */

/*
Note that PageHeader may be variable sized based on number of
actual Subpage objects. The recommended maximum is so that the
entire structure will fit in the first 1K bytes.

Note also that the document type should be considered a hint as


to the actual types of the pages in the document. The real
pages types may not correspond to the document type. (Assume
it's correct until proven otherwise).

Some of the page types have previously been defined in


FN_page_header.h with different names. The document types are
defined in limits.h.

The (expected) mapping between document types and page types is


as follows:

Document type Page type Page type (alias)


----------------------- --------------- ------------------------
FN_NULL_DOC (n.a.)
FN_IMAGE_DOC FN_IMAGE_PAGE_TYPE FN_IMAGETYPE
FN_TEXT_DOC FN_TEXT_PAGE_TYPE FN_WPTYPE
FN_FORM_DOC FN_FORM_PAGE_TYPE FN_FORMTYPE
FN_MIXED_DOC (any)
" " FN_TEXT_IMAGE_PAGE_TYPE
" " FN_COMPOSITE_PAGE_TYPE
" " FN_GTI_PAGE_TYPE

156 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
FN_page.h

FN_ANNOT_DOC (n.a.)
FN_OTHER_DOC FN_OTHER_PAGE_TYPE

A _IMAGE_ page contains a compressed image bitmap.

A _TEXT_ page contains a byte stream that describes the


construction of an image. (Analogous the Postscript or
Interpress, except our own format).

A _FORM_ page contains a DAM data structure.

The _TEXT_IMAGE_ is the same format as a _TEXT_ page. The


_TEXT_IMAGE_ page needs to be displayed in an image (type)
window, because there is an image referenced in the page. The
document type for a document containing a _TEXT_IMAGE_ page
will always be FN_MIXED_DOC.

A FN_ANNOT_DOC always consists of only one page, and is used


only by the annotations software.

A _OTHER_ doc or page contains non-displayable data. The format


of a _OTHER_ page is defined in the OtherPage.h header file.

A _COMPOSITE_ page may contain a number of different objects.


The current use is for tiled images where the associated
postage stamp image is stored in the same page.

A _GTI_ page is a composite page containing both an editable


and a directly printable representation. The editable form is
a GTI (FileNet word processor) document (as one subpage). The
directly printable representation is same GTI document
translated to P-codes.
*/

December 1996 WAL for Windows Programmer’s Reference Manual 157


5 Image Formats
FN_page.h

#define FN_IMAGE_PAGE_TYPE ((unsigned8)2) /* same as


FN_IMAGETYPE */
#define FN_TEXT_PAGE_TYPE ((unsigned8)197) /* same as FN_WPTYPE */
#define FN_CMP_TEXT_PAGE_TYPE ((unsigned8)213)
#define FN_TEXT_IMAGE_PAGE_TYPE ((unsigned8)198)
#define FN_CMP_TEXT_IMAGE_PAGE_TYPE ((unsigned8)214)
#define FN_FORM_PAGE_TYPE ((unsigned8)196) /* same as FN_FORMTYPE */
#define FN_TILED_PAGE_TYPE ((unsigned8)4)
#define FN_COMPOSITE_PAGE_TYPE ((unsigned8)3)
#define FN_OTHER_PAGE_TYPE ((unsigned8)5)
#define FN_GTI_PAGE_TYPE ((unsigned8)6)

/* Old page type names for compatibility with old code */

#define FN_FORMTYPE FN_FORM_PAGE_TYPE


#define FN_WPTYPE FN_TEXT_PAGE_TYPE
#define FN_IMAGETYPE FN_IMAGE_PAGE_TYPE

#define FN_CHAR_SET_MAGIC0x54414c4bL

/* Valid compression types, for the compression_type field in


the FN_page_header data structure */
#define FN_NOT_COMPRESSED 0 /* data is not compressed */
#define FN_COMPRESSION 1 /* Same as CDCD_alg_1 */

/* The following definitions describe the page header on a composite page */

#define FN_MAX_SUBPAGE 80 /* arbitrary - ridiculously large */

typedef enum {
postageStamp=0,
tiledImage=1,
tiledImageWidthHeight=2,
pcodeByteStream=3,
nativeGTIdocument=4

158 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
FN_page.h

} FN_SubPageType;

typedef struct {
unsigned32 type; /* actually a FN_SubpageType */
unsigned32 offset; /* width field for tiledImageWidthHeight */
unsigned32 length; /* height field for tiledImageWidthHeight */
} FN_SubPageDescriptor;

typedef struct {
unsigned8 type; /* magic number */
unsigned8 _1, _2, _3; /* (pad to long word boundary) */
unsigned32 count; /* number of sub-page objects */
FN_SubPageDescriptor subPage[FN_MAX_SUBPAGE]; /* desc of sub-page objects */
} FN_PageHeader;

/*
* Note that there is already a page header used for form
* documents (defined below). For existing vanilla images, the
* byte containing the magic number is all there is in the way of
* a page header. The page header structure expected would depend
* on the value of the first byte of the page (the type field).
*/

/*
* Page header structure for a FN_FORM_PAGE_TYPE page.
*
* Each document should have a page header structure at the
* beginning of each page. At present, an image page only
* contains the first byte of this structure; a form page
* contains the entire structure.
*/

typedef struct FN_pg_hdr {


unsigned char type; /* type of page: see the definitions above */
char cdummy1, cdummy2, cdummy3;

December 1996 WAL for Windows Programmer’s Reference Manual 159


5 Image Formats
FN_page.h

long totalsize; /* total number of bytes in the page


(including this structure) */
long headersize; /* size of this header structure */
long datasize; /* size of the data area for a form page */
long printsize; /* size of the print data area */
long filenameoffset; /* number of bytes from the beginning of the page
to the file name for a form page */
long dataoffset; /* number of bytes from the beginning of the page
to the data values for a form page */
long printoffset; /* number of bytes from the beginning of the page
to the printer ready version of a form page */
long fieldoffset; /* number of bytes from the beginning of the page
to the field data */
long fieldsize; /* size of the field data */
long langoffset; /* number of bytes from the beginning of the page
to the language specification */
long langsize; /* size of the language specification */
long magic_fn_char_set;
/* must be FN_CHAR_SET_MAGIC to validate next fld */
long fn_char_set; /* valud from fn_char_set.h */
long compression_type;
/* compression algorithm, =0 if none */
long decompressed_length;
/* length, in bytes, before compression */
long ldummy9; /* Note: Dummy fields should always be zero */
long ldummy10;
long ldummy11;
long ldummy12;
long ldummy13;
long ldummy14;
long ldummy15;
long ldummy16;
} FN_page_header, *FN_page_header_p; /* really should be FN_FormPageHeader */

/*

160 WAL for Windows Programmer’s Reference Manual December 1996


5 Image Formats
FN_page.h

* magic number for the field data contained at fieldoffset in an


* FN_FORM_PAGE_TYPE file.
*/
#define FORM_FLDDESC_MAGIC 0x10161965L

/* Size definitions in number of bytes. */

#define FN_FILENAMESIZE 16
#define FN_MAXFORMPAGESIZE 50000

/*
* Macro definitions:
* In each of these macros, buf_p is a pointer
* to the beginning of the page buffer. It may be defined as
* a (char *) or (struct FN_pg_hdr *) or (FN_page_header_p).
*/

#define FN_FORM_FILE_NAME_PTR(buf_p)\
(((char *)(buf_p)) + ((struct FN_pg_hdr *)(buf_p))->filenameoffset)

#define FN_FORM_DATA_PTR(buf_p)\
(((char *)(buf_p)) + ((struct FN_pg_hdr *)(buf_p))->dataoffset)

#define FN_FORM_PRINT_DATA_PTR(buf_p)\
(((char *)(buf_p)) + ((struct FN_pg_hdr *)(buf_p))->printoffset)

#endif /* ! FN_page_header_h */
/* stamp 0G^DXCRHLc\]@W:S4KuE\?YKPIJaD[>U:e2I`CZ=W7N3IeB[<S6M */

#ifdef __cplusplus
} /* End of extern "C" { */
#endif /* __cplusplus */

#include "poppack.h"

December 1996 WAL for Windows Programmer’s Reference Manual 161


5 Image Formats
FN_page.h

162 WAL for Windows Programmer’s Reference Manual December 1996


6
6Data Types and Structures

This chapter describes the data types, constants, and data structures in the
WorkFlo Application Libraries.

ASE_capability_typ
This type identifies a capability granted to perform a function. Generally, you
use this type when updating objects.

typedef unsigned long ASE_capability_typ[5];

December 1996 WAL for Windows Programmer’s Reference Manual 163


6 Data Types and Structures
ASE_doc_id_typ

ASE_doc_id_typ
This type refers to a document. Typically, you use this type in conjunction with
ASE_page_number_typ (which refers to the page within that document).
ASE_doc_id_typ must be within the minimum and maximum range.

typedef unsigned long ASE_doc_id_typ;

ASE_doc_id_typ has the following defined constants:

ASE_MIN_DOC_ID 100000 Minimum document ID.


ASE_MAX_DOC_ID 0xee6b27ff Maximum document ID (3999999999).
ASE_INVALID_DOC_ID 0 Used for uncommitted images. For example, it is used
in the function IAFLIB_create_cache_object() to tell the
system to generate an image ID.

164 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_document_status_typ

ASE_document_status_typ
This type specifies the assigned status of a copy of a document on optical
disk.

typedef unsigned short ASE_document_status_typ;

ASE_document_status_typ has the following defined constants:

ASE_DOCUMENT_GOOD 0 There are no known problems with this copy;


this is the default.
ASE_DOCUMENT_BAD 1 There are known problems with this copy.

December 1996 WAL for Windows Programmer’s Reference Manual 165


6 Data Types and Structures
ASE_folder_id_typ

ASE_folder_id_typ
This type refers to a folder and must be within the minimum and maximum
range.

typedef unsigned long ASE_folder_id_typ;

ASE_folder_id_typ has the following defined constants:

ASE_ROOT_FOLDER_ID 1 Root folder is the parent of all folders.

166 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_image_id_typ

ASE_image_id_typ
This type specifies an image ID that is the standard type used to identify
uncommitted images or other objects that are not pages in a document. Each
image has a per-system unique ID allocated by Document Services.

typedef unsigned long ASE_image_id_typ;

ASE_image_id_typ has the following defined constants:

ASE_MIN_IMAGE_ID 73000 100000 for new documents.


ASE_MAX_IMAGE_ID 0xee6b27ff 3999999999.
ASE_INVALID_IMAGE_ID 0

December 1996 WAL for Windows Programmer’s Reference Manual 167


6 Data Types and Structures
ASE_migrate_status_typ

ASE_migrate_status_typ
This type specifies the migration status of pages of a document from optical
disk.

typedef unsigned short ASE_migrate_status_typ;

ASE_migrate_status_typ has the following defined constants:

ASE_ALL_MIGRATED 0 All pages are currently migrated.


ASE_IN_DRIVE 1 Some pages are currently on a disk in an optical
drive.
ASE_IN_SLOT 2 Some pages are currently on a disk in a slot in an
OSAR.
ASE_NOT_IN_OSAR 3 Some pages are not in any OSAR.

168 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_nch_name_type_typ

ASE_nch_name_type_typ
This type specifies either an IMS name or a service name for those services
that require those names.

typedef unsigned short ASE_nch_name_type_typ;

ASE_nch_name_type_typ has the following defined constants:

ASE_IMS_NAME 1 IMS name.


ASE_SVC_NAME 2 Service name.

December 1996 WAL for Windows Programmer’s Reference Manual 169


6 Data Types and Structures
ASE_net_addr_typ

ASE_net_addr_typ
This structure specifies a network address.

typedef struct {
unsigned long net;
unsigned short host[3];
unsigned short socket;
} ASE_net_addr_typ;

The ASE_net_addr_typ structure has the following fields:

net unsigned long. Network address.

host unsigned short. Host network address.

socket unsigned short. Socket number (for particular services).

170 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_notify_option_typ

ASE_notify_option_typ
This type specifies the notification option and request IDs for document
migration requests and print requests.

typedef unsigned short ASE_notify_option_typ;

ASE_notify_option_typ has the following defined constants:

ASE_NOTIFY_ASYNCHRONOUS 1 Does not hang caller; block or poll for completion


indication.
ASE_NOTIFY_NONE 2 Caller does not want notification.
ASE_NOTIFY_SYNCHRONOUS 3 Caller hangs until done.

December 1996 WAL for Windows Programmer’s Reference Manual 171


6 Data Types and Structures
ASE_osar_id_typ

ASE_osar_id_typ
This type specifies the ID of an OSAR. Every OSAR unit has a (per-system)
unique OSAR identifier.

typedef unsigned short ASE_osar_id_typ;

172 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_page_number_typ

ASE_page_number_typ
This type refers to a page within a document and must be within the minimum
and maximum page range.

typedef unsigned short ASE_page_number_typ;

ASE_page_number_typ has the following defined constants:

ASE_MIN_PAGE_NUMBER 1 Minimum page number.


ASE_MAX_PAGE_NUMBER 1000 Maximum page number.
ASE_INVALID_PAGE_NUMBER 0XFFFF Used for uncommitted pages. For example, it is
used in the IAFLIB_get_object() to retrieve images
from BES cache.

December 1996 WAL for Windows Programmer’s Reference Manual 173


6 Data Types and Structures
ASE_page_range_typ

ASE_page_range_typ
This structure specifies a document and the contiguous set of pages within
that document for migration.

typedef struct {
ASE_doc_id_typ doc_id;
ASE_page_number_typ first_page;
ASE_page_number_typ last_page;
} ASE_page_range_typ;

The ASE_page_range_typ structure has the following fields:

doc_id ASE_doc_id_typ (unsigned long). Document ID of the


document to migrate.

first_page ASE_page_number_typ (unsigned short). Page number of


the first page to migrate.

last_page ASE_page_number_typ (unsigned short). Page number of


the last page to migrate.

See Also
“ASE_doc_id_typ” on page 164

“ASE_page_number_typ” on page 173

174 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_relational_op_typ

ASE_relational_op_typ
This type specifies relational operators.

typedef unsigned short ASE_relational_op_typ;

ASE_relational_op_typ has the following defined constants:

LSS 0 Less than.


LEQ 1 Less than or equal to.
GTR 2 Greater than.
GEQ 3 Greater than or equal to.
EQL 4 Equal to.
NEQ 5 Not equal to.

December 1996 WAL for Windows Programmer’s Reference Manual 175


6 Data Types and Structures
ASE_request_id_typ

ASE_request_id_typ
This type specifies the ID of a print request. The ID is always non-null.

typedef unsigned long ASE_request_id_typ;

176 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_server_id_typ

ASE_server_id_typ
This type specifies the server ID.

typedef unsigned short ASE_server_id_typ;

ASE_server_id_typ has the following defined constants:

ASE_INVALID_SERVER_ID 0
ASE_DOC_LOC_SERVER_ID 1

December 1996 WAL for Windows Programmer’s Reference Manual 177


6 Data Types and Structures
ASE_service_name_typ

ASE_service_name_typ
This type specifies the 3-part service name.

typedef NCH_ObjectName ASE_service_name_typ;

ASE_service_name_typ has the following fields:

organization string. Organization name; maximum length 20 characters.

domain string. Domain name; maximum length 20 characters.

object string. Object name; maximum length 40 characters.

178 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_session_number_typ

ASE_session_number_typ
This type specifies the session number returned on the call to a FileNet
service.

typedef unsigned long ASE_session_number_typ;

ASE_session_number_typ has the following defined constants:

ASE_INVALID_SESSION_NUMBER 0 Session number returned on the call to a FileNet


service, such as SEC_logon(). If you have an
invalid session handle, you get a zero session
number.

December 1996 WAL for Windows Programmer’s Reference Manual 179


6 Data Types and Structures
ASE_ssn_typ

ASE_ssn_typ
This type defines a system serial number. Each FileNet system is shipped
with a 32-bit system serial number. Application processors can also be
allocated a system serial number. These numbers are generally used to
distinguish objects with identical system-relative identifiers that originated on
different systems. System serial numbers must be in the range ASE_MIN_
SSN to ASE_MAX_SSN.

typedef unsigned long ASE_ssn_typ;

ASE_ssn_typ has the following defined constants:

ASE_LOCAL_SSN 0 In some contexts, indicates the system serial number of


the local system.
ASE_MIN_SSN 10000 Minimum system serial number.
ASE_MAX_SSN 0xfffffffe Maximum system serial number.
ASE_INVALID_SSN 0xffffffff Indicates that the system serial number is greater than the
maximum.

180 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_surface_id_typ

ASE_surface_id_typ
This type specifies the ID of a surface of an optical disk. Every surface of
every optical disk has a (per-system) unique surface ID assigned by
Document Services.

typedef unsigned long ASE_surface_id_typ;

ASE_surface_id_typ has the following defined constants:

ASE_INVALID_SURFACE_ID 0 Indicates that the surface ID provided is invalid.

December 1996 WAL for Windows Programmer’s Reference Manual 181


6 Data Types and Structures
ASE_surface_offset_typ

ASE_surface_offset_typ
This type specifies the offset of a document on a surface. For each document
on an optical disk surface, a surface offset represents the sector address of
the document’s descriptor on that surface.

typedef unsigned long ASE_surface_offset_typ;

ASE_surface_offset_typ has the following defined constants:

ASE_INVALID_SURFACE_OFFSET 0 Indicates that the surface offset provided is


invalid.

182 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ASE_time_typ

ASE_time_typ
This type specifies the amount of time elapsed since the starting time.

typedef unsigned long ASE_time_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 183


6 Data Types and Structures
BATCHLIB_BatchEntryStatus

BATCHLIB_BatchEntryStatus
This structure contains data about a specified batch, including document and
image IDs and an error.

typedef struct {
WORD status_count;
BATCHLIB_BatchStatus status[1];
} BATCHLIB_BatchEntryStatus;

The BATCHLIB_BatchEntryStatus structure has the following fields:

status_count WORD. Number of status records in the array.

status BATCHLIB_BatchStatus. Ranges from 0 to status_count - 1.

See Also
“BATCHLIB_BatchStatus” on page 185

184 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BATCHLIB_BatchStatus

BATCHLIB_BatchStatus
typedef struct {
PCWS_ERR_TYP error;
FN_docnum_typ doc_id;
FN_docnum_typ page;
} BATCHLIB_BatchStatus;

The BATCHLIB_BatchStatus structure has the following fields:

error PCWS_ERR_TYP. FileNet style error tuple.

doc_id FN_docnum_typ. Document ID number. By default, the


image ID of the first page.

page FN_docnum_typ. The image ID of each page.

See Also
“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 185


6 Data Types and Structures
BATCHLIB_DocDesc

BATCHLIB_DocDesc
This structure contains the attributes of a specified document.

typedef struct {
WORD page_count;
HANDLE files_h;
HANDLE pg_hdrs_h;
WORD index_count;
HANDLE index_val_h;
} BATCHLIB_DocDesc;

The BATCHLIB_DocDesc structure has the following fields:

page_count WORD. Number of pages in the document.

files_h HANDLE. Handle to a null-separated list of page_count fully


specified (including drive/path) file names. page_count
specifies the number of files in the list. One file is one page.

pg_hdrs_h HANDLE. Handle to an array of page_count structures of


BATCHLIB_page_hdr_typ. Each entry is written as a header
to the corresponding page in front of the data in the
corresponding file. If pg_hdrs_h is NULL, no page headers
are written, and the files are used as is.

index_count WORD. The number of index values in index_val_h.

index_val_h HANDLE. A handle to array of index_count structures of type


BES_ixval_desc_typ. If NULL, null index values are used.
Note that RDD can be used to obtain information about index
names, IDs, and types for a document class.

186 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BATCHLIB_page_hdr_typ

BATCHLIB_page_hdr_typ
This structure defines the header at the top of a batch page.

typedef struct {
byte page_type;
byte fill1, fill2, fill3;
long page_use;
WORD hdr_size;
} BATCHLIB_page_hdr_typ;

The BATCHLIB_page_hdr_typ structure has the following fields:

page_type byte. Must be FN_OTHER_PAGE_TYPE.

fill1, fill2, fill3 byte. Pad to long word boundary.

page_use long. Must be FN_PC_ARCHIVE_USE for a data page, FN_


PC_ARCHSET_HDR_USE for a dir page.

hdr_size WORD. Actual size of this structure including variable length


data that follows.

December 1996 WAL for Windows Programmer’s Reference Manual 187


6 Data Types and Structures
BES_batch_cap_typ

BES_batch_cap_typ
This structure specifies batch capabilities. The structure, which contains the
batch number, is passed to all subsequent calls on a batch opened by BES_
create_batch() or BES_open_batch(). Client cannot modify the values in the
structure.

Client sessions require that creating or opening a batch returns a state object
to the client that must be presented on all subsequent calls dealing with that
batch. Batch Entry Services uses the concept of a capability to identify
ownership of the batch, since ownership of the capability enables the client to
perform operations on busy batches.

typedef struct {
BES_batch_id_typ batch_id;
FN_time_typ open_time;
SCT_id open_user_id;
unsigned long open_ssn;
} BES_batch_cap_typ;

The BES_batch_cap_typ structure has the following fields:

batch_id BES_batch_id_typ (unsigned long). Batch ID number.

open_time FN_time_typ. The time the batch was opened.

open_user_id SCT_id. The ID number of the user.

open_ssn unsigned long. The system serial number of where the batch
resides.

See Also
“BES_batch_id_typ” on page 189

“FN_time_typ” on page 264

“SCT_id” on page 483

188 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_batch_id_typ

BES_batch_id_typ
This type specifies the batch ID.

typedef unsigned long BES_batch_id_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 189


6 Data Types and Structures
BES_ctl_desc_typ

BES_ctl_desc_typ
This structure specifies a batch control structure.

There is one batch control record in the FileNet system’s transient database.
This record contains the next batch ID. Batch Entry Services controls the
contents of this record; the client cannot explicitly change its contents. The
record is never deleted.

typedef struct {
unsigned long batch_id;
unsigned long batch_name_id;
unsigned long quick_name_id;
unsigned long form_name_id;
unsigned long wps_name_id;
unsigned long test_name_id;
unsigned long dew_name_id;
unsigned long batch_open_id;
} BES_ctl_desc_typ;

The BES_ctl_desc_typ structure has the following fields:

batch_id unsigned long. Batch ID number.

batch_name_id
unsigned long.

quick_name_id
unsigned long. Not used.

form_name_id unsigned long. Not used.

wps_name_id unsigned long. Not used.

test_name_id unsigned long. Not used.

dew_name_id unsigned long. Not used.

batch_open_id
unsigned long.

190 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_doc_desc_typ

BES_doc_desc_typ
This structure specifies a document descriptor. There is one batch document
descriptor for each document in the batch. The descriptor defines the
structure of a document, the indexing values for the document, and other
status information. Each batch has a list of document descriptors, and each
document descriptor is assigned a unique number that is stored in the doc_id
field. Each doc_id is assigned when a document descriptor is created and is
not reused.

A batch document descriptor is deleted when the batch is deleted, either as


the result of explicit instructions from the client by using BES_delete_batch()
or as the result of successful committal. The client can also delete selected
batch document descriptors by using BES_delete_doc().

Batch Entry Services allows the user to update certain fields in the batch
document descriptors.

typedef struct {
FN_docnum_typ doc_id;
short doc_type;
long num_pages;
short num_indices;
short num_reqd_indcs;
unsigned short phase_num;
unsigned long phase_error;
unsigned short phase_status[BES_NUM_PHASES];
unsigned long fam_id;
cluster_key_typ cluster_key;
long ocr_schema;
} BES_doc_desc_typ;

The BES_doc_desc_typ structure has the following fields:

doc_id FN_docnum_typ. Logical identifier for this document


descriptor. Assigned by Batch Services at document creation
time. Cannot be changed.

doc_type short. Document type.


BES_IMAGE ‘\0’ Image
BES_TEXT ‘1’ Text
BES_FILLIN_PAGE ‘2’ Form
BES_COMPOSITE ‘3’ Mixed
BES_SEP_SHEET ‘9’ Separator sheet
BES_OTHER ‘5’ Other

December 1996 WAL for Windows Programmer’s Reference Manual 191


6 Data Types and Structures
BES_doc_desc_typ

num_pages long. Number of pages in this document.

num_indices short. Number of indexing fields in this document.

num_reqd_indcs
short. Number of required indexing fields in this document.

phase_num unsigned short. Phase in which error occurred.

phase_error unsigned long. Phase error (0 if no error).

phase_status Array of unsigned short. Phase status of this document. Can


be one of the following:
BES_NOT_STARTED 0 Uninitiated.
BES_IN_PROGRESS 1 Running.
BES_INTERRUPTED 2 Stopped before finished.
BES_DONE 3 Completed.
BES_NOT_NECESSARY 4 Not required.
BES_HAS_ERRORS 5 One or more errors occurred.
BES_OPTIONAL 6 Phase is optional.

fam_id unsigned long. Optical disk family to which this document will
be committed.

cluster_key cluster_key_typ. Cluster key to be used when writing the


document to optical disk (if applicable).

ocr_schema long. Used by OCR in IMS 2.8 and later.

See Also
“FN_docnum_typ” on page 260

192 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_doc_list_typ

BES_doc_list_typ
This structure is a linked list that keeps track of an array of documents and the
list of images in each document.

typedef struct doc_list {


BES_doc_desc_typ d;
FN_docnum_typ* page_ary;
BES_ixval_desc_typ* ixval_ary;
struct doc_list* next_doc;
} BES_doc_list_typ;

The BES_doc_list_typ structure has the following fields:

d BES_doc_desc_typ. Document description record.

page_ary FN_docnum_typ *. Pointer to array of image IDs or zero.

ixval_ary BES_ixval_desc_typ *. Pointer to array of index values or


zero.

next_doc struct doc_list *. Pointer to next BES_doc_list_typ or zero.

See Also
“BES_doc_desc_typ” on page 191

“BES_ixval_desc_typ” on page 210

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 193


6 Data Types and Structures
BES_dyn_hdr_desc_typ

BES_dyn_hdr_desc_typ
This structure defines a batch dynamic header record. There is one batch
dynamic header for each batch. The batch dynamic header record has the
following features:

• Creation occurs when the batch is created.

• Deletion occurs when the batch is deleted, either as the result of explicit
instructions from the client (using the delete batch function) or as the
result of successful committal.

• Data in the structure can be modified by the Batch Entry Services client,
using the update batch function.

• Adjustable parameters include migrate_delay, which controls when


migration occurs and migr_dest_cache, which specifies a particular cache
instead of optical disk.

BES_dyn_hdr_desc_typ is used in the BES_hdr_desc_typ structure. See


“BES_hdr_desc_typ” on page 201.

typedef struct {
char batch_name[FN_MAX_BIG_O_LEN + 1];
long exp_pages;
long exp_docs;
unsigned short pages_per_doc; /* 0 if variable */
FN_BOOL double_sided;
FN_BOOL verify_images;
FN_BOOL verify_indices;
short committal_type;
FN_BOOL batch_total;
short this_phase;
short next_phase;
short phase_status[BES_NUM_PHASES];
FN_time_typ phase_lst_time[BES_NUM_PHASES];
SCT_id phase_user_id[BES_NUM_PHASES];
short sort_order;
FN_BOOL ocr_enable; /* 2.8+ only */
FN_BOOL auto_index; /* 2.8+ only */
#ifdef WFD40
long migrate_delay; /* 3.1+ only */
/* 3.1+ only, migrate cache */
ASE_service_name_typ migr_dest_cache;
long reserved_1; /* 3.1+ only */

194 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_dyn_hdr_desc_typ

long reserved_2; /* 3.1+ only */


long reserved_3; /* 3.1+ only */
long reserved_4; /* 3.1+ only */
#endif
} BES_dyn_hdr_desc_typ;

The BES_dyn_hdr_desc_typ structure has the following fields:

batch_name char. Unique name associated with a batch.

exp_pages long. Number of total pages the client expects the batch to
contain when it’s committed.

exp_docs long. Number of documents the client expects the batch to


contain when it’s committed.

pages_per_doc
unsigned short. Number of pages per document. A value of
zero specifies that the document length is variable.

double_sided FN_BOOL. TRUE if pages are double-sided (not arriving in


sequential order).

verify_images FN_BOOL. TRUE if each image belonging to a document


must be successfully verified before the batch can be queued
for committal.

verify_indices FN_BOOL. TRUE if each document must be successfully


index verified before the batch can be queued for committal.

committal_type short. Specifies whether or not to write the documents on


optical disk. Can be one of the following:
BES_NORMAL_COMMIT 1 Migrate to optical disk.
BES_NO_MIGRATE 2 Keep on magnetic disk.

batch_total FN_BOOL. TRUE if batch totals are to be accumulated and


verified on the number of pages and documents and values
of applicable indexing fields.

this_phase short. Phase of the batch that is currently in progress or that


was run most recently. Can be one of the following:
BES_DEFINE 0 Batch creation.
BES_SCAN 1 Image scanning.
BES_IMAGE_VER 2 Image verification.
BES_RESCAN 3 Image rescan.

December 1996 WAL for Windows Programmer’s Reference Manual 195


6 Data Types and Structures
BES_dyn_hdr_desc_typ

BES_ASSEMBLY 4 Manual document assembly.


BES_INDEX 5 Document indexing.
BES_INDEX_VER 6 Document index verification.
BES_BATCH_TOTAL 7 Batch totals.
BES_COMMIT 8 Batch committal.
BES_CATALOG 9 Batch cataloging.
BES_RECOMMIT 10 Batch recommittal.

next_phase short. Phase that should be run next. See this_phase


description above.

phase_status short. Status of each phase. Can be one of the following:


BES_NOT_STARTED 0 Uninitiated.
BES_IN_PROGRESS 1 Running.
BES_INTERRUPTED 2 Stopped before finished.
BES_DONE 3 Completed.
BES_NOT_NECESSARY 4 Not required.
BES_HAS_ERRORS 5 One or more errors occurred.
BES_OPTIONAL 6 Phase is optional.

phase_lst_time
FN_time_typ. Last time phase accessed.

phase_user_id
SCT_id. Operator who last accessed phase.

sort_order short. Specifies the order of images in the batch. The client
can use this field to determine the order in which scanned
images are assembled into a document. Can be one of the
following:
BES_SEQUENTIAL 0 sequential
BES_REVERSE 1 reverse

ocr_enable FN_BOOL. (Currently not available.) OCR allowed. 0


indicates no, 1 yes.

auto_index FN_BOOL. (Currently not available.) Auto-index via OCR. 0


indicates no, 1 yes.

migrate_delay long. The committed document pages are not migrated to


optical disk until after migrate_delay number of seconds have
elapsed after the batch is committed. This field is valid only if
committal_type is BES_NORMAL_COMMIT.

196 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_dyn_hdr_desc_typ

If this field is non-zero, FAST_ASYNCHRONOUS committals


are automatically converted to regular ASYNCHRONOUS
committals.

When a batch is created, this field is set to the value as


specified in the document class, You can update this value
later using BES_update_batch().

migr_dest_cache
ASE_service_name_typ. If non-null, pages of the committed
documents are migrated to the cache specified in this field.
migr_dest_cache is initialized to NULL when the batch is
created. You can update it later using BES_update_batch().

reserved_1 long. Reserved. Set to zero.

reserved_2 long. Reserved. Set to zero.

reserved_3 long. Reserved. Set to zero.

reserved_4 long. Reserved. Set to zero.

See Also
“ASE_service_name_typ” on page 178

“FN_time_typ” on page 264

“SCT_id” on page 483

December 1996 WAL for Windows Programmer’s Reference Manual 197


6 Data Types and Structures
BES_filter_typ

BES_filter_typ
This structure designates the filter declaration for finding batches. Each item
implies a conditional evaluation; all conditional evaluations must pass for the
filter to pass.

Each item in the filter can have a value from the group of values described
below. Each item can also have the value BES_FILTER_ALL, which means
that you do not use a specific item as a filter and match any value.

typedef struct {
short open_flag;
short queue;
short this_phase;
short next_phase;
short which_status;
short phase_status;
} BES_filter_typ;

The BES_filter_typ structure has the following fields:

open_flag short. Filters batches based on their batch header locking


state field value. Either BES_BUSY (accept only busy
batches) or BES_AVAILABLE (accept only available
batches).

queue short. Filters batches based on their batch header queue field
value. Can be one of the following:
BES_NO_QUEUE Accept batches that are not in
the queue yet
BES_UNCOMMIT_QUEUE Accept uncommitted batches
BES_COMMIT_QUEUE Accept committed batches
BES_INPROGRESS_QUEUE Accept enqueued batches
BES_OCR_QUEUE Accept batches that are in
OCR queue

this_phase short. Filters batches based on their batch header this_phase


field value. Can be one of the following:
BES_DEFINE 0 Batch creation
BES_SCAN 1 Image scanning
BES_IMAGE_VER 2 Image verification
BES_RESCAN 3 Image rescan
BES_ASSEMBLY 4 Manual document assembly
BES_INDEX 5 Document indexing
BES_INDEX_VER 6 Document index verification

198 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_filter_typ

BES_BATCH_TOTAL 7 Batch totals


BES_COMMIT 8 Batch committal
BES_CATALOG 9 Batch cataloging
BES_RECOMMIT 10 Batch recommittal

next_phase short. Filters batches based on their batch header next_


phase field value. See this_phase description above for
constants.

which_status short. Selects the batch phase to which the phase_status


filter is applied. See this_phase description above for
constants.

phase_status short. Filters batches with a particular phase status value.


The which_status field indicates which phase status should
have the filter applied to it. Can be one of the following:
BES_NOT_STARTED 0 Accept uninitiated phases.
BES_IN_PROGRESS 1 Accept in progress phases.
BES_INTERRUPTED 2 Accept interrupted phases.
BES_DONE 3 Accept completed phases.
BES_NOT_NECESSARY 4 Accept unrequired phases.
BES_HAS_ERRORS 5 Accept phases with errors.
BES_OPTIONAL 6 Accept the phases that are
defined as BES_OPTIONAL.

December 1996 WAL for Windows Programmer’s Reference Manual 199


6 Data Types and Structures
BES_handle_typ

BES_handle_typ
This type specifies a handle.

typedef char* BES_handle_typ;

200 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_hdr_desc_typ

BES_hdr_desc_typ
This structure keeps track of data for the Batch Entry Services.

typedef struct {
BES_dyn_hdr_desc_typ d;
BES_stat_hdr_desc_typ s;
} BES_hdr_desc_typ;

The BES_hdr_desc_typ structure has the following fields:

d BES_dyn_hdr_desc_typ. Part of header user can update.

s BES_stat_hdr_desc_typ. Part of header user cannot update.

See Also
“BES_dyn_hdr_desc_typ” on page 194

“BES_stat_hdr_desc_typ” on page 213

December 1996 WAL for Windows Programmer’s Reference Manual 201


6 Data Types and Structures
BES_image_desc_typ

BES_image_desc_typ
This structure describes a batch image descriptor. There is one batch image
descriptor for each image in the batch. An image descriptor might eventually
become a page of a document. Images and their descriptors cannot be
shared among documents. All images in a batch need not be used as
document pages. Images not belonging to any document are not written to
optical disk and are deleted when the batch is deleted.

The batch image descriptor is created when the client adds an image to the
batch. It is deleted when the batch is deleted, either as the result of explicit
instructions from the client (using the delete batch function, see “BES_delete_
batch()” on page 645) or as the result of successful committal. Batch Entry
Services lets the client update certain fields in the record.

typedef struct {
FN_docnum_typ image_id;
unsigned long image_length;
short image_type;
short image_ver_stat;
FN_docnum_typ doc_id;
ASE_page_number_typ page_id;
FN_BOOL end_of_doc;
unsigned short index_len;
} BES_image_desc_typ;

The BES_image_desc_typ structure has the following fields:

image_id FN_docnum_typ. Image number associated with this image


descriptor.

image_length unsigned long. Length in bytes of the image.

image_type short. Type of image. Can be one of the following:


BES_IMAGE 0 FileNet-format image data
BES_TEXT 1 FileNet-format text data
BES_FILLIN_PAGE 2 FileNet-format form data
BES_COMPOSITE 3 FileNet-format composite image
BES_SEP_SHEET 9 Separator sheet (not a real
image)
BES_OTHER Any other type

image_ver_stat
short. Verification status. Can be one of the following:
BES_UNSEEN 0 Image is unverified

202 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_image_desc_typ

BES_GOOD 1 Image passed verification


BES_BAD 2 Image failed verification
BES_REQUIRED 3 Unused
BES_DELETE 4 Image failed verification and
is marked for deletion

doc_id FN_docnum_typ. Document ID to which this image belongs.


If zero, the image does not belong to any document.

page_id ASE_page_number_typ. Page number within the document


(0 if none).

end_of_doc FN_BOOL. TRUE if this is the last page of the document.

index_len unsigned short. Length of the index value (0 if no index). This


field is only used when the index value is entered at the time
the image is created.

See Also
“ASE_page_number_typ” on page 173

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 203


6 Data Types and Structures
BES_image_ix_desc_typ

BES_image_ix_desc_typ
This structure provides a character description of an image index.

typedef struct {
char index_value[BES_MAX_INDEX_LEN + 1];
} BES_image_ix_desc_typ;

The BES_image_ix_desc_typ structure has the following field:

index_value char. Index value, character array of maximum length BES_


MAX_INDEX_LEN + 1 (including the NULL terminator).

204 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_info_rec_typ

BES_info_rec_typ
This structure is used in the BES_get_info() and BES_set_info() functions.

typedef struct {
BES_info_spec_typ info_spec;
unsigned short info_len;
char info_text[BES_MAX_INFO_TEXT];
} BES_info_rec_typ;

The BES_info_rec_typ structure has the following field:

info_spec BES_info_spec_typ. See BES_info_spec_typ.

info_len unsigned short.

info_text char [BES_MAX_INFO_TEXT]. Specifies the data you want


to get from the server or put to the server. BES Service is not
currently using this information.

See Also
“BES_info_spec_typ” on page 206

December 1996 WAL for Windows Programmer’s Reference Manual 205


6 Data Types and Structures
BES_info_spec_typ

BES_info_spec_typ
This structure is used in BES_info_rec_typ for the BES_get_info() and BES_
set_info() functions.

typedef struct {
BES_info_typ spec_type;
union {
FN_docnum_typ doc_id;
FN_docnum_typ image_id;
BES_ixval_spec_typ ixval_spec;
} spec;
} BES_info_spec_typ;

The BES_info_spec_typ structure has the following fields:

spec_type BES_info_typ. Determines which of the union’s members is


used.
BES_INVALID_INFO 0
BES_INFO_BATCH 1
BES_INFO_DOC 2
BES_INFO_IMAGE 3
BES_INFO_IDXVAL 4
BES_MAX_INFO_TEXT 256

doc_id FN_docnum_typ. Specifies the document ID.

image_id FN_docnum_typ. Specifies the image ID. Image ID is the


identification number of one page of an image before it is
assembled into a document.

ixval_spec BES_ixval_spec_typ. Specifies the index ID for a document.

See Also
“BES_info_typ” on page 207

“BES_ixval_spec_typ” on page 211

“FN_docnum_typ” on page 260

206 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_info_typ

BES_info_typ
typedef unsigned short BES_info_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 207


6 Data Types and Structures
BES_ixdir_desc_typ

BES_ixdir_desc_typ
This structure describes a batch index directory structure. There is one batch
index directory structure for each indexing field associated with the document
class to which the batch belongs. (Indexing fields apply to each document
within a batch because all documents in a batch belong to the same
document class.)

The batch index directory structure is created when the batch is created and
deleted when the batch is deleted, either as the result of explicit instructions
from the client (using the delete batch function, see “BES_delete_batch()” on
page 645) or as the result of successful committal.

The client can modify only one field: the expected batch total. Batch Entry
Services itself modifies the actual batch total, if required. (The actual batch
total is computed as the sum of all document index values for the particular
index. Batch totals are computed only if the boolean batch_total in the BES_
dyn_hdr_desc_typ is TRUE.

typedef struct {
unsigned short index_id;
char index_name[FN_MAX_BIG_O_LEN + 1];
unsigned short index_type;
unsigned short max_string_len;
char menu_name[FN_MAX_ANYNAMELEN + 1];
FN_BOOL verify_flag;
FN_BOOL required_flag;
FN_BOOL batch_tot_flag;
FN_BOOL up_case_flag;
short source;
FP_number exp_total;
FP_number act_total;
char mask[FN_MAX_IXMASKLEN + 1];
} BES_ixdir_desc_typ;

The BES_ixdir_desc_typ structure has the following fields:

index_id unsigned short. Index number.

index_name char. User-defined index name.

index_type unsigned short. Index type. See “INX_value_type_typ” on


page 379.

208 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_ixdir_desc_typ

max_string_len
unsigned short. Maximum string length (string types only).

menu_name char. Name of the menu associated with this index (menu
types only).

verify_flag FN_BOOL. TRUE if this index is to be verified.

required_flag FN_BOOL. TRUE if this index is required.

batch_tot_flag FN_BOOL. TRUE to compute batch totals on this index.

up_case_flag FN_BOOL. TRUE to convert strings to upper case prior to


committal committed.

source short. Source of index value. Can be o e of the following:


BES_SOURCE_UNKNOWN
BES_MANUAL Index values were entered manually
BES_OCR Image has been processed by
optical character recognition
equipment
BES_APERTURE Index value was taken off of an
aperture card

exp_total FP_number. Value the client expects for the total of all values
of this index.

act_total FP_number. Value that Batch Services computes for the total
of all values of this index.

mask char. Display mask (numeric and date types only).

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 209


6 Data Types and Structures
BES_ixval_desc_typ

BES_ixval_desc_typ
This structure is returned by BATCHLIB_find_batch_docs(), BES_find_docs(),
and BES_get_image_index(). This structure is input for BATCHLIB_update_
batch_doc() and BES_create_doc().

typedef struct {
unsigned short index_id;
unsigned short index_type;
char index_value[BES_MAX_INDEX_LEN + 1];
short data_status;
} BES_ixval_desc_typ;

The BES_ixval_desc_typ structure has the following fields:

index_id unsigned short. Index number.

index_type unsigned short. Index type. Can be one of the following:


‘1’ = numeric
‘2’ = string
‘4’ = menu
‘8’ = date

index_value char. Index value, character array of maximum length BES_


MAX_INDEX_LEN + 1 (including the NULL terminator).

data_status short. Used by OCR in IMS 2.8 or later.

210 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_ixval_spec_typ

BES_ixval_spec_typ
This structure is used in the BES_info_rec_typ structure for BES_get_info()
and BES_set_info() functions.

typedef struct {
FN_docnum_typ index_id;
unsigned short index_id;
} BES_ixval_spec_typ;

The BES_ixval_spec_typ structure has the following fields:

doc_id FN_docnum_typ. Document ID.

index_id unsigned short. Index number.

See Also
“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 211


6 Data Types and Structures
BES_mkf_ixval_desc_typ

BES_mkf_ixval_desc_typ
This structure specifies a batch index value record. There is one batch index
value record for each index in each document. For example, if a document
class has n indexing fields and a batch has m documents, the batch at the
time of committal will have n times m batch_ixval records.

The client creates the records when each document is created. The records
are deleted when the batch is deleted, either as the result of explicit
instructions from the client (using the delete batch function, see “BES_delete_
batch()” on page 645) or as the result of successful committal.

The client also can delete selected batch_ixval records by using the delete
document and update document functions (see “BES_delete_doc()” on
page 646 and “BES_update_doc()” on page 688). Batch Entry Services
allows the client to update certain fields in the batch_ixval records.

typedef struct {
unsigned short index_id;
unsigned short index_type;
unsigned short index_len;
char index_value[BES_MAX_INDEX_LEN + 1];
short data_status;
} BES_mkf_ixval_desc_typ;

The BES_mkf_ixval_desc_typ structure has the following fields:

index_id unsigned short. Index ID.

index_type unsigned short. Index type. See “INX_value_type_typ” on


page 379.

index_len unsigned short. Length of index value.

index_value char. Value of index.

data_status short. Used in IMS 2.8 or later. Confidence level (for OCR).

212 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_stat_hdr_desc_typ

BES_stat_hdr_desc_typ
This structure describes a batch static header. There is one batch static
header for each batch. The batch static header contains document class
information. The class information is only a snapshot of the document class
definition at the time the batch was created because document class
definitions can change, possibly invalidating certain invariant conditions in the
batch.

The batch static header record has the following features:

• Creation occurs when the batch is created.

• Data in the structure cannot be modified by the Batch Entry Services


client, but certain fields are updated by Batch Entry Services itself when
the batch is opened.

• Deletion occurs when the batch is deleted, either as the result of explicit
instructions from the client (using the delete batch function, see “BES_
delete_batch()” on page 645) or as the result of successful committal.

BES_stat_hdr_desc_typ is used in the BES_hdr_desc_typ structure. See


“BES_hdr_desc_typ” on page 201.

typedef struct {
short open_flag;
unsigned long queue;
long qtime;
FN_time_typ create_time;
SCT_id create_user_id;
FN_BOOL tab_out_flag;
char doc_class_name[FN_MAX_DCNAMESIZE + 1];
short num_indices;
short num_reqd_indcs;
short num_menus;
char indexing_form[FN_MAX_ANYNAMELEN + 1];
SCT_access_restrictions access_restrct;
unsigned short cluster_space;
unsigned short cluster_index;
unsigned long fam_id;
char wfl_queue_name[FN_MAX_WFQUEUENAME + 1];
char wfl_sys_name[FN_MAX_WFSYSNAME + 1];
short retent_disp;
short retent_base;
short retent_offset;

December 1996 WAL for Windows Programmer’s Reference Manual 213


6 Data Types and Structures
BES_stat_hdr_desc_typ

long act_pages;
long act_docs;
long next_doc_id;
} BES_stat_hdr_desc_typ;

The BES_stat_hdr_desc_typ structure has the following fields:

open_flag short. The batch locking state. A batch can be busy or


available. If BES_AVAILABLE, the batch can be opened; if
BES_BUSY, the batch is currently open.

queue unsigned long. The logical queue in which the batch resides.
Can be one of the following:
BES_NO_QUEUE 0 Not in any queue yet.
BES_UNCOMMIT_QUEUE 1 Errors from committal.
BES_COMMIT_QUEUE 2 Committal queue.
BES_INPROGRESS_QUEUE 3 Worked on by daemon.
BES_OCR_QUEUE 4 Batch in OCR queue.

qtime long. Time the batch was queued (placed in the queue).

create_time FN_time_typ. Time the batch was created.

create_user_id SCT_id. ID of the user who created batch.

tab_out_flag FN_BOOL. TRUE if user can complete FileNet indexing by


tabbing off of the indexing form.

doc_class_name
char. Name of the document class to which the documents in
the batch belong.

num_indices short. Number of user-defined indexing fields in the


document class.

num_reqd_indcs
short. Number of indexing fields whose values must be
defined.

num_menus short. Number of indexing fields in the document class that


are menus.

indexing_form char. Name of the FileNet-side form used to index the


documents in the batch.

214 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
BES_stat_hdr_desc_typ

access_restrct SCT_access_restrictions. Security to be assigned to the


documents in the batch once they are committed.

cluster_space unsigned short. If clustering, space into which the documents


should be clustered.

cluster_index unsigned short. If clustering, identification (Index ID) on


which the cluster keys are to be generated.

fam_id unsigned long. ID of optical disk family to which documents


will be written or 0 if clustering.

wfl_queue_name
char. Name of the WorkFlo queue associated with the
document class. The documents in the batch will be assigned
to this queue when committed.

wfl_sys_name char. Name of the WorkFlo system associated with the


document class. The documents in the batch will be assigned
to this system when committed.

retent_disp short (char). Retention disposition associated with the


document class. This value will be assigned to each
document in the batch when committed. Can be one of the
following:
FN_DELETE ‘\0’
FN_ARCHIVE ‘1’
FN_PURGE ‘2’

retent_base short (char). Retention base associated with the document


class. This value will be assigned to each document in the
batch when committed. Can be one of the following:
FN_REL_TO_CLOSING ‘\0’
FN_REL_TO_ENTRY ‘1’
FN_REL_TO_LAST_ACCESS ‘2’
FN_ABSOLUTE ‘3’

retent_offset short. Retention offset (months from base) associated with


the document class. This value will be assigned to each
document in the batch when committed.

act_pages long. Actual number of pages currently in the batch.

act_docs long. Actual number of documents currently in the batch.

December 1996 WAL for Windows Programmer’s Reference Manual 215


6 Data Types and Structures
BES_stat_hdr_desc_typ

next_doc_id long. Next document ID to assign (0 relative).

See Also
“FN_time_typ” on page 264

“SCT_access_restrictions” on page 481

“SCT_id” on page 483

216 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
CAM_attr_typ

CAM_attr_typ
This enumeration specifies five enumerated constants that describe the
attributes of a local cache object. This enumeration is used in the CAM_get_
attr() and CAM_set_attr() functions.

The fifth attribute, CAM_attr_csum, is new in release 3.1. It stores the


computed checksum of an image.

typedef enum {
CAM_attr_page_count,
CAM_attr_target_size,
CAM_attr_current_size,
CAM_attr_xact_busy,
CAM_attr_csum
} CAM_attr_typ;

The CAM_attr_typ enumeration has the following enumerators:

CAM_attr_page_count 0 The page count of the document (not an individual page


number). The value is of type WORD.
CAM_attr_target_size 1 Size of object that you want to retrieve. The value is of
type DWORD.
CAM_attr_current_size 2 Current size of the object in the local cache. The value is
of type DWORD.
CAM_attr_xact_busy 3 If TRUE, the object is not finished writing to CAM. If
FALSE, the object is ready to be used. The value is of
type BOOL.
CAM_attr_csum 4 The computed check sum of the image. The value is of
type DWORD.

December 1996 WAL for Windows Programmer’s Reference Manual 217


6 Data Types and Structures
CAM Constants

CAM Constants

CAM_MAX_FNAME 12 Maximum length of file name.


CAM_MAX_PATH 80 Maximum length of the path.

218 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
cluster_key_typ

cluster_key_typ
This structure specifies data about space and the cluster ID. Clusters are
collections of optical disks, linked together to optimize the speed in which
documents are stored and retrieved.

typedef struct {
unsigned short cluster_space;
unsigned short cluster_id[3];
} cluster_key_typ;

The cluster_key_typ structure has the following fields:

cluster_space unsigned short.

cluster_id unsigned short.

December 1996 WAL for Windows Programmer’s Reference Manual 219


6 Data Types and Structures
CSM_cache_access_mode

CSM_cache_access_mode
typedef unsigned short CSM_cache_access_mode;

CSM_cache_access_mode has the following defined constants:

CSM_CACHE_READ 0x0001
CSM_CACHE_WRITE 0x0002
CSM_CACHE_DELETE 0x0004
CSM_CACHE_READWRITE (CSM_CACHE_READ | CSM_CACHE_WRITE)
CSM_CACHE_READDELETE (CSM_CACHE_READ | CSM_CACHE_DELETE)
CSM_CACHE_WRITEDELETE (CSM_CACHE_WRITE | CSM_CACHE_DELETE)
CSM_CACHE_READWRITEDELETE CSM_CACHE_READ | CSM_CACHE_WRITE | CSM_
CACHE_DELETE)

220 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
CSM_cache_id_typ

CSM_cache_id_typ
This type specifies the cache ID.

typedef short CSM_cache_id_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 221


6 Data Types and Structures
CSM_object_attr_typ

CSM_object_attr_typ
This structure specifies CSM object attributes that are accessible to the client.

typedef struct {
unsigned long max_length;
unsigned long cur_length;
FN_time_typ created;
FN_time_typ last_read;
FN_time_typ duration;
SCT_access_restrictions security;
unsigned short client_attr[CSM_CLIENT_ATTR_ELMNTS];
} CSM_object_attr_typ;

The CSM_object_attr_typ structure has the following fields:

max_length unsigned long. Maximum length of object. Defines the largest


size the object can attain, in bytes. It is set when an object is
created; using IAFLIB_resize_cache_object() to modify it
upward will result in a re-allocation of space for the object,
which might fail.

cur_length unsigned long. Current length of object. It is set implicitly by


IAFLIB_put_object() when you use this call to write data, or
can be set explicitly when you use this call to update an
object’s attributes.

created FN_time_typ (long). Time the object was created. It is set


implicitly when IAFLIB_create_cache_object() is called.

last_read FN_time_typ (long). Time last opened for read.

duration FN_time_typ (long). When opening an object or getting its


attributes, the duration attribute defines the time at which the
object can be flushed from the cache on a least-recently-
used basis. If it is zero, then the object is locked in the cache.
When used as input to IAFLIB_create_cache_object() and
IAFLIB_put_object() (to update the attributes), the client must
set the duration field to one of the constants listed below:
CSM_LOCKED_DURATION 0
Object is locked in the cache
CSM_PREFETCH_DURATION 1
For objects prefetched to cache
CSM_MIGRATE_DURATION 2
For objects migrated to cache

222 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
CSM_object_attr_typ

CSM_REFRESH_DURATION 3
For objects already read
CSM_CURRENT_DURATION 4
Don’t change current duration

CSM_LOCKED_DURATION is for objects that are to be


locked in the cache. CSM_PREFETCH_DURATION, CSM_
MIGRATE_DURATION, and CSM_REFRESH_DURATION
cause the object to be deleted no sooner than the current
time plus some number of seconds determined by a
configuration file for the Cache Service. These duration
values are typically specified only by the Document Services
software when putting objects into the retrieval cache.
Whenever an unlocked object is read from a cache, its
duration is modified to be the configured refresh duration
time. Clients using IAFLIB_put_object() on an existing object
can also specify that an object have CSM_CURRENT_
DURATION, in which case the duration value for the cache
will not be changed from its current value. If the cache is non-
ageable, any attempt to set the duration of an object to
something other than CSM_LOCKED_DURATION will result
in a NotAgeable error being returned.

security SCT_access_restrictions. Specifies an SCT_access_


restrictions data structure that defines the access restrictions
to be imposed on the object. It must be given when the object
is created.

client_attr unsigned short. An uninterpreted array of eight 16 bit words


that clients can use to define client-specific attributes of an
object. If not used, each element of the array should be set to
zero.

See Also
“FN_time_typ” on page 264

“SCT_access_restrictions” on page 481

December 1996 WAL for Windows Programmer’s Reference Manual 223


6 Data Types and Structures
CSM_object_desc_typ

CSM_object_desc_typ
This structure describes the CSM object that uniquely identifies an instance of
an object in a cache. There can be only one instance of a given CSM_object_
desc_typ in a cache at one time. Cache Services cannot validate any of the
fields in a CSM_object_desc_typ; it will only guarantee that the object does
not have the same CSM_object_desc_typ as other objects in the same cache.

typedef struct {
ASE_ssn_typ ssn;
ASE_doc_id_typ id;
ASE_page_number_typ page;
} CSM_object_desc_typ;

The CSM_object_desc_typ structure has the following fields:

ssn ASE_ssn_typ (unsigned long). System serial number.


Represents the system serial number of the system on which
the object was first created. It is important because it allows
objects from different systems to co-exist in the same cache.
All objects require a valid ssn field.

id ASE_doc_id_typ (unsigned long). Document ID. The ID is


typically an image ID or a document ID.

page ASE_page_number_typ (unsigned short). Document page.


The page within the document or the constant ASE_
INVALID_PAGE_NUMBER.

See Also
“ASE_doc_id_typ” on page 164

“ASE_page_number_typ” on page 173

“ASE_ssn_typ” on page 180

224 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
CSM_object_handle_typ

CSM_object_handle_typ
This type is a handle to the requested object. The server returns this type
when a request is made.

typedef unsigned long CSM_object_handle_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 225


6 Data Types and Structures
dir_entry_typ

dir_entry_typ
This structure specifies the document index record entry and associated data.

typedef struct {
char path_name[128];
time_t mod_time;
WORD st_mode;
WORD st_dev;
long st_size;
WORD start_page_no;
WORD end_page_no;
} dir_entry_typ;

The dir_entry_typ structure has the following fields:

path_name char. File name including the full path in the FileNet system.

mod_time time_t (long). Time of last modification of the file.

st_mode WORD. Bit mask for file-mode information.

st_dev WORD. Drive number of the disk containing the file.

st_size long. Size of the file in bytes.

start_page_no WORD. The page number that contains the beginning of the
file.

end_page_no WORD. The page number that contains the end of the file.

226 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DISPLIB Constants

DISPLIB Constants
The following table includes the Attribute Types:

DISP_ATTR_DISP_MODE 1 WORD parameter


DISP_ATTR_SCALE_FACTORS 2 PRECT parameter
DISP_ATTR_FORMAT 3 WORD parameter
DISP_ATTR_NATIVE_SIZE 4 POINT parameter
DISP_ATTR_SCALED_SIZE 5 POINT parameter
DISP_ATTR_RESOLUTION 6 WORD parameter
DISP_ATTR_SCALE_TO_FIT 7 PRECT parameter
DISP_ATTR_FORM_HANDLE 8 PHANDLE parameter
DISP_ATTR_RETRV_CALLBACK 9 Callback for the DISPLIB_retrieve_cb
DISP_ATTR_INPUT_CALLBACK 10 Callback for the DISPLIB_input_cb
DISP_ATTR_STORE_ROTATION 11 WORD parameter
DISP_ATTR_TIFF_HANDLE 12 PHANDLE parameter
DISP_ATTR_UNSUPPORTED_TIFF 13 BOOL parameter
DISP_ATTR_EDIT_APPNAME 14 PHANDLE parameter
DISP_ATTR_EDIT_FILENAME 15 PHANDLE parameter
DISP_ATTR_FAVOR_MODE 16 WORD
DISP_ATTR_HWND 17 HWND
DISP_ATTR_OPERATIONS 19 DWORD
DISP_ATTR_TIFFTILED 20 WORD
DISP_ATTR_XRES 21 2 DWORD
DISP_ATTR_YRES 22 2 DWORD
DISP_ATTR_ORIENTATION 23 WORD parameter
DISP_ATTR_DIB_BITS 24 WORD parameter. Color bits for dib and
bmp only.

December 1996 WAL for Windows Programmer’s Reference Manual 227


6 Data Types and Structures
DISPLIB Constants

Display Modes:

DISP_PRESET 1 To use previously set scaling factors


DISP_SCALE 2 To use supplied scaling factors
DISP_EGA 3 For EGA viewing
DISP_100DPI 4 Scales image to 100 dpi before displaying
DISP_WHOLE 5 Optimum scaling to fit in rect

Formats:

DISPLIB_unknown 0 Client does not know image’s format. If it is used,


the image format will be checked and returned.
DISPLIB_fn_image 1 FileNet banded images. It can be FileNet Group 3
Compressed, FileNet Group 4 Compressed, or
FileNet (Banded) Raw Format.
DISPLIB_fn_cold 2 FileNet COLD format
DISPLIB_fn_form 3 FileNet UNIX form formats
DISPLIB_fn_pcform 4 FileNet PC form format
DISPLIB_fn_wordflo 5 FileNet WordFlo image format
DISPLIB_fn_tiled 6 FileNet tiled image format
DISPLIB_fn_other 7 FileNet other format. For example, archived files
become documents of type OTHER.
DISPLIB_fn_format(x) ((x) > 0 A macro that returns TRUE when x is a FileNet
&& format; FALSE, otherwise.
(x) < 10)
DISPLIB_bmp 10 Windows 2 bitmaps
DISPLIB_pcx 11 PCX format
DISPLIB_dib_pm 12 OS/2 Presentation Manager Device Independent
Bitmaps
DISPLIB_dib 13 Windows 3 device independent bitmaps
DISPLIB_msp 14 Windows 2 Microsoft Paint format
DISPLIB_tiff 15 Tag Image File Format (TIFF format)
DISPLIB_jpeg 16 JPEG format

228 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DISPLIB Constants

Rotation:

DISPLIB_0_DEGREES 0 Rotation of 0 degrees.


DISPLIB_90_DEGREES 1 Rotation of 90 degrees.
DISPLIB_180_DEGREES 2 Rotation of 180 degrees.
DISPLIB_270_DEGREES 3 Rotation of 270 degrees.

December 1996 WAL for Windows Programmer’s Reference Manual 229


6 Data Types and Structures
DISPLIB_input_cb

DISPLIB_input_cb
This structure describes the value of DISP_ATTR_INPUT_CALLBACK. The
DISPLIB_set_attr() function uses this structure to enable you to configure
your I/O functions for all paint operations. If you choose not to define your I/O
functions, the default input access methods are the standard file I/O functions.

To specify alternate I/O functions, you must first write alternate functions for
the open, close, seek, and read operations for a specific object. When the
application uses your alternate I/O function specified in this structure, your
function must return the address of the object to context_h.

The callback functions use the CALLBACK calling convention and must be
exported by including them in an EXPORTS statement in the application’s
module-definition file.

typedef struct {
HANDLE context_h;
error_typ (CALLBACK *open)(HANDLE, PSTR);
error_typ (CALLBACK *close)(HANDLE);
error_typ (CALLBACK *seek)(HANDLE, LONG, int, LPLONG);
error_typ (CALLBACK *read)(HANDLE, PSTR, WORD, PWORD);
} DISPLIB_input_cb;

The DISPLIB_input_cb structure has the following fields:

context_h HANDLE. Handle to the object.

CALLBACK *open
error_typ. Callback of the open function. For the default,
returns a handle to the opened file for a given filename. For
alternate callback function, returns a handle to the object.

CALLBACK *close
error_typ. Callback of the close function. See open, above.

CALLBACK *seek
error_typ. Callback of the seek function. See open, above.

CALLBACK *read
error_typ. Callback of the read function. See open, above.

Note Only FileNet images can use client callbacks for accessing the source data.
Formats such as FileNet Pcodes and FileNet forms cannot be rendered in
conjunction with client-defined callbacks for data acquisition.

230 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DISPLIB_retrieve_cb

DISPLIB_retrieve_cb
This structure describes the value of DISP_ATTR_RETRV_CALLBACK. The
DISPLIB_set_attr() function uses this structure to set the DISPLIB_retrieve_
typ retrieve callback function. This is the preferred method for setting the
retrieval callbacks. DISPLIB_set_retrieve() is for backward compatibility only.

typedef struct {
HANDLE context;
DISPLIB_retrieve_typ proc;
} DISPLIB_retrieve_cb;

The DISPLIB_retrieve_cb structure has the following fields:

context HANDLE. Handle to the object.

proc DISPLIB_retrieve_typ. Typedef of the callback function that


retrieves a committed FileNet banded image.

See Also
“DISPLIB_retrieve_typ()” on page 739

December 1996 WAL for Windows Programmer’s Reference Manual 231


6 Data Types and Structures
DOC_annotation_desc_typ

DOC_annotation_desc_typ
This structure describes the attributes of an annotation.

typedef struct {
ASE_doc_id_typ doc_id;
ASE_page_number_typ page;
DOC_annotation_id_typ annot_id;
FN_time_typ created;
FN_time_typ modified;
SCT_access_restrictions security;
unsigned short annot_len;
byte annot[DOC_MAX_ANNOTATION_LEN];
} DOC_annotation_desc_typ;

The DOC_annotation_desc_typ structure has the following fields:

doc_id ASE_doc_id_typ. The ID of the document that is annotated.

page ASE_page_number_typ. The number of the page within this


document that is annotated.

annot_id DOC_annotation_id_typ. The annotation ID of this


annotation, unique only within the given document page.

created FN_time_typ. The date and time that the annotation was
created.

modified FN_time_typ. The date and time that the annotation was last
modified.

security SCT_access_restrictions. The access restrictions on this


annotation.

annot_len unsigned short. The length of the annotation data pointed to


by annot.

annot byte. The annotation data. It is a left-justified string of annot_


len bytes and has a maximum length of DOC_MAX_
ANNOTATION_LEN bytes. The data is a series of 0 or more
<attributes>. Each <attribute> consists of three components:
<tag> <length> <value> where:

<tag> is 1 byte in size and specifies the attribute type.

232 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_annotation_desc_typ

<length> is 2 bytes in size and specifies the byte length of


<value>. This field is an unsigned 16-bit integer
that must be stored in 68000 format (i.e., the high
order byte is followed by the low order byte).

<value> is <length> bytes in size and contains the data.

Non-FileNet developed applications should use only the


following attribute types:

3 The data is text. Translation will be performed if


the character set filtration option is on
(TranslateStyle=1). Client libraries make no
assumptions about the content of the text in the
<value> field of this attribute. Applications must
handle issues of terminating null characters,
CR/LF, etc.

240 Specifies that the data is for VAR use only. Client
libraries and FileNet applications ignore this
attribute. A VAR can use this attribute to
encapsulate proprietary information.

See Also
“ASE_doc_id_typ” on page 164

“ASE_page_number_typ” on page 173

“DOC_annotation_id_typ” on page 234

“FN_time_typ” on page 264

“SCT_access_restrictions” on page 481

December 1996 WAL for Windows Programmer’s Reference Manual 233


6 Data Types and Structures
DOC_annotation_id_typ

DOC_annotation_id_typ
This structure specifies the ID of an annotation. An annotation ID is the page-
relative identifier of an annotation on a page. There is no order implied by this
identifier, and annotations can be non-contiguous. Annotation IDs will not
change, even if an annotation with a lower number is deleted.

typedef struct {
unsigned long high_order;
unsigned long low_order;
} DOC_annotation_id_typ;

The DOC_annotation_id_typ structure has the following fields:

high_order unsigned long.

low_order unsigned long.

234 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_annotation_typ

DOC_annotation_typ
This structure specifies the type of an annotation.

typedef byte * DOC_annotation_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 235


6 Data Types and Structures
DOC_committal_desc_typ

DOC_committal_desc_typ
This structure describes the information used to commit a document. This
information is passed to Document Services when a document is to be
committed on the system.

typedef struct {
ASE_doc_id_typ doc_id;
ASE_service_name_typ cache;
ASE_ssn_typ ssn;
unsigned short images_num;
ASE_image_id_typ * images;
INX_fam_id_typ family_id;
SCT_access_restrictions security;
INX_dcl_name_typ doc_class;
INX_doc_type_typ doc_type;
INX_cluster_key_typ cluster;
FN_BOOL tolerate_dups;
unsigned short indexes_len;
unsigned short indexes_num;
DOC_index_value_typ * indexes;
} DOC_committal_desc_typ;

The doc_class, doc_type, ssn, indexes_len, indexes_num, and indexes fields


are not strictly required, and can be set to zero if not applicable. They are
written to optical disk, along with the pages, for the following two reasons:
first, to permit the index database to be rebuilt from optical disk; second, to
permit intersystem document transfer via optical disk. In general, fill all fields
whenever possible. The DOC_committal_desc_typ structure has the following
fields:

doc_id ASE_doc_id_typ. The document ID of the document to be


committed. By convention it is the same ID as the first image
of the document.

cache ASE_service_name_typ. The name of the cache from which


to get the pages of the document. Cannot be null.

ssn ASE_ssn_typ. The system serial number to be used for


finding the uncommitted images in the cache. This value is
concatenated with the image IDs to build the CSM_object_
desc_typ. If ssn is zero, the system serial number of the
Document Service’s station is assumed.

images_num unsigned short. The number of images pointed to by images.

236 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_committal_desc_typ

images ASE_image_id_typ *. A list of image IDs that are to be the


pages of the document; all must be located in the above-
named cache, all must have the ssn indicated above, and all
must have a page number of ASE_INVALID_PAGE_
NUMBER.

family_id INX_fam_id_typ (unsigned long). The family to which the


document should be committed.

security SCT_access_restrictions. The access restrictions to be


imposed on the document.

doc_class INX_dcl_name_typ. The name of the document class to


which the document belongs. Character array of size FN_
MAX_DCNAMESIZE +1.

doc_type INX_doc_type_typ (byte). The type of the document (e.g.,


image, text, form, mixed).

cluster INX_cluster_key_typ. The cluster key for the document; if


clustering is not desired use INX_INVALID_CLUSTER_KEY.

tolerate_dups FN_BOOL. If this field is TRUE and the doc_id in this


structure is a duplicate of an already committed document,
then the DOC_commit_doc() function will do nothing and
return successfully. This should be used only when re-
committing one or more documents when it is not known if
the documents committed successfully before.

indexes_len unsigned short. The (exclusive) length in bytes of all the


indexes that are pointed to be indexes (see below).

indexes_num unsigned short. The number of indexes pointed to by indexes


(see below).

indexes DOC_index_value_typ. A list of indexes by which the


document is going to be indexed. No validation on these
indexes is performed; it is the client’s responsibility to provide
adequate and consistent indexing information.

See Also
“ASE_doc_id_typ” on page 164

“ASE_image_id_typ” on page 167

December 1996 WAL for Windows Programmer’s Reference Manual 237


6 Data Types and Structures
DOC_committal_desc_typ

“ASE_service_name_typ” on page 178

“ASE_ssn_typ” on page 180

“DOC_index_value_typ” on page 245

“INX_cluster_key_typ” on page 358

“INX_dcl_name_typ” on page 361

“INX_doc_type_typ” on page 363

“INX_fam_id_typ” on page 365

“SCT_access_restrictions” on page 481

238 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_doc_attribute_value_typ

DOC_doc_attribute_value_typ
This structure contains the attributes that can be modified. The other
attributes of a document in the locator database (such as, pages, primary_
surface, and primary_offset) are read-only to clients.

typedef struct {
unsigned short attr_type;
union {
SCT_access_restrictions security;
ASE_document_status_typ status;
} attr_union;
} DOC_doc_attribute_value_typ;

The DOC_doc_attribute_value_typ structure has the following fields:

attr_type unsigned short. Indicate the attribute. Can be one of the


following:
DOC_SECURITY_ATTRIBUTE
DOC_PRIMARY_STATUS_ATTRIBUTE
DOC_SECONDARY_STATUS_ATTRIBUTE

security SCT_access_restrictions. The new read, write, and append/


execute access restrictions to be imposed on the document.

status ASE_document_status_typ. For primary and secondary


status. Primary is the new status of the document’s primary
optical disk copy; secondary is the new status of the
document’s secondary optical disk copy.

See Also
“ASE_document_status_typ” on page 165

“SCT_access_restrictions” on page 481

December 1996 WAL for Windows Programmer’s Reference Manual 239


6 Data Types and Structures
DOC_doc_location_desc_typ

DOC_doc_location_desc_typ
This structure contains the data that is maintained for each document by the
document locator database.

typedef struct {
ASE_doc_id_typ doc_id;
ASE_surface_id_typ primary_surface_id;
ASE_surface_offset_typ primary_offset;
ASE_document_status_typ primary_status;
ASE_surface_id_typ secondary_surface_id;
ASE_surface_offset_typ secondary_offset;
ASE_document_status_typ secondary_status;
ASE_page_number_typ pages;
ASE_ssn_typ original_ssn;
ASE_doc_id_typ original_doc_id;
SCT_access_restrictions security;
ASE_service_name_typ cache;
} DOC_doc_location_desc_typ;

The DOC_doc_location_desc_typ structure has the following fields:

doc_id ASE_doc_id_typ. The ID of the document.

primary_surface_id
ASE_surface_id_typ. The ID of the primary (family) surface to
which the copy is written; set to ASE_INVALID_SURFACE_
ID if the primary copy has not been written to optical disk.

primary_offset ASE_surface_offset_typ. The sector address of the


document on the primary (family) surface; set to ASE_
INVALID_SURFACE_OFFSET if the primary copy has not
been written to optical disk.

primary_status ASE_document_status_typ. The status of the primary copy


on optical disk.

secondary_surface_id
ASE_surface_id_typ. The ID of the secondary (transaction
logging) surface to which the copy is written; set to ASE_
INVALID_SURFACE_ID if the secondary copy has not been
written to optical disk.

secondary_offset
ASE_surface_offset_typ. The sector address of the

240 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_doc_location_desc_typ

document on the secondary (transaction logging) surface; set


to ASE_INVALID_SURFACE_OFFSET if the secondary copy
has not been written to optical disk.

secondary_status
ASE_document_status_typ. The status of the secondary
(transaction) copy on optical disk.

pages ASE_page_number_typ. The number of pages in the


document.

original_ssn ASE_ssn_typ. The system serial number of the system on


which this document was originally created; set to ASE_
invalid_ssn if it was first created on the local system.

original_doc_id
ASE_doc_id_typ. The document ID by which this document is
known on the system where it was created; set to ASE_
INVALID_DOC_ID if it was first created on the local system.

security SCT_access_restrictions. The access restrictions on the


document.

cache ASE_service_name_typ. The name of the cache in which the


document resides if it has not been migrated to optical disk,
or null if it has.

See Also
“ASE_doc_id_typ” on page 164

“ASE_document_status_typ” on page 165

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“ASE_ssn_typ” on page 180

“ASE_surface_id_typ” on page 181

“ASE_surface_offset_typ” on page 182

“SCT_access_restrictions” on page 481

December 1996 WAL for Windows Programmer’s Reference Manual 241


6 Data Types and Structures
DOC_family_create_server_typ

DOC_family_create_server_typ
This structure contains server information that is used when creating a new
optical disk family.

typedef struct {
ASE_server_id_typ server_id;
unsigned short desired_current_surfaces;
FN_BOOL preferred_osars_valid;
ASE_osar_id_typ preferred_osars[ASE_MAX_CURR_SURFS];
} DOC_family_create_server_typ;

The DOC_family_create_server_typ structure has the following fields:

server_id ASE_server_id_typ. The OSAR server ID that this record


describes.

desired_current_surfaces
unsigned short. The number of surfaces that can be current
(i.e., writable) at any one time for the family.

preferred_osars_valid
FN_BOOL. TRUE if preferred_osars contains valid
information; if TRUE, then the number of valid entries must
be equal to desired_current_surfaces.

preferred_osars
ASE_osar_id_typ. A list of the IDs of preferred OSARs.

See Also
“ASE_osar_id_typ” on page 172

“ASE_server_id_typ” on page 177

242 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_family_server_desc_typ

DOC_family_server_desc_typ
This structure contains the optical disk family information for a server. Only
DOC_family_desc_type uses this structure.

typedef struct {
ASE_server_id_typ server_id;
unsigned short desired_current_surfaces;
unsigned short actual_current_surfaces;
ASE_surface_id_typ current_surfaces[ASE_MAX_CURR_SURFS];
ASE_surface_id_typ previous_surfaces[ASE_MAX_CURR_SURFS];
ASE_osar_id_typ preferred_osars[ASE_MAX_CURR_SURFS];
} DOC_family_server_desc_typ;

The DOC_family_server_desc_typ structure has the following fields:

server_id ASE_server_id_typ. The ID of the server.

desired_current_surfaces
unsigned short. The number of surfaces that can be current
(i.e., writable) at any one time for the family.

actual_current_surfaces
unsigned short. The number of surfaces that are current at
the moment; this will deviate from desired_current_surfaces
only if the latter has changed recently.

current_surfaces
ASE_surface_id_typ. A sequence of IDs for the current
surfaces; the sequence will be of length actual_current_
surfaces.

previous_surfaces
ASE_surface_id_typ. A sequence of IDs for the previous
surfaces; the sequence will be of length actual_current_
surface if interleaving is TRUE, zero otherwise. It is used
when interleaving to determine which cartridge to return to.

preferred_osars
ASE_osar_id_typ. A sequence of OSAR IDs into which new
surfaces will be placed. The sequence will be of length
desired_current_surfaces. Document Services will step
through the sequence when placing new cartridges.

December 1996 WAL for Windows Programmer’s Reference Manual 243


6 Data Types and Structures
DOC_family_server_desc_typ

See Also
“ASE_osar_id_typ” on page 172

“ASE_server_id_typ” on page 177

“ASE_surface_id_typ” on page 181

244 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_index_value_typ

DOC_index_value_typ
This structure is similar to the INX_index_value_typ structure, except indexes
are identified by their names rather than their index IDs. This structure
provides independence from the local Index service, thus enabling the
document to be imported on another system that has compatible indexes.

This is a variable-length structure, dependent on the length of the data. An


instance of this type always begins on word (2-byte) boundaries. The index_
name is FN_MAX_IXNAME + 1 bytes (plus a pad byte to make it even). The
type is 2 bytes. The string length, if present, is 2 bytes. The data is padded to
an even number of bytes if necessary. Strings do not have terminating nulls.
Byte data occupies the first byte of the 2-byte area used to store it.

typedef struct {
INX_index_name_typ index_name;
char _pad;
INX_value_type_typ type;
char data[2];
} DOC_index_value_typ;

The DOC_index_value_typ structure has the following fields:

index_name INX_index_name_typ. The name of the index.

_pad char. Not used; just to pad to even boundary.

type INX_value_type_typ. The type of the data item.

data char. The value that is type-dependent. Can be longer or


shorter.

See Also
“INX_index_name_typ” on page 372

“INX_value_type_typ” on page 379

December 1996 WAL for Windows Programmer’s Reference Manual 245


6 Data Types and Structures
DOC_migrate_order_typ

DOC_migrate_order_typ
This type specifies the order in which the pages of a document are migrated
from optical disk.

typedef unsigned short DOC_migrate_order_typ

DOC_migrate_order_typ has the following defined constants:

DOC_ASCENDING 1 Retrieve pages in ascending order; some following


pages are likely to be migrated as well.
DOC_DESCENDING 2 Retrieve pages in descending order; some
preceding pages are likely to be migrated as well.
DOC_EXACT_ASCENDING 3 Retrieve pages in ascending order; following pages
will not be migrated.
DOC_EXACT_DESCENDING 4 Retrieve pages in descending order; preceding
pages will not be migrated.

246 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DOC_surface_desc_typ

DOC_surface_desc_typ
This structure contains a description of an optical disk surface. This structure
contains the data kept in the Document Server’s locator database on each
optical disk surface known to the system.

typedef struct {
ASE_surface_id_typ surface_id;
INX_fam_id_typ family_id;
FN_BOOL surface_unavailable;
FN_BOOL write_protect;
unsigned short sides;
FN_time_typ label_date;
FN_time_typ full_date;
FN_time_typ archive_date;
unsigned long surface_size;
ASE_ssn_typ original_ssn;
ASE_surface_id_typ original_surface_id;
unsigned long active_docs;
unsigned long deleted_docs;
unsigned long clusters;
unsigned long sectors;
unsigned long pages;
ASE_server_id_typ server_id;
} DOC_surface_desc_typ;

The DOC_surface_desc_typ structure has the following fields:

surface_id ASE_surface_id_typ. The ID of this surface.

family_id INX_fam_id_typ. The ID of the family to which this surface


belongs; family ID number 1 is the transaction logging family.

surface_unavailable
FN_BOOL. TRUE if the surface should not be used for reads
or writes.

write_protect FN_BOOL. TRUE if the surface cannot be used for writes.

sides unsigned short. The number of sides on the cartridge


containing the surface.

label_date FN_time_typ. The date and time at which the surface was
entered in the system.

December 1996 WAL for Windows Programmer’s Reference Manual 247


6 Data Types and Structures
DOC_surface_desc_typ

full_date FN_time_typ. The date and time at which the surface filled
up.

archive_date FN_time_typ. The date and time at which the surface was
archived.

surface_size unsigned long. The number of 1024-byte sectors on the


surface.

original_ssn ASE_ssn_typ. The SSN of the system on which the surface


was originally created; set to ASE_INVALID_SSN if local.

original_surface_id
ASE_surface_id_typ. The ID of the surface as it was known
on its original system; set to ASE_INVALID_SURFACE_ID if
local.

active_docs unsigned long. The number of currently accessible


documents on the surface.

deleted_docs unsigned long. The number of deleted documents on the


surface.

clusters unsigned long. The number of clusters on the surface.

sectors unsigned long. The number of sectors consumed on the


surface.

pages unsigned long. The total number of pages in all the active and
deleted documents on the surface.

server_id ASE_server_id_typ. The ID of the server that currently has


this surface.

See Also
“ASE_server_id_typ” on page 177

“ASE_ssn_typ” on page 180

“ASE_surface_id_typ” on page 181

“FN_time_typ” on page 264

“INX_fam_id_typ” on page 365

248 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DS_LIST

DS_LIST
typedef struct { /* VARIABLE SIZE */
ASE_service_name_typ IMS;
DS_LIST_ENTRY doc[1];
} DS_LIST;

The DS_LIST structure has the following fields:

IMS ASE_service_name_typ. Three-part NCH name for an Image


Management Service (IMS).

doc DS_LIST_ENTRY. Varies.

See Also
“ASE_service_name_typ” on page 178

“DS_LIST_ENTRY” on page 250

December 1996 WAL for Windows Programmer’s Reference Manual 249


6 Data Types and Structures
DS_LIST_ENTRY

DS_LIST_ENTRY
typedef struct {
FN_docnum_typ doc_id;
unsigned page_count;
} DS_LIST_ENTRY;

The DS_LIST_ENTRY structure has the following fields:

doc_id FN_docnum_typ. Specifies the document ID.

page_count unsigned. Specifies the number of pages in the document.

See Also
“FN_docnum_typ” on page 260

250 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DTM Masks

DTM Masks
Date and time masks are formed from separators and components. The
components represent parts of dates and times (such as days). Separators
show where one component stops and another starts. They are inserted in
the string exactly where you put them in the mask. Separators are optional.

For example, 11/24/90 is the twenty-fourth day of November in 1990. Here,


11, 24, and 90 are the components of the date. The slashes are separators.
This is not the only way to represent that date. For example, you could use
Nov. 24, 1990 or 11-24-90 by changing the separators and the date
components.

To use the date and time mask, you can set the components in the PCWS
reference file named in WIN.INI file. Examples include the following settings:

[DTM]
dd=dd ;Day of the month (1 – 31)
ddd=ddd ;Day of the year (1 – 366)
mm=mm ;Number of the month (1 – 12)
mon=mon ;Three-letter abbreviation of the month (Jan – Dec)
month=month ;Full name of the month (January – December)
yy=yy ;Last two digits of the year (00 – 99)
yyyy=yyyy ;All four digits of the year (0000 – 9999)
w=w ;Number for the day of the week (0 – 6, 0 = Sunday
; and 6 = Saturday)
day=day ;Three-letter abbreviation for the weekday (Sun – Sat)
dayname=dayname
;Full name of the day of the week (Sunday – Saturday)
hh=hh ;Hour of the day (0 – 23)
tt=tt ;Minutes of the hour (0 – 59)
ss=ss ;Seconds of the minute (0 – 59)
am=am ;Gives the time in a.m. or p.m. (p.m. is not shown);
;instead of using a 24-hour clock
ampm am pm ;Gives the time in a.m. or p.m.
DateMask=mm/dd/yyyy ;Default date mask
DateTimeMask=mm/dd/yyyy hh:tt:ss;Default time mask

The complete list of separators allowed in the date or time mask is:

, . / - < > ? : |
^ ; “ [ ] { } _ =
@ % + ( ) * & # <space>

December 1996 WAL for Windows Programmer’s Reference Manual 251


6 Data Types and Structures
DTM Masks

Examples
If a time variable is equivalent to Tuesday, June 7, 1983 at 32 seconds after
2:05 p.m., you can use the mask in the left column for the date output shown
in the right column:

mon. dd, yyyy Jun. 7, 1983


month dd, yyyy June 7, 1983
mon dd, yy (day) Jun 7, 83 (Tue)
hhttss 140532
hh:tt am 02:05 pm
dd-mm-yy, hh:tt 7-6-83, 14:05
mm/dd/yy, hh:tt:ss am 6/7/83, 02:05:32 pm
ddd, hh:tt:ss 165, 14:05:32
tt:ss am 05:32 pm

252 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
DTMdate_typ

DTMdate_typ
This type specifies the number of seconds after January 1, 1970.

typedef long DTMdate_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 253


6 Data Types and Structures
DTM_tm

DTM_tm
This structure categorizes the input from DTMdate_typ (the elapsed time
since January 1, 1970) into fields for seconds, minutes, and days.

typedef struct DTM_tm_struct {


int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
} DTM_tm;

The DTM_tm structure has the following fields:

tm_sec int. The number of seconds past the minute.

tm_min int. The number of complete minutes after the hour.

tm_hour int. The number of complete hours in the day.

tm_mday int. The day of the month. For example, this would be a 5 on
May 5th.

tm_mon int. The number representing the month. January is 0.

tm_year int. The number of the year.

tm_wday int. The number for the day of the week. Sunday is 0 and
Saturday is 6.

tm_yday int. The number for the day in the year. For example, January
1 is day 1 and February 10 is day 41.

tm_isdst int. Daylight savings time indicator. Non-zero means daylight


savings time. Zero means the time is not daylight savings
time.

254 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
error_typ

error_typ
This type is returned by the software to indicate that a fatal or non-fatal error
has occurred.

typedef long error_typ;

#define err_encode(category, function, number) \


((error_typ)((long)(category)<<24 | (long)(function)<<16 | (unsigned
short)(number)))

#define err_category(value) ((byte)((long)(value)>>24))

#define err_function(value) ((byte)((long)(value)>>16))

#define err_number(value) ((unsigned short)(value))

#define success ((error_typ) 0)


#define SUCCESS success

December 1996 WAL for Windows Programmer’s Reference Manual 255


6 Data Types and Structures
ERM Constants

ERM Constants

ERM_MAX_MODULE_NAME 15 Maximum length of the module name.


ERM_MAX_ERR_TEXT_LEN 255 Maximum length of the error text.
ERM_MAX_ERR_OUTPUT_LINE 270 ERM_MAX_MODULE_NAME + ERM_MAX_ERR_
TEXT_LEN
ERM_LIB_NAME “ERM” Name of the library (.LIB) file that contains the ERM
functions.

256 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FILLIN_bkgrequest_rec_typ

FILLIN_bkgrequest_rec_typ
This structure contains the background fill-in request record.

typedef struct {
WORD status;
WORD attempt_cnt;
char form_file[FILLIN_LEN_FILE_NAME+1];
char form_name[FORM_LEN_OBJ_NAME + 1];
char doc_class[FN_MAX_DCNAMESIZE + 1];
WORD num_indices;
ASE_service_name_typ BES;
ASE_service_name_typ RFS;
ASE_doc_id_typ doc_id;
BOOL form_page;
error_typ err;
} FILLIN_bkgrequest_rec_typ;

The FILLIN_bkgrequest_rec_typ structure has the following fields:

status WORD. Status of the committal information.

attempt_cnt WORD. Counts the number of trials.

form_file char. Name of the file that contains the fillin form.

form_name char. Name of the fillin form.

doc_class char. Document class name.

num_indices WORD. Number of user defined indices.

BES ASE_service_name_typ. Batch Entry Service Name (3-part


NCH name).

RFS ASE_service_name_typ. File service name (3-part NCH


name).

doc_id ASE_doc_id_typ. Document ID of the fillin page.

form_page BOOL. True means the document is a form page. False


means the document is an image.

err error_typ. Error tuple.

December 1996 WAL for Windows Programmer’s Reference Manual 257


6 Data Types and Structures
FILLIN_bkgrequest_rec_typ

See Also
“ASE_doc_id_typ” on page 164

“ASE_service_name_typ” on page 178

258 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FN_date_typ

FN_date_typ
This type specifies the number days before or since January 1, 1970.

typedef long FN_date_typ;

The following constant values are defined for FN_date_typ:

FN_MIN_DATE -2932600 10/25/-6060


FN_MAX_DATE 2932600 03/10/9999
FN_UNDEF_DATE -2000000000 Indicates that no date has been set.

December 1996 WAL for Windows Programmer’s Reference Manual 259


6 Data Types and Structures
FN_docnum_typ

FN_docnum_typ
This type specifies a number as a document ID.

typedef unsigned long FN_docnum_typ;

The following constant values are defined for FN_docnum_typ:

FN_MIN_DOCUMENT 1000 Minimum ID number for a document.


FN_MIN_CUST_DOCUMENT 73000 Minimum ID number for a client document.
FN_MAX_DOCUMENT 0xee6b2800 4000000000. Maximum ID for a document.
FN_UNDEF_DOCUMENT 0 Indicates no document ID.

260 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FN_folnum_typ

FN_folnum_typ
This type specifies the ID of a folder.

typedef unsigned long FN_folnum_typ;

FN_folnum_typ has the following defined constants:

FN_MIN_FOLDER 1000 Minimum ID number for a folder.


FN_MIN_CUST_FOLDER 50000 Minimum ID number for a client folder.
FN_MAX_FOLDER 0xFFFFFFFF 2(32) - 1
FN_UNDEF_FOLDER 0 Indicates no folder ID.
FN_ALL_DOCS_FOLDER 1 Indicates all folders.
ASE_ROOT_FOLDER_ID 1 Root folder is parent of all folders.

December 1996 WAL for Windows Programmer’s Reference Manual 261


6 Data Types and Structures
FN_selection_typ

FN_selection_typ
This type specifies information about the user selection.

typedef char FN_selection_typ[2];

FN_selection_typ has the following defined constants:

FN_MIN_SELECTION (char) 0x01


FN_MAX_SELECTION (char) 0xFF
FN_UNDEF_SELECTION (char) 0x00

262 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FN_server_version_typ

FN_server_version_typ
This structure defines the server software version. Version numbers are
returned from IAFLIB_get_server_version().

typedef struct {
unsigned long arch_num;
unsigned long major_num;
unsigned long minor_num;
unsigned long cycle_num;
} FN_server_version_typ;

The FN_server_version_typ structure has the following fields:

arch_num unsigned long. Indicates the system software release


number. For example, for server software 3.1.0.7, IAFLIB_
get_server_version() returns:

arch_num =3
major_num =1
minor_num =0
cycle_num =7

major_num unsigned long. See arch_num.

minor_num unsigned long. See arch_num.

cycle_num unsigned long. See arch_num.

December 1996 WAL for Windows Programmer’s Reference Manual 263


6 Data Types and Structures
FN_time_typ

FN_time_typ
This type designates the time in FileNet format.

typedef long FN_time_typ;

FN_time_typ has the following defined constants:

FN_MIN_TIME -1999999999
FN_MAX_TIME 2147000000 01/14/2038 04:53:20
FN_UNDEF_TIME FN_UNDEF_DATE

264 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FNP_data

FNP_data
This structure contains information that is specific to a client application
instance and its print request. It is essential to maintain this information during
the course of printing. This is especially true when there are multiple
instances of a client application independently requesting Local Printing
services. This structure is private to FNPRINT.

typedef struct {
HWND ClienthWnd;
HWND ParenthWnd;
HANDLE JobHandle;
HANDLE ClientHandle;
HDC PrtDC;
LPSTR FilePtr;
HANDLE LocalList;
unsigned Doc_cnt;
HANDLE hAbortDlg;
int curDocIndex;
} FNP_data;

The FNP_data structure has the following fields:

ClienthWnd HWND. Client application window.

ParenthWnd HWND. Parent window of the abort box (either the client
application window or the main window of FNPRINT).

JobHandle HANDLE. Print job ID.

ClientHandle HANDLE. IAFLIB client handle.

PrtDC HDC. Printer device context.

FilePtr LPSTR. File name of a page.

LocalList HANDLE. Handle to the local document list.

Doc_cnt unsigned. Total document count in the list.

hAbortDlg HANDLE. Abort dialog box handle.

curDocIndex int. Index to currently selected document.

December 1996 WAL for Windows Programmer’s Reference Manual 265


6 Data Types and Structures
FNP_request_typ

FNP_request_typ
This data structure transfers printing information between the client
application and FNPRINT. The structure is mainly used for printing
documents.

typedef struct {
ASE_page_range_typ Range;
WORD copies;
WORD style;
WORD disp_mode;
} FNP_request_typ;

The FNP_request_typ structure has the following fields:

Range ASE_page_range_typ. Document ID and page range. (The


ASE_page_range_typ data structure contains the document
ID and the first and last page numbers of that document.)

copies WORD. Number of uncollated copies

style WORD. Printing resolution: HI_RES indicates high resolution,


DRAFT indicates draft.

disp_mode WORD. Display mode. Among the various display modes that
are available in DISPIMG, only IAFLIB_ZOOM and IAFLIB_
QUARTER are used.

See Also
“ASE_page_range_typ” on page 174

266 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_BatchPageAttr_typ

FORM_BatchPageAttr_typ
This structure is used in FORM_BkgAttr_typ to specify the Batch type
background image.

typedef struct {
char BESName[FORM_LEN_SECURITY+1];
char BatchName[FN_MAX_BIG_O_LEN+1];
ASE_doc_id_typ ID;
} FORM_BatchPageAttr_typ;

The FORM_BatchPageAttr_typ structure has the following fields:

BESName char. Name of Batch Entry Service.

BatchName char. Name of the batch.

ID ASE_doc_id_typ. Image ID in the batch.

See Also
“ASE_doc_id_typ” on page 164

December 1996 WAL for Windows Programmer’s Reference Manual 267


6 Data Types and Structures
FORM_BitmapField_typ

FORM_BitmapField_typ
This structure stores data about a bitmap field.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
char Description[FORM_LEN_OBJ_DESC + 1];
HBITMAP hBitmap;
char RCName[FORM_LEN_OBJ_NAME + 1];
char FileName[FORM_LEN_FILE_NAME + 1];
WORD MapMode;
WORD BltMode;
DWORD RasterOp;
WORD BrushStyle;
DWORD BrushColor;
WORD BrushHatch;
DWORD BkColor;
DWORD UserAttr;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_BitmapField_typ;

The FORM_BitmapField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

Style WORD.

Description char. Description of the bitmap field.

hBitmap HBITMAP. Handle to bitmap or NULL. Name of bitmap in


resources, NULL if using .bmp file.

RCName char. Name of resource, which is defined in the resource


(.RC) file.

268 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_BitmapField_typ

FileName char. Name of the file that contains the bitmap.

MapMode WORD. MM_TEXT, MM_ISOTROPIC, etc.

BltMode WORD. Stretch mode.

RasterOp DWORD.

BrushStyle WORD.

BrushColor DWORD. Brush color.

BrushHatch WORD. Hatch style.

BkColor DWORD. Background color.

UserAttr DWORD. User defined.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

December 1996 WAL for Windows Programmer’s Reference Manual 269


6 Data Types and Structures
FORM_BkgAttr_typ

FORM_BkgAttr_typ
typedef struct {
FORM_BkgImage_typ ImageType;
union {
FORM_Page_Attr_typ Doc;
FORM_BatchPageAttr_typ Batch;
char File[FORM_LEN_FILE_NAME+1];
} Bkg;
} FORM_BkgAttr_typ;

The FORM_BkgAttr_typ structure has the following fields:

ImageType FORM_BkgImage_typ. Valid Image types are:


FORM_BKG_DOC_PAGE
FORM_BKG_BATCH_PAGE
FORM_BKG_FILE

Doc FORM_Page_Attr_typ.

Batch FORM_BatchPageAttr_typ.

File char. Name of the file that contains the background image.

See Also
“FORM_BatchPageAttr_typ” on page 267

“FORM_BkgImage_typ” on page 271

“FORM_PageAttr_typ” on page 320

270 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_BkgImage_typ

FORM_BkgImage_typ
This enumeration is used in FORM_BkgAttr_typ to indicate the background
image type.

typedef enum {
FORM_BKG_NONE,
FORM_BKG_DOC_PAGE,
FORM_BKG_BATCH_PAGE,
FORM_BKG_FILE
} FORM_BkgImage_typ;

The FORM_BkgImage_typ enumeration has the following enumerators:

FORM_BKG_NONE

FORM_BKG_DOC_PAGE

FORM_BKG_BATCH_PAGE

FORM_BKG_FILE

December 1996 WAL for Windows Programmer’s Reference Manual 271


6 Data Types and Structures
FORM_BrushAttr_typ

FORM_BrushAttr_typ
This structure stores brush attributes such as size, texture, and color.

typedef struct {
WORD BrushStyle;
DWORD BrushColor;
WORD BrushHatch;
} FORM_BrushAttr_typ;

The FORM_BrushAttr_typ structure has the following fields:

BrushStyle WORD. If BrushStyle is BS_HATCHED, the client must free


the handle contained in BrushHatch when finished.

BrushColor DWORD. Brush color.

BrushHatch WORD. Hatch style.

272 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ButtonField_typ

FORM_ButtonField_typ
This structure designates pushbutton fields.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
char Text[FORM_LEN_BUTTON_TEXT + 1];
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
FORM_Terminator_typ Terminator;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_ButtonField_typ;

The FORM_ButtonField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

Style WORD.

Text char. Text in the button.

Description char. Description of the button field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

December 1996 WAL for Windows Programmer’s Reference Manual 273


6 Data Types and Structures
FORM_ButtonField_typ

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

Terminator FORM_Terminator_typ. To be returned when button is


pushed.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

See Also
“FORM_Terminator_typ” on page 343

274 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_CheckboxField_typ

FORM_CheckboxField_typ
This structure designates checkbox fields.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
WORD Style;
FORM_Checked_typ DefaultVal;
FORM_Checked_typ Value;
char Text[FORM_LEN_BUTTON_TEXT + 1];
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_CheckboxField_typ;

The FORM_CheckboxField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100); display/actual height is


one row.

Style WORD.

DefaultVal FORM_Checked_typ. Default value of field.

Value FORM_Checked_typ. Value of field.

December 1996 WAL for Windows Programmer’s Reference Manual 275


6 Data Types and Structures
FORM_CheckboxField_typ

Text char. Text next to the box.

Description char. Description of the checkbox field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. Up to the user.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

See Also
“FORM_Checked_typ” on page 277

276 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_Checked_typ

FORM_Checked_typ
This enumeration specifies the values of checkboxes.

typedef enum {
FORM_UNCHECKED,
FORM_CHECKED,
FORM_UNDEF_CHECK
} FORM_Checked_typ;

FORM_Checked_typ enumeration has the following enumerators:

FORM_UNCHECKED Uncheck the checkbox.


FORM_CHECKED Check the checkbox.
FORM_UNDEF_CHECK No value has been assigned.

December 1996 WAL for Windows Programmer’s Reference Manual 277


6 Data Types and Structures
FORM_ColorAttr_typ

FORM_ColorAttr_typ
This structure specifies color attributes for a text field.

typedef struct {
DWORD FrColor;
DWORD BkColor;
} FORM_ColorAttr_typ;

The FORM_ColorAttr_typ structure has the following fields:

FrColor DWORD. Foreground, or color, to display text in.

BkColor DWORD. Text background color.

278 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ComboboxField_typ

FORM_ComboboxField_typ
typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
HANDLE hDefaultVal;
HANDLE hValue;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_ComboboxField_typ;

The FORM_ComboboxField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

Style WORD.

hDefaultVal HANDLE. Default value of field.

hValue HANDLE. Value of field.

December 1996 WAL for Windows Programmer’s Reference Manual 279


6 Data Types and Structures
FORM_ComboboxField_typ

Description char. The description of the date field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

280 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_data_type

FORM_data_type
This structure specifies the type ID of a value.

typedef unsigned char FORM_data_type;

FORM_data_type has the following defined constants:

FORM_NULL_TYPE 0 Null data.


FORM_NUMBER_TYPE 1 The value is of type FP_number.
FORM_STRING_TYPE 2 The value is a HANDLE to null-terminated string.
FORM_BOOLEAN_TYPE 3 The value is of type bool.
FORM_DATE_TYPE 4 The value is of type FN_date_typ.
FORM_TIME_TYPE 5 The value is of type FN_time_typ.
FORM_DOCUMENT_TYPE 6 The value is of type ASE_doc_id_typ.
FORM_FOLDER_TYPE 7 The value is of type folnum_typ.
FORM_SELECTION_TYPE 8 The value is of type FN_selection_typ.

December 1996 WAL for Windows Programmer’s Reference Manual 281


6 Data Types and Structures
FORM_DateField_typ

FORM_DateField_typ
This structure defines a date or a time field.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int ActualWidth;
char InputMask[FORM_LEN_FIELD_MASK + 1];
char OutputMask[FORM_LEN_FIELD_MASK + 1];
WORD Style;
FN_date_typ DefaultVal;
FN_date_typ Value;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
FN_date_typ Min;
FN_date_typ Max;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_DateField_typ;

The FORM_DateField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width is less than or equal to the actual width;
display/actual height is one row.

282 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_DateField_typ

ActualWidth int. Maximum columns of input data * 100.

InputMask char. The mask you want to input the date.

OutputMask char. The mask you want to use to output the date.

Style WORD.

DefaultVal FN_date_typ. Default value of field.

Value FN_date_typ. Value of field.

Description char. The description of the date field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

Min FN_date_typ. Minimum value of field.

Max FN_date_typ. Maximum value of field.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. Up to the user.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

December 1996 WAL for Windows Programmer’s Reference Manual 283


6 Data Types and Structures
FORM_DateField_typ

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

See Also
“FN_date_typ” on page 259

284 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_DateMaskAttr_typ

FORM_DateMaskAttr_typ
This structure specifies the input and output date mask.

typedef struct {
char InputMask[FORM_LEN_FIELD_MASK + 1];
char OutputMask[FORM_LEN_FIELD_MASK + 1];
} FORM_DateMaskAttr_typ;

The FORM_DateMaskAttr_typ structure has the following fields:

InputMask char. The mask you want to use to input the date.

OutputMask char. The mask you want to use to output the date.

December 1996 WAL for Windows Programmer’s Reference Manual 285


6 Data Types and Structures
FORM_DocField_typ

FORM_DocField_typ
This structure defines document, folder, and integer fields. Within this
structure, the DefaultVal, Value, Min, and Max fields are of type FN_docnum_
typ for documents and FN_folnum_typ for folders.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int ActualWidth;
WORD Style;
DWORD DefaultVal;
DWORD Value;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD Min;
DWORD Max;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_DocField_typ;

The FORM_DocField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width is less than or equal to the actual width;
display/actual height is one row.

286 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_DocField_typ

ActualWidth int. Maximum columns of input data * 100; no user-specified


mask.

Style WORD.

DefaultVal DWORD. Default value of field.

Value DWORD. Value of field.

Description char. The description of the document or folder field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

Min DWORD. Minimum value of field.

Max DWORD. Maximum value of field.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. Up to the user.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

December 1996 WAL for Windows Programmer’s Reference Manual 287


6 Data Types and Structures
FORM_DocField_typ

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

288 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_FieldAttr_typ

FORM_FieldAttr_typ
This enumeration specifies the current attribute of a specified call.

typedef enum {
FORM_FA_ALL,
FORM_FA_ACTUALSIZE,
FORM_FA_BACKCOLOR,
FORM_FA_BRUSH,
FORM_FA_CHARLIST,
FORM_FA_DEFAULT,
FORM_FA_DESCRIPTION,
FORM_FA_DISPLAYAREA,
FORM_FA_FIELDPROC,
FORM_FA_FILENAME,
FORM_FA_FONT,
FORM_FA_FORECOLOR,
FORM_FA_GROUP,
FORM_FA_HELP,
FORM_FA_MAPMODE,
FORM_FA_MASK,
FORM_FA_OBJNAME,
FORM_FA_ORDINAL,
FORM_FA_PEN,
FORM_FA_PROMPT,
FORM_FA_RANGE,
FORM_FA_RASTEROP,
FORM_FA_RESOURCE,
FORM_FA_ROUNDNESS,
FORM_FA_RULELIST,
FORM_FA_SECURITY,
FORM_FA_SIZE,
FORM_FA_STRETCHMODE,
FORM_FA_STYLE,
FORM_FA_TABLE,
FORM_FA_TERMCODE,
FORM_FA_TEXT,
FORM_FA_TEXTFORMAT,
FORM_FA_TYPE,
FORM_FA_USER,
FORM_FA_VALFUNC,
FORM_FA_VALUE,
FORM_FA_COLWIDTH
} FORM_FieldAttr_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 289


6 Data Types and Structures
FORM_FieldAttr_typ

The FORM_FieldAttr_typ enumeration has the following enumerators:

FORM_FA_ALL
FORM_FA_ACTUALSIZE The size of the actual data underlying an input field, for which the display
size can be different. Attr is a pointer to a POINT. Attr->x is the maximum
input width (columns * 100) of the field, and Attr->y is the maximum input
height (rows * 100). FORM_FA_ACTUALSIZE applies to date,
document, folder, number, string, and time fields only. For all but string
Attr-> is ignored and the standard size is used.
FORM_FA_BACKCOLOR The background color. Attr is a pointer to a DWORD created with the
RGB macro. This attribute applies to all fields except form fields. For
scrollbars, this is the bar color.
FORM_FA_BRUSH A Windows brush object for filling a graphics region. Attr is a pointer to a
structure of type FORM_BrushAttr_type. FORM_FA_BRUSH applies to
bitmap, ellipse, pattern, rectangle, and roundrect fields.
FORM_FA_CHARLIST A list of characters for controlling input to string fields. Attr is a pointer to
a handle. If NULL, all characters are allowed. If non-NULL, the handle
contains a null-terminated string of characters. Depending on the Style
field, the string value is either limited to contain only these characters or
none of them. FORM_FA_CHARLIST applies to string fields only. It is
the caller’s responsibility to free the handle when done using it.
FORM_FA_DEFAULT The default value of an input field. Attr is a pointer to data of the
appropriate type for the field. This does not affect the current value of the
field, but it does affect the result of subsequent calls to FORM_default_
form_values() or FORM_default_field_value() (for the same field). See
under FORM_FA_VALUE for the interpretation of the value parameter
for the various data types.
FORM_FA_DESCRIPTION The field description, used for maintenance only, never displayed. This
attribute applies to all field types. Attr is a pointer to a buffer at least
FORM_LEN_OBJ_DESC + 1 bytes in size, into which to copy the
description of the field.

290 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_FieldAttr_typ

FORM_FA_DISPLAYAREA The area on the form in which the field is displayed. This attribute applies
to fields of type checkbox, date, document, folder, form, number,
radiobutton, and scrollbar. For all of these, the display height in Attr is
ignored and a standard height is used. This attribute (including height)
also applies to fields of type menu, pushbutton, string, bitmap, graphic
text, groupbox, line, pattern, rect, and roundrect. This attribute applies to
signature fields, but for position only—both width and height are ignored
in favor of standard values. Attr is a pointer to a RECT. Attr->left is the x-
coordinate of the upper left corner of the display field in 1/100ths of a
character width. Attr->top is the y-coordinate of the upper left corner in 1/
100ths of a character height. Attr->right is the width of the field in 1/
100ths of a character width (length for scrollbars). Attr->bottom is the
height in 1/100ths of a character height.
FORM_FA_FIELDPROC The function to process Windows messages to the field. This attribute
applies to all field types, except ellipse, graphic text, line, rect, and
roundrect. Attr is a pointer to a structure of type FORM_ProcAttr_typ.
FORM_FA_FILENAME The name of the file containing the field data, for form, menu, and bitmap
fields. Attr is a pointer to a buffer at least FORM_LEN_FILE_NAME + 1
bytes in size, into which to copy the file name.
FORM_FA_FONT The font to use for a graphic text field. Attr is a pointer to a structure of
type FORM_FontAttr_typ. Weight can use values defined in windows.h:
FW_DONTCARE, FW_THIN, FW_EXTRALIGHT, FW_LIGHT, FW_NORMAL,
FW_MEDIUM, FW_SEMIBOLD, FW_BOLD, FW_EXTRABOLD, FW_HEAVY,
FW_ULTRALIGHT, FW_REGULAR, FW_DEMIBOLD, FW_ULTRABOLD, and
FW_BLACK.
FORM_FA_FORECOLOR The foreground color. Attr is a pointer to a DWORD created with the RGB
macro. This attribute applies to all fields except form fields. Fields that
have a pen or brush can use this attribute to change the color of the pen
or brush without changing its other characteristics. For fields with both a
pen and a brush, this attribute affects both the pen color and the brush
color, and returns the pen color. For scroll bars, this is the thumb color.
FORM_FA_GROUP The name of the radiobutton group. Attr is a pointer to a buffer at least
FORM_LEN_FIELD_NAME + 1 bytes in size, into which to copy the
group name.
FORM_FA_HELP This attribute applies to all input field types. The help text or screen for
the field. Attr is a pointer to a structure of type FORM_HelpAttr_typ.
FORM_FA_MAPMODE The Windows device context map mode for bitmap fields. Attr is a pointer
to a short, and returns one of MM_ANISOTROPIC, MM_ISOTROPIC,
and MM_TEXT. See SetMapMode in the Windows Programmer’s
Reference for more information.

December 1996 WAL for Windows Programmer’s Reference Manual 291


6 Data Types and Structures
FORM_FieldAttr_typ

FORM_FA_MASK The input and output display mask for date, number, and time fields. Attr
is a pointer to a structure of type FORM_DateMaskAttr_typ, into which to
copy the masks.
FORM_FA_OBJNAME The name of the object (i.e., the form or menu) associated with a form or
menu field. Attr is a pointer to a buffer at least FORM_LEN_OBJ_NAME
+ 1 bytes in size, into which to copy the object name.
FORM_FA_ORDINAL The position within the field list of the field. A number from 1 to n, where
n is the total field count. This attribute applies to all field types. Attr is a
pointer to a WORD. Setting this attribute reorders the fields within a form.
If Attr points to zero, the field is given the highest currently-used ordinal,
and the ordinals of other fields are adjusted accordingly.
To understand how the reordering works, consider the operation as
having two steps. First, the field to be repositioned is removed from the
list. The gap is closed by decrementing the ordinals of all fields with
higher ordinals. Then a space is created by incrementing the ordinals of
all fields with ordinals above or equal to *Attr. Finally, *Attr is assigned to
the field originally removed from the list.
FORM_FA_PEN The pen used for drawing lines and borders in ellipse, line, rectangle, and
roundrect fields. Attr is a pointer to a structure of type FORM_PenAttr_
typ.
FORM_FA_PROMPT The text appearing in the prompt area of a form when an input field gets
the input focus. This attribute applies to all input field types. Attr is a
pointer to a buffer at least FORM_LEN_FIELD_PROMPT + 1 bytes in
size, into which to copy the prompt.
FORM_FA_RANGE The minimum and maximum allowable values for the input field. Attr is a
pointer to an array of two elements of the appropriate data type for the
field. The first is the minimum; the second is the maximum. See FORM_
FA_VALUE for the various data types.

292 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_FieldAttr_typ

FORM_FA_RASTEROP The raster operand used to blt a pattern or bitmap field into the display
context. Attr is a pointer to a DWORD. For patterns, only PATCOPY,
PATINVERT, DSTINVERT, BLACKNESS, and WHITENESS are
allowed. For bitmaps, any raster op can be used, including but not limited
to:
SRCCOPY dest = source
SRCPAINT dest = source OR dest
SRCAND dest = source AND dest
SRCINVERT dest = source XOR dest
SRCERASE dest = source AND (not dest)
NOTSRCCOPY dest = (not source)
NOTSRCERASE dest = (not source) AND (not dest)
MERGECOPY dest = (source AND pattern)
MERGEPAINT dest = (NOT source) OR dest
PATCOPY dest = pattern
PATPAINT dest = try it and see
PATINVERT dest = pattern XOR dest
DSTINVERT dest = (not dest)
BLACKNESS dest = BLACK
WHITENESS dest = WHITE
Items not on this list are not allowed by the Forms Language, and
therefore cannot be saved. See also the Windows Programmer’s
Reference under BitBlt and Appendix A.
FORM_FA_RESOURCE Specifies a Windows-resource, currently used only for bitmap fields. Attr
is a pointer to a structure of type FORM_ResourceAttr_typ.
FORM_FA_ROUNDNESS The width and height of the ellipse used to round the corners of a
roundrect field. Attr is a pointer to a POINT. Attr->x is the width (columns
* 100), and Attr->y is the height (rows * 100).
FORM_FA_RULELIST The list of rules associated with the field. This attribute applies to all input
field types and form fields. Attr is a pointer to a structure of type FORM_
RuleAttr_typ.

December 1996 WAL for Windows Programmer’s Reference Manual 293


6 Data Types and Structures
FORM_FieldAttr_typ

FORM_FA_SECURITY The three-part name of the group to which one must belong in order to
sign a signature field. This is a null-terminated string in which the parts
are separated by the “:” character. Attr is a pointer to a buffer at least
FORM_LEN_SECURITY + 1 bytes in size, into which to copy the string.
FORM_FA_SIZE The size in bytes (not including null terminators, where applicable) of the
field value for all input field types. For string fields, the returned size is
not greater than the product of the actual width and the actual height. For
signature fields, the returned size is the length of the string containing the
name of the last user who signed the field. For graphic text fields, Attr
returns the string length of the text. For other display and form fields, Attr
returns zero. Attr is a pointer to a WORD in which to return the size.
This attribute cannot be set with FORM_set_field_attr().
FORM_FA_STRETCHMODE The stretch mode (or BLT mode) for a bitmap field. See
SetStretchBltMode in the Windows Programmer’s Reference for more
information. Attr is a pointer to a short, which contains one of
BLACKONWHITE, COLORONCOLOR, and WHITEONBLACK.
FORM_FA_STYLE Attr is a pointer to a WORD.
FORM_FA_TABLE The validation table for a string field. Attr is a pointer to a structure of type
FORM_TableAttr_typ.
FORM_FA_TERMCODE The termination code to be returned when a pushbutton is pushed. Attr
is a pointer to a structure of type FORM_Terminator_typ.
FORM_FA_TEXT The text of a checkbox, pushbutton, radiobutton, graphic text, or
groupbox field. For all but graphic text, Attr is a pointer to a buffer FORM_
LEN_BUTTON_TEXT + 1 bytes in size. For graphic text, Attr is a pointer
to a handle to the null-terminated text.
FORM_FA_TEXTFORMAT The DrawText format for displaying a graphic text field. Attr is a pointer
to a WORD. See DrawText in Windows SDK Programmer’s Reference
for more information. The format is a combination of: DT_LEFT, DT_
CENTER, DT_RIGHT, DT_TOP, DT_VCENTER, DT_BOTTOM, DT_
WORDBREAK, DT_SINGLELINE, DT_EXPANDTABS, DT_TABSTOP, DT_
EXTERNALLEADING, and DT_NOPREFIX.
FORM_FA_TYPE The data type of the field. This attribute applies to all field types. Attr is a
pointer to a FORM_FieldType_typ. This attribute cannot be set with
FORM_set_field_attr().
FORM_FA_USER An unsigned long assigned to a field for the client’s use. This attribute
applies to all field types. Attr is a pointer to a DWORD.

294 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_FieldAttr_typ

FORM_FA_VALFUNC The validation function for the field. This attribute applies to all input field
types and form fields. Attr is a pointer to a structure of type FORM_
ValFuncAttr_typ.
FORM_FA_VALUE The current value of the input field. This attribute applies to all input field
types. Attr is a pointer to the appropriate data type.
FORM_FT_CHECKBOX—FORM_Checked_typ, FORM_UNDEF_CHECK for
no value.
FORM_FT_DATE—FN_date_typ, FN_UNDEF_DATE for no value.

FORM_FT_DOCUMENT—FN_docnum_typ, FN_UNDEF_DOCUMENT for


no value.
FORM_FT_FOLDER—FN_folnum_typ, FN_UNDEF_FOLDER for no value.

FORM_FT_MENU—FN_selection_typ, FN_UNDEF_SELECTION for no


value.
FORM_FT_NUMBER—FP_number, use PF_setundef() to set to undefined
value.
FORM_FT_RADIOBUTTON—FORM_Checked_typ,
FORM_UNDEF_CHECK for no value.

FORM_FT_SCROLLBAR—int.

FORM_FT_SIGNATURE—HANDLE to a null-terminated string containing


the name of the last person to sign, NULL for no value.
FORM_FT_STRING—HANDLE to a null-terminated string, NULL for no
value.
FORM_FT_TIME—FN_time_typ, FN_UNDEF_TIME for no value.
FORM_FA_COLWIDTH Listbox column width in 1/100ths char width.

December 1996 WAL for Windows Programmer’s Reference Manual 295


6 Data Types and Structures
FORM_fielddesc_typ

FORM_fielddesc_typ
This structure provides a description of a field for FileNet FORM pages.

typedef struct {
DWORD fld_name_offset;
char fld_type;
WORD fld_len;
DWORD fld_val_offset;
} FORM_fielddesc_typ;

The FORM_fielddesc_typ structure has the following fields:

fld_name_offset
DWORD. Offset from beginning of file to this field’s NULL-
terminated name.

fld_type char. INX type for field’s data.

fld_len WORD. Length in bytes of field data.

fld_val_offset DWORD. Offset from beginning of file to this field’s data.

296 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_FieldEvent_typ

FORM_FieldEvent_typ
This enumeration specifies the field events.

typedef enum {
FORM_FE_NONE,
FORM_FE_VALUECHANGE
} FORM_FieldEvent_typ;

The FORM_FieldEvent_typ enumeration has the following enumerators:

FORM_FE_NONE No event.
FORM_FE_VALUECHAGE Field value has changed.

December 1996 WAL for Windows Programmer’s Reference Manual 297


6 Data Types and Structures
FORM_FieldType_typ

FORM_FieldType_typ
This enumeration designates field types.

typedef enum {
FORM_FT_NULL,
FORM_FT_CHECKBOX,
FORM_FT_DATE,
FORM_FT_DOCUMENT,
FORM_FT_FOLDER,
FORM_FT_FORM,
FORM_FT_MENU,
FORM_FT_NUMBER,
FORM_FT_PUSHBUTTON,
FORM_FT_RADIOBUTTON,
FORM_FT_SCROLLBAR,
FORM_FT_SIGNATURE,
FORM_FT_STRING,
FORM_FT_TIME,
FORM_FT_BITMAP,
FORM_FT_ELLIPSE,
FORM_FT_GROUPBOX,
FORM_FT_LINE,
FORM_FT_PATTERN,
FORM_FT_RECT,
FORM_FT_ROUNDRECT,
FORM_FT_TEXT
FORM_FT_INTEGER,
FORM_FT_LISTBOX,
FORM_FT_COMBOBOX,
} FORM_FieldType_typ;

298 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_FontAttr_typ

FORM_FontAttr_typ
This structure specifies font attributes.

typedef struct {
char FontName[FORM_LEN_FILE_NAME + 1];
WORD PointSize;
WORD Weight;
} FORM_FontAttr_typ;

The FORM_FontAttr_typ structure has the following fields:

FontName char. Name of the file that contains the font.

PointSize WORD. Character height.

Weight WORD. Darkness of font in inked pixels per 1000.

December 1996 WAL for Windows Programmer’s Reference Manual 299


6 Data Types and Structures
FORM_FormAttr_typ

FORM_FormAttr_typ
This enumeration specifies form and object attributes.

typedef enum {
FORM_ATTR_ALL,
FORM_ATTR_CHAR_MAP,
FORM_ATTR_COLOR,
FORM_ATTR_DESC,
FORM_ATTR_FILENAME,
FORM_ATTR_TERMPROC,
FORM_ATTR_HELP,
FORM_ATTR_ICON,
FORM_ATTR_MENUBAR,
FORM_ATTR_OBJNAME,
FORM_ATTR_RULELIST,
FORM_ATTR_SOFTKEYS,
FORM_ATTR_TITLE,
FORM_ATTR_VALFUNC,
FORM_ATTR_MENUBARSTYLE,
FORM_ATTR_BACKGROUND,
FORM_ATTR_PREFKEY,
FORM_ATTR_BKGIMAGE
} FORM_FormAttr_typ;

The FORM_FormAttr_typ enumeration has the following enumerators:

FORM_ATTR_ALL To indicate all of the attributes described in this table.


FORM_ATTR_CHAR_MAP Applies to form objects only. The character map dimensions for the
form. Attr is a pointer to a POINT, where Attr->x is the width and
Attr->y is the height. These values are in 1/100ths of a unit. For
example, if the character map is 20 rows high by 40 columns wide,
Attr->x is 4000 and Attr->y is 2000 (values are multiplied by 100).
The default values for character map dimensions are FORM_DEF_
MAP_WIDTH and FORM_DEF_MAP_HEIGHT.
For FORM_set_object_attr(), width and height are rounded down to
the greatest multiple of 100 less than or equal to the input. If the
dimensions change, then the map is resized. If the map grows, then
it is padded with extra spaces at the end or bottom. If the map shrinks
horizontally, then each line is truncated to the new width. If it shrinks
vertically, then the appropriate number of lines are removed from the
bottom of the map.

300 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_FormAttr_typ

FORM_ATTR_COLOR Applies to form objects only. Attr is a pointer to a structure of type


FORM_ColorAttr_typ. This attribute controls text and background
colors used in the character map of a form.
FORM_ATTR_DESC Attr is a pointer to a buffer at least FORM_LEN_OBJ_DESC + 1
bytes in size, into which to copy the description of the object. This
attribute applies to menus, menubars, and validation tables, as well
as forms. The description is used for maintenance only, and does not
appear during execution.
FORM_ATTR_FILENAME The name of the file in which the Forms Language description of the
object is stored (or to be stored). Attr is a pointer to a buffer at least
FORM_LEN_FILE_NAME + 1 bytes in size. The file name can be an
empty string for ephemeral objects that are never saved in files.
FORM_ATTR_TERMPROC Applies to form objects only. The function to process Windows
messages to the form. Attr is a pointer to a structure of type FORM_
ProcAttr_typ.
FORM_ATTR_HELP Applies to form objects only. The help given when the help key is
pressed and there is no current field or the current field does not
specify help. Attr is a pointer to a structure of type FORM_HelpAttr_
typ.
FORM_ATTR_ICON Applies to form objects only. The icon to be displayed when the
window of the form is minimized. Attr is a pointer to a structure of type
FORM_IconAttr_typ.
FORM_ATTR_MENUBAR Applies to form objects only. Specifies a menubar object for the form
window. Use of a menubar and softkeys are mutually exclusive. Attr
is a pointer to a structure of type FORM_MenubarAttr_typ.
FORM_ATTR_OBJNAME The name of the form, menu, menubar, or validation table object. Attr
is a pointer to a buffer of at least FORM_LEN_OBJ_NAME + 1 bytes
in size.
FORM_ATTR_RULELIST Applies to form objects only. Attr is a pointer to a structure of type
FORM_RuleAttr_typ.

December 1996 WAL for Windows Programmer’s Reference Manual 301


6 Data Types and Structures
FORM_FormAttr_typ

FORM_ATTR_SOFTKEYS Applies to form objects only. Attr is a pointer to a structure of type


FORM_SoftkeyAttr_typ.
For FORM_set_object_attr(), puts the softkey labels into the menu
bar and the corresponding keys into the acceptable terminator list for
the form accessed through hForm.
Each time this attribute is set, the new softkeys entirely replace the
previous set of softkey labels and terminator keys (if any). If
NumKeys is zero, the softkeys are deleted. In this case, the softkey
labels are cleared from the menu bar, and the acceptable terminator
list is reset to contain just <Esc> and <Enter>.
hKeys is a handle to an array of NumKeys structures of type FORM_
Softkey_typ. Softkey labels and terminator keys must be unique.
FORM_ATTR_TITLE Applies to form objects only. The title appears in the caption area of
the form window. Attr is a pointer to a buffer at least FORM_LEN_
FORM_TITLE + 1 bytes in size, into which to copy the title of the form.
FORM_ATTR_VALFUNC Applies to form objects only. Attr is a pointer to a structure of type
FORM_ValFuncAttr_typ.
FORM_ATTR_MENUBARSTYLE Applies to form objects only. Specifies a menubar style for the form
window. Attr is a WORD that can be any OR-ed combination of the
following: FORM_MBS_NOSPECIALMENU, FORM_MBS_
NOCLIPBOARDMENU, FORM_MBS_NOSOFTKEYMENU, FORM_MBS_
NOHELPMENU, or FORM_MBS_INSERTBEFORE.
FORM_ATTR_BACKGROUND Applies to form objects only. Attr is a pointer to a structure of type
FORM_PageAttr_typ. This attribute controls background images.
FORM_ATTR_PREFKEY Applies to form objects only. Attr is a pointer to the user preference
key name (LPSTR), used in a call to FN_get_app_info() (for FORM_
get_object_attr()) or FN_set_app_info() (for FORM_set_object_
attr()).
FORM_ATTR_BKGIMAGE Applies to form objects only. Specifies the background image for the
form.

302 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_GroupboxField_typ

FORM_GroupboxField_typ
This structure specifies the attributes of a group box on a form.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
char Text[FORM_LEN_BUTTON_TEXT + 1];
char Description[FORM_LEN_OBJ_DESC + 1];
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_GroupboxField_typ;

The FORM_GroupboxField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

Style WORD.

Text char. The text label.

Description char. The description of the groupbox field.

FrColor DWORD. Color to display text and border in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

December 1996 WAL for Windows Programmer’s Reference Manual 303


6 Data Types and Structures
FORM_HelpAttr_typ

FORM_HelpAttr_typ
This structure specifies help file data.

typedef struct {
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
} FORM_HelpAttr_typ;

The FORM_HelpAttr_typ structure has the following fields:

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

304 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_IconAttr_typ

FORM_IconAttr_typ
This structure specifies information associated with an icon.

typedef struct {
PSTR Predefined;
HICON hIcon;
char RCName[FORM_LEN_OBJ_NAME + 1];
char FileName[FORM_LEN_FILE_NAME + 1];
} FORM_IconAttr_typ;

The FORM_IconAttr_typ structure has the following fields:

Predefined PSTR. One of the Windows predefined icon IDs: IDI_


APPLICATION, IDI_HAND, IDI_QUESTION, IDI_
EXCLAMATION, or IDI_ASTERISK. If zero, then RCName
contains the identifier of the resource containing the icon, and
FileName contains the name of the DLL to which the icon
belongs. If no icon has been specified for the form, IDI_
APPLICATION is used.

hIcon HICON. Handle to GDI object or resource or NULL. If NULL,


then Predefined can be one of the Windows predefined icon
IDs.

RCName char. Name of resource, which is defined in the resource


(.RC) file.

FileName char. Name of the file that contains the icon.

December 1996 WAL for Windows Programmer’s Reference Manual 305


6 Data Types and Structures
FORM_LineField_typ

FORM_LineField_typ
This structure specifies information for a Form Line field.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
char Description[FORM_LEN_OBJ_DESC + 1];
WORD PenStyle;
WORD PenWidth;
DWORD PenColor;
DWORD BkColor;
DWORD UserAttr;
} FORM_LineField_typ;

The FORM_LineField_typ structure has the following fields:

DisplayX int. x coordinate of first end point.

DisplayY int. y coordinate of first end point.

DisplayWidth int. x-delta of second end point.

DisplayHeight int. x-delta of second end point.

Style WORD.

Description char. The description of the line field.

PenStyle WORD.

PenWidth WORD. Pen width (in pixels).

PenColor DWORD. Color to draw in.

BkColor DWORD. Background color.

UserAttr DWORD. User defined.

306 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ListboxField_typ

FORM_ListboxField_typ
This structure specifies data for a list box on a form.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
int ColumnWidth;
WORD HorzExtent;
WORD Style;
FORM_ListValue_typ DefaultVal;
FORM_ListValue_typ Value;
FORM_ListValue_typ TabStops;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_ListboxField_typ;

The FORM_ListboxField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

December 1996 WAL for Windows Programmer’s Reference Manual 307


6 Data Types and Structures
FORM_ListboxField_typ

MenuName char. Name of menu. Max. length is FORM_LEN_OBJ_


NAME + 1.

MenuFile char. Name of menu file. Max. length is FORM_LEN_FILE_


NAME + 1.

Style WORD.

DefaultVal FN_selection_typ. Default value of field.

Value FN_selection_typ. Value of field.

Description char. The description of the date field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

308 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ListboxField_typ

See Also
“FORM_ListValue_typ” on page 310

December 1996 WAL for Windows Programmer’s Reference Manual 309


6 Data Types and Structures
FORM_ListValue_typ

FORM_ListValue_typ
typedef struct
{
WORD NumSelected;
HANDLE hSelected;
} FORM_ListValue_typ;

The FORM_ListValue_typ structure has the following fields:

NumSelected WORD. Number of items selected in a listbox.

hSelected HANDLE. If NumSelected is zero, hSelected is NULL. If


NumSelected is 1, hSelected is the index of the selected
item. If NumSelected is greater than 1, hSelected is a handle
to an array of type WORD containing the indices of the
selected items.

310 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_MenuAttr_typ

FORM_MenuAttr_typ
This structure specifies data about a menu on a form.

typedef struct {
char MenuName[FORM_LEN_OBJ_NAME + 1];
char MenuFile[FORM_LEN_FILE_NAME + 1];
} FORM_MenuAttr_typ;

The FORM_MenuAttr_typ structure has the following fields:

MenuName char. Name of the menu.

MenuFile char. Name of the file that contains the menu.

December 1996 WAL for Windows Programmer’s Reference Manual 311


6 Data Types and Structures
FORM_MenubarAttr_typ

FORM_MenubarAttr_typ
typedef struct {
char MenubarName[FORM_LEN_OBJ_NAME + 1];
char FileName[FORM_LEN_FILE_NAME + 1];
} FORM_MenubarAttr_typ;

The FORM_MenubarAttr_typ structure has the following fields:

MenubarName char. Name of the menubar.

FileName char. Name of the file that contains the menubar.

312 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_MenuField_typ

FORM_MenuField_typ
This structure specifies menu fields.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
char MenuName[FORM_LEN_OBJ_NAME + 1];
char MenuFile[FORM_LEN_FILE_NAME + 1];
WORD Style;
FN_selection_typ DefaultVal;
FN_selection_typ Value;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_MenuField_typ;

The FORM_MenuField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

MenuName char. Name of the menu.

December 1996 WAL for Windows Programmer’s Reference Manual 313


6 Data Types and Structures
FORM_MenuField_typ

MenuFile char. Name of the file that contains the menu.

Style WORD.

DefaultVal FN_selection_typ. Default value of field.

Value FN_selection_typ. Value of field.

Description char. Description of the menu field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

See Also
“FN_selection_typ” on page 262

314 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_MenuItem_typ

FORM_MenuItem_typ
This structure specifies the attributes of an item on a menu.

typedef struct {
char Code;
char Desc[FORM_LEN_MENUITEM_DESC + 1];
WORD Style;
} FORM_MenuItem_typ;

The FORM_MenuItem_typ structure has the following fields:

Code char. Character code.

Desc char. Description

Style WORD. Can be one of the following:


MF_ENABLED
MF_GRAYED
MF_CHECKED
MF_UNCHECKED

December 1996 WAL for Windows Programmer’s Reference Manual 315


6 Data Types and Structures
FORM_NumberField_typ

FORM_NumberField_typ
This structure specifies number fields.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int ActualWidth;
char Mask[FORM_LEN_FIELD_MASK + 1];
WORD Style;
FP_number DefaultVal;
FP_number Value;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
FP_number Min;
FP_number Max;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_NumberField_typ;

The FORM_NumberField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width is less than or equal to the actual width;
display/actual height is one row.

ActualWidth int. Maximum columns of input data * 100.

316 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_NumberField_typ

Mask char. Numeric mask.

Style WORD.

DefaultVal FP_number. Default value of field.

Value FP_number. Value of field.

Description char. Description of the number field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

Min FP_number. Minimum value of field.

Max FP_number. Maximum value of field.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

December 1996 WAL for Windows Programmer’s Reference Manual 317


6 Data Types and Structures
FORM_NumberField_typ

See Also
“FP_number” on page 349

318 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ObjectType_typ

FORM_ObjectType_typ
This enumeration designates object types.

typedef enum {
FORM_OT_ALL,
FORM_OT_FORM,
FORM_OT_MENU,
FORM_OT_MENUBAR,
FORM_OT_VALTABLE,
FORM_OT_REPORT,
FORM_OT_PAMPHLET
} FORM_ObjectType_typ;

The FORM_ObjectType_typ enumeration has the following enumerators:

FORM_OT_ALL Object type is one of the following. Usually used to initialize an


object.
FORM_OT_FORM Object type is form.
FORM_OT_MENU Object type is menu.
FORM_OT_MENUBAR Object type is menubar.
FORM_OT_VALTABLE Object type is validation table.
FORM_OT_REPORT
FORM_OT_PAMPHLET

December 1996 WAL for Windows Programmer’s Reference Manual 319


6 Data Types and Structures
FORM_PageAttr_typ

FORM_PageAttr_typ
This structure specifies the document and page in which a specified data is
located.

typedef struct {
ASE_ssn_typ SSN;
ASE_doc_id_typ ID;
ASE_page_number_typ Page;
} FORM_PageAttr_typ;

The FORM_PageAttr_typ structure has the following fields:

SSN ASE_ssn_typ. System serial number.

ID ASE_doc_id_typ. Document ID.

Page ASE_page_number_typ. Document page.

See Also
“ASE_doc_id_typ” on page 164

“ASE_page_number_typ” on page 173

“ASE_ssn_typ” on page 180

320 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_PatternField_typ

FORM_PatternField_typ
This structure specifies data about a Pattern field on a form.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
char Description[FORM_LEN_OBJ_DESC + 1];
WORD BrushStyle;
DWORD BrushColor;
WORD BrushHatch;
DWORD BkColor;
DWORD RasterOp;
DWORD UserAttr;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_PatternField_typ;

The FORM_PatternField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

Style WORD.

Description char. The description of the pattern field.

BrushStyle WORD.

BrushColor DWORD. Brush color.

BrushHatch WORD.

BkColor DWORD. Background color.

RasterOp DWORD. Can be one of the following:


PATCOPY
PATINVERT

December 1996 WAL for Windows Programmer’s Reference Manual 321


6 Data Types and Structures
FORM_PatternField_typ

DSTINVERT
BLACKNESS
WHITENESS

UserAttr DWORD. User defined.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

322 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_PenAttr_typ

FORM_PenAttr_typ
This structure specifies the color and size of a pen.

typedef struct {
WORD PenStyle;
WORD PenWidth;
DWORD PenColor;
} FORM_PenAttr_typ;

The FORM_PenAttr_typ structure has the following fields:

PenStyle WORD.

PenWidth WORD. Pen width (in pixels).

PenColor DWORD. Color to draw in.

December 1996 WAL for Windows Programmer’s Reference Manual 323


6 Data Types and Structures
FORM_ProcAttr_typ

FORM_ProcAttr_typ
typedef struct {
char ProcName[FORM_LEN_VALFUNC_NAME + 1];
char ProcLib[FORM_LEN_FILE_NAME + 1];
FIELDPROC Proc;
DWORD ExtraParam
} FORM_ProcAttr_typ;

The FORM_ProcAttr_typ structure has the following fields:

ProcName char. NULL or name of the function. Use with ProcLib.

ProcLib char. NULL or name of the library that contains the function.

Proc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to Proc.

324 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_RadioField_typ

FORM_RadioField_typ
This structure provides information for radio button fields.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
WORD Style;
FORM_Checked_typ DefaultVal;
FORM_Checked_typ Value;
char Text[FORM_LEN_BUTTON_TEXT + 1];
char Group[FORM_LEN_FIELD_NAME + 1];
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_RadioField_typ;

The FORM_RadioField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100); display/actual height is


one row.

Style WORD.

DefaultVal FORM_Checked_typ. Default value of field.

December 1996 WAL for Windows Programmer’s Reference Manual 325


6 Data Types and Structures
FORM_RadioField_typ

Value FORM_Checked_typ. Value of field.

Text char. Text next to the button.

Group char. The group of the radio button field.

Description char. The description of the radio button field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

See Also
“FORM_Checked_typ” on page 277

326 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_RectField_typ

FORM_RectField_typ
This structure defines an ellipse or a rectangle.

Note that coordinates are of bounding rectangle for ellipses.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
char Description[FORM_LEN_OBJ_DESC + 1];
WORD PenStyle;
WORD PenWidth;
DWORD PenColor;
DWORD BkColor;
WORD BrushStyle;
DWORD BrushColor;
WORD BrushHatch;
DWORD UserAttr;
} FORM_RectField_typ;

The FORM_RectField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

Style WORD.

Description char. Description of the rectangle field.

PenStyle WORD.

PenWidth WORD. Pen width (in pixels).

PenColor DWORD. Color to draw in.

BkColor DWORD. Background color.

BrushStyle WORD.

December 1996 WAL for Windows Programmer’s Reference Manual 327


6 Data Types and Structures
FORM_RectField_typ

BrushColor DWORD. Brush color.

BrushHatch WORD.

UserAttr DWORD. User defined.

328 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ResourceAttr_typ

FORM_ResourceAttr_typ
This structure specifies data about a GDI object or resource.

typedef struct {
HANDLE hRC;
char RCName[FORM_LEN_OBJ_NAME + 1];
char FileName[FORM_LEN_FILE_NAME + 1];
} FORM_ResourceAttr_typ;

The FORM_ResourceAttr_typ structure has the following fields:

hRC HANDLE. Handle to GDI object or resource or NULL. If not


NULL, hRC is an HBITMAP to an already-loaded bitmap. If
hRC is NULL, then RCName contains the identifier of the
resource containing the bitmap, and FileName contains the
name of the DLL to which the bitmap belongs.

RCName char. Name of resource, which is defined in the resource


(.RC) file. If empty, then FileName contains the name of the
(.bmp) file containing the bitmap.

FileName char. Name of the (.bmp) file that contains the bitmap.

December 1996 WAL for Windows Programmer’s Reference Manual 329


6 Data Types and Structures
FORM_RoundRectField_typ

FORM_RoundRectField_typ
This structure defines a rounded rectangle.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
int RoundWidth;
int RoundHeight;
WORD Style;
char Description[FORM_LEN_OBJ_DESC + 1];
WORD PenStyle;
WORD PenWidth;
DWORD PenColor;
DWORD BkColor;
WORD BrushStyle;
DWORD BrushColor;
WORD BrushHatch;
DWORD UserAttr;
} FORM_RoundRectField_typ;

The FORM_RoundRectField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

RoundWidth int. Width of ellipse used for corners.

RoundHeight int. Height of ellipse used for corners.

Style WORD.

Description char. Description of the round rectangle field.

PenStyle WORD.

PenWidth WORD. Pen width in pixels.

PenColor DWORD. Color to draw in.

330 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_RoundRectField_typ

BkColor DWORD. Background color.

BrushStyle WORD.

BrushColor DWORD. Brush color.

BrushHatch WORD.

UserAttr DWORD. User defined.

December 1996 WAL for Windows Programmer’s Reference Manual 331


6 Data Types and Structures
FORM_RuleAttr_typ

FORM_RuleAttr_typ
This structure specifies validation rules.

typedef struct {
WORD NumRules;
HANDLE hRule;
} FORM_RuleAttr_typ;

The FORM_RuleAttr_typ structure has the following fields:

NumRules WORD. Number of validation rules in hRule.

hRule HANDLE. NULL or handle to validation rules returned. The


rules are in contiguous ASCII strings. This buffer alternates
rule names with rules, first name first, null character between
strings. Each rule is null-terminated. Names are truncated to
FORM_LEN_FIELD_NAME bytes maximum string length.

332 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ScrollbarField_typ

FORM_ScrollbarField_typ
This structure provides information that defines scrollbar fields. BarColor is
set and returned using FORM_FA_FORECOLOR, and ThumbColor is set and
returned using FORM_FA_BACKCOLOR.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayLength;
WORD Style;
int DefaultVal;
int Value;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
int Min;
int Max;
DWORD BarColor;
DWORD ThumbColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_ScrollbarField_typ;

The FORM_ScrollbarField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayLength int. Display length (characters * 100); whether this is width or


height depends on Style; the other dimension is always the
standard.

Style WORD.

December 1996 WAL for Windows Programmer’s Reference Manual 333


6 Data Types and Structures
FORM_ScrollbarField_typ

DefaultVal int. Default value of field.

Value int. Value of field.

Description char. The description of the scrollbar field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

Min int. Minimum value of field.

Max int. Maximum value of field.

BarColor DWORD. Color to display bar.

ThumbColor DWORD. Color of thumb box.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

334 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_SignatureField_typ

FORM_SignatureField_typ
This structure provides information that defines signature fields.

typedef struct {
int DisplayX;
int DisplayY;
WORD Style;
char Security[FORM_LEN_SECURITY + 1];
char Value[FORM_LEN_SECURITY + 1];
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_SignatureField_typ;

The FORM_SignatureField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner; display size is always


standard.

Style WORD.

Security char. Group permitted to sign.

Value char. Signer name.

Description char. The description of the signature field.

December 1996 WAL for Windows Programmer’s Reference Manual 335


6 Data Types and Structures
FORM_SignatureField_typ

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

336 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_Softkey_typ

FORM_Softkey_typ
This structure contains information that defines a softkey.

typedef struct {
char Label[FORM_LEN_SOFTKEY_LABEL + 1];
BYTE Kind;
FORM_Terminator_typ Terminator;
char MenuName[FORM_LEN_OBJ_NAME + 1];
char FileName[FORM_LEN_FILE_NAME + 1];
} FORM_Softkey_typ;

The FORM_Softkey_typ structure has the following fields:

Label char. Key label. (The text appears in the menu bar.)

Kind BYTE. Type of label. Can be either FORM_LABEL_


PULLDOWN or FORM_LABEL_TERMINATOR.

Terminator FORM_Terminator_typ. A structure that contains information


defining a terminator key.

MenuName char. Name of the menu that contains the softkey. If supplied,
the menu to be used as a pulldown.

FileName char. Name of the file that contains the menu. If the menu
name is supplied, an optional file name can be supplied. If
none is given, the current file is used. See “FORM_set_
menubar_items()” on page 911.

See Also
“FORM_Terminator_typ” on page 343

December 1996 WAL for Windows Programmer’s Reference Manual 337


6 Data Types and Structures
FORM_SoftkeyAttr_typ

FORM_SoftkeyAttr_typ
This structure specifies data related to a softkey in a menu.

typedef struct {
WORD NumKeys;
HANDLE hKeys;
} FORM_SoftkeyAttr_typ;

The FORM_SoftkeyAttr_typ structure has the following fields:

NumKeys WORD. Number of softkeys.

hKeys HANDLE. NULL or handle to array of NumKeys structures of


type FORM_Softkey_typ.

338 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_StringField_typ

FORM_StringField_typ
This structure provides information that defines string fields.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
int ActualWidth;
int ActualHeight;
WORD Style;
HANDLE hCharList;
HANDLE hDefaultVal;
HANDLE hValue;
char Description[FORM_LEN_OBJ_DESC + 1];
char Prompt[FORM_LEN_FIELD_PROMPT + 1];
HANDLE hHelpText;
char HelpFile[FORM_LEN_FILE_NAME + 1];
WORD HelpMod;
WORD HelpScr;
HANDLE hMin;
HANDLE hMax;
DWORD FrColor;
DWORD BkColor;
DWORD UserAttr;
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
char ValTableName[FORM_LEN_OBJ_NAME + 1];
char ValTableFile[FORM_LEN_FILE_NAME + 1];
WORD NumRules;
HANDLE hRule;
FIELDPROC FieldProc;
DWORD ExtraParam;
} FORM_StringField_typ;

The FORM_StringField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

December 1996 WAL for Windows Programmer’s Reference Manual 339


6 Data Types and Structures
FORM_StringField_typ

DisplayWidth int. Display width is less than or equal to the actual width.

DisplayHeight int. Display height is less than or equal to the actual height.

ActualWidth int. Maximum columns of input data * 100.

ActualHeight int. Maximum rows of input data * 100.

Style WORD.

hCharList HANDLE. NULL or handle to list of characters to be accepted


or rejected.

hDefaultVal HANDLE. Default value of field.

hValue HANDLE. Value of field.

Description char. Description of the string field.

Prompt char. Text output in the message window that prompts user
for input.

hHelpText HANDLE. NULL or handle to help text.

HelpFile char. Name of the help file.

HelpMod WORD. Help module for HlpLib-style help.

HelpScr WORD. Help screen for HlpLib-style help.

hMin HANDLE. Minimum value of field.

hMax HANDLE. Maximum value of field.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

UserAttr DWORD. User defined.

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

340 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_StringField_typ

ValFuncParam DWORD. Extra parameter. This is only of value for programs


that assign it at runtime.

ValTableName char. Name of validation table.

ValTableFile char. Name of the file that contains the validation table.

NumRules WORD. Number of validation rules.

hRule HANDLE. NULL or handle to validation rules.

FieldProc FIELDPROC. NULL or address of function.

ExtraParam DWORD. User defined parameter passed to FieldProc.

December 1996 WAL for Windows Programmer’s Reference Manual 341


6 Data Types and Structures
FORM_TableAttr_typ

FORM_TableAttr_typ
This structure specifies validation table data.

typedef struct {
char ValTableName[FORM_LEN_OBJ_NAME + 1];
char ValTableFile[FORM_LEN_FILE_NAME + 1];
} FORM_TableAttr_typ;

The FORM_TableAttr_typ structure has the following fields:

ValTableName char. Name of the validation table.

ValTableFile char. Name of the file that contains the validation table.

342 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_Terminator_typ

FORM_Terminator_typ
This structure contains information that defines a terminator key.

typedef struct {
WORD Key;
WORD Shift;
} FORM_Terminator_typ;

The FORM_Terminator_typ structure has the following fields:

Key WORD. Terminator key. A virtual key code VK_F1 through


VK_F12.

Shift WORD. Shift state of the key. The shift state can be formed
by OR–ing FORM_SHIFT_ALT, FORM_SHIFT_CTL, and/or
FORM_SHIFT_SHIFT together.

December 1996 WAL for Windows Programmer’s Reference Manual 343


6 Data Types and Structures
FORM_TermProcAttr_typ

FORM_TermProcAttr_typ
typedef struct {
char ProcName[FORM_LEN_VALFUNC_NAME + 1];
char ProcLib[FORM_LEN_FILE_NAME + 1];
TERMPROC Proc;
DWORD ExtraParam
} FORM_TermProcAttr_typ;

The FORM_TermProcAttr_typ structure has the following fields:

ProcName char. Name of the function.

ProcLib char. Name of the .LIB file.

Proc TERMPROC.

ExtraParam DWORD.

344 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_TextField_typ

FORM_TextField_typ
This structure specifies data about a text field on a form.

typedef struct {
int DisplayX;
int DisplayY;
int DisplayWidth;
int DisplayHeight;
WORD Style;
HANDLE hText;
WORD Format;
char Description[FORM_LEN_OBJ_DESC + 1];
DWORD FrColor;
DWORD BkColor;
char FontName[FORM_LEN_FILE_NAME + 1];
WORD PointSize;
WORD Weight;
DWORD UserAttr;
} FORM_TextField_typ;

The FORM_TextField_typ structure has the following fields:

DisplayX int. x coordinate of upper left corner.

DisplayY int. y coordinate of upper left corner.

DisplayWidth int. Display width (columns * 100).

DisplayHeight int. Display height (rows * 100).

Style WORD.

hText HANDLE. The text.

Format WORD. See DrawText in Windows SDK Programmer’s


Reference manual.

Description char. Description of the text field.

FrColor DWORD. Color to display text in.

BkColor DWORD. Text background color.

FontName char. Name of the file that contains the font.

December 1996 WAL for Windows Programmer’s Reference Manual 345


6 Data Types and Structures
FORM_TextField_typ

PointSize WORD. Character height.

Weight WORD. Darkness of font in inked pixels per 1000.

UserAttr DWORD. User defined.

346 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FORM_ValFuncAttr_typ

FORM_ValFuncAttr_typ
typedef struct {
char ValFuncName[FORM_LEN_VALFUNC_NAME + 1];
char ValFuncLib[FORM_LEN_FILE_NAME + 1];
ERRFARPROC ValFunc;
DWORD ValFuncParam;
} FORM_ValFuncAttr_typ;

The FORM_ValFuncAttr_typ structure has the following fields:

ValFuncName char. Name of the function.

ValFuncLib char. Name of the LIB file that contains the function.

ValFunc ERRFARPROC. NULL or address of function.

ValFuncParam DWORD. User defined parameter that passed to FieldProc.


This is only of value for programs that assign it at runtime.

December 1996 WAL for Windows Programmer’s Reference Manual 347


6 Data Types and Structures
FORM_ValItem_typ

FORM_ValItem_typ
This structure contains information that defines a validation table item.

typedef struct {
char Item[FORM_LEN_VALITEM_STRING + 1];
char Desc[FORM_LEN_VALITEM_DESC + 1];
} FORM_ValItem_typ;

The FORM_ValItem_typ structure has the following fields:

Item char. The required validation string.

Desc char. An optional description of the validation string.

348 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
FP_number

FP_number
This type designates a number type.

typedef unsigned long FP_number [FP_numlongs];

December 1996 WAL for Windows Programmer’s Reference Manual 349


6 Data Types and Structures
IAFLIB_image_object_typ

IAFLIB_image_object_typ
This enumeration specifies the possible image types in WorkForce Desktop.

typedef enum
{
FN_BATCH,
FN_PRINT_JOB,
FN_CACHE,
FN_DOCUMENT_CLASS,
FN_DOCUMENT_TYP,
FN_WORKFLO_QUEUE_DEFINITION,
FN_WORKFLO_QUEUE_DESCRIPTION,
FN_WORKFLO_WORKSPACE,
FN_CACHE_OBJECT,
FN_ANNOTATION,
FN_TAB,
FN_FOLDERVIEW_STATE,
FN_FOLDER_TYP,
FN_FOLDER_NOTE,
FN_GENERAL_WORKFLO_OBJECT
} IAFLIB_image_object_typ;

350 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
IAFLIB_prefetch_result

IAFLIB_prefetch_result
This structure describes the result of the prefetch of one page range. It is
returned by IAFLIB_prefetch().

typedef struct {
ASE_page_number_typ pages_in_doc;
ASE_service_name_typ dest_cache;
error_typ range_error;
} IAFLIB_prefetch_result;

The IAFLIB_prefetch_result structure has the following fields:

pages_in_doc ASE_page_number_typ (unsigned short). The number of


pages that are in this document.

dest_cache ASE_service_name_typ (NCH_ObjectName). The


destination cache for this page range.

range_error error_typ (long). The error (if any) returned when attempting
to prefetch this page range.

See Also
“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 351


6 Data Types and Structures
ILIB Constants

ILIB Constants

Styles of Objects

ILIB_USE_DEFAULT_IMS 0 Use the currently logged on IMS.


ILIB_USE_CACHE_SERVICE 1 To specify objects in a BES cache service.
LIB_USE_DOC_SERVICE 2 To specify a particular DOC service.
LIB_USE_CACHE_IMS 3 To specify a cache that is not the default cache for
the document service that owns the document. It is
used in IAFLIB_get_object_text() only.

Styles of Annotations
These constants are used in IAFLIB_put_annotation().

ILIB_ANO_CREATE 1 To create an annotation.


ILIB_ANO_OVERRIDE 2 To override an annotation.
ILIB_ANO_REPORT_CHANGE 4

Styles of Database Update


These constants are used in IAFLIB_update_db().

ILIB_DIR_CLOSE 1 To close the document index record.


ILIB_DIR_OVERRIDE 2 To override the old document index record.

Styles of Folder Update


These constants are used in IAFLIB_update_folder().

ILIB_FOLDER_CLOSE 1 To close a folder.


ILIB_FOLDER_OVERRIDE 2 To override the old INX_folder_desc_typ.

352 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
ILIB_DOC_annotation_id_typ

ILIB_DOC_annotation_id_typ
This structure specifies the ID of an annotation. An annotation ID is the page-
relative identifier of an annotation on a page. There is no order implied by this
identifier, and annotation IDs can be non-contiguous. Annotation IDs will not
change, even if a lower-numbered annotation is deleted.

typedef struct {
unsigned long high_order;
unsigned long low_order;
} ILIB_DOC_annotation_id_typ;

The ILIB_DOC_annotation_id_typ structure has the following fields:

high_order unsigned long.

low_order unsigned long.

December 1996 WAL for Windows Programmer’s Reference Manual 353


6 Data Types and Structures
IMGFMT_custom_typ

IMGFMT_custom_typ
This structure contains the data for JPEG conversions. This structure is
included in the IMGFMT.I file.

See “IMGFMT_convert_image()” on page 1087 for a complete listing of


source to destination conversions.

typedef struct IMGFMT_custom {


int length;
int JPEG_resolution;
int JPEG_luminance;
int JPEG_chrominance;
BOOL JPEG_params_valid;
RECT source_clip;
} IMGFMT_custom_typ;

length int. length = sizeof(IMGFMT_custom_typ). To be used for


structure version checking in future releases.

JPEG_resolution
int.

In the following values, three digits separated by colons, such


as 4:4:4, are interpreted as follows:
[Chrominance]:[Luminance]:[Resultant resolution]. For
example with 4:2:2, there are 4 pixels, each with a
chrominance value, next are 2 luminance values averaged
from the original 4 luminance values, with a resultant
resolution of 0.5 or 1/2. We recommend experimenting with
the conversion values to get the best resolution and file size
compromise.

IMGFMT_JPEG_High 9 Resolution 4:4:4


destination/source ratio of 1/1.

IMGFMT_JPEG_Medium8 Resolution 4:2:2


destination/source ratio 1/2.

IMGFMT_JPEG_Low 13 Resolution 4:1:1


destination/source ratio of 1/4.

JPEG_luminance
int. Range -7 to +100.

354 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
IMGFMT_custom_typ

JPEG_chrominance
int. Range -7 to +100.

JPEG_params_valid
BOOL. True only if the three JPEG values are valid.

source_clip RECT. OLE RECT clip data as defined in windows.h.


(0,0,0,0) indicates no clip so the destination image will
contain the entire source.

December 1996 WAL for Windows Programmer’s Reference Manual 355


6 Data Types and Structures
IMGFMT_desc_typ

IMGFMT_desc_typ
This structure designates the IMGFMT descriptor.

typedef struct IMGFMT_desc {


PSTR filename;
unsigned short format;
} IMGFMT_desc_typ;

The IMGFMT_desc_typ structure has the following fields:

filename PSTR. Name of the file.

format unsigned short. Image format (e.g. IMGFMT_FILENET, etc.).

356 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_closed_typ

INX_closed_typ
This type specifies whether records for active, closed, or both active and
closed documents and folders are returned.

typedef unsigned short INX_closed_typ;

INX_closed_typ has the following defined constants:

INX_CL_ACTIVE 0 Specifies that only records for active documents are returned.
INX_CL_CLOSED 1 Specifies that only records for closed documents are
returned.
INX_CL_ALL 2 Specifies that records for all documents are returned.

December 1996 WAL for Windows Programmer’s Reference Manual 357


6 Data Types and Structures
INX_cluster_key_typ

INX_cluster_key_typ
typedef struct {
INX_cluster_space_typ cluster_space;
unsigned short cluster_id[3];
} INX_cluster_key_typ;

The INX_cluster_key_typ structure has the following fields:

cluster_space INX_cluster_space_typ.

cluster_id unsigned short.

See Also
“INX_cluster_space_typ” on page 359

358 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_cluster_space_typ

INX_cluster_space_typ
typedef unsigned short INX_cluster_space_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 359


6 Data Types and Structures
INX_dcl_id_typ

INX_dcl_id_typ
This type specifies a document class ID.

typedef unsigned short INX_dcl_id_typ;

360 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_dcl_name_typ

INX_dcl_name_typ
This type specifies a document class name.

typedef char INX_dcl_name_typ [FN_MAX_DCNAMESIZE + 1];

December 1996 WAL for Windows Programmer’s Reference Manual 361


6 Data Types and Structures
INX_dir_typ

INX_dir_typ
This type designates an abbreviation for INX_doc_index_rec_typ.

typedef INX_doc_index_rec_typ INX_dir_typ;

See Also
“INX_doc_index_rec_typ” on page 364

362 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_doc_type_typ

INX_doc_type_typ
typedef byte INX_doc_type_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 363


6 Data Types and Structures
INX_doc_index_rec_typ

INX_doc_index_rec_typ
This is a variable structure for general record (raw row). This structure
represents a document index record. The values in INX_doc_index_rec_typ
include both the system and user indexing information for the document.

typedef INX_VARYING struct doc_index_rec {


unsigned short value_len;
unsigned short value_num;
INX_index_value_typ values[1];
} INX_doc_index_rec_typ;

The INX_doc_index_rec_typ structure has the following fields:

value_len unsigned short. The value_len field is the total byte length of
the values structure sequence; it does not include the length
of the value_len field itself (2 bytes) and value_num field (2
bytes).

value_num unsigned short. Number of values.

values INX_index_value_typ. value_num number of INX_index_


value_typ structures.

You can view the INX_doc_index_rec_typ as follows:

value_len

value_num

values
index_id index_id index_id
type type type
data ... data ... data ...

See Also
“INX_index_value_typ” on page 373

364 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_fam_id_typ

INX_fam_id_typ
typedef unsigned long INX_fam_id_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 365


6 Data Types and Structures
INX_fc_doc_ord_item_typ

INX_fc_doc_ord_item_typ
This structure orders the documents in a folder. The structure is used in the
IAFLIB_get_docs_in_folder() function.

typedef struct INX_fc_doc_ord_item_typ {


FN_docnum_typ doc_id;
char ordinal[23];
} INX_fc_doc_ord_item_typ;

The INX_fc_doc_ord_item_typ structure has the following fields:

doc_id FN_docnum_typ. Document ID. To search from the first


document, you set doc_id to 0.

ordinal char. Currently, ordinal is ignored. It must always be set to '0'.

See Also
“FN_docnum_typ” on page 260

366 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_folder_desc_typ

INX_folder_desc_typ
This structure includes a description of a folder.

typedef struct folder_desc {


struct folder_desc * next_p;
FN_folnum_typ id;
INX_folder_name_typ name;
FN_BOOL leaf;
FN_BOOL non_leaf;
FN_BOOL closed;
FN_date_typ create_date;
FN_date_typ archive_date;
FN_date_typ delete_date;
short auto_del_period;
SCT_access_restrictions security;
INX_retent_disp_typ retent_disp;
INX_retent_base_typ retent_base;
INX_retent_offset_typ retent_offset;
} INX_folder_desc_typ;

The INX_folder_desc_typ structure has the following fields:

next_p INX_folder_desc_typ *. Pointer to next item in linked list.

id FN_folnum_typ (unsigned long). The number identifying the


folder, unique within the database.

name INX_folder_name_typ. The name of the folder, unique within


the database.

leaf FN_BOOL. Obsolete.

non_leaf FN_BOOL. Obsolete.

closed FN_BOOL. TRUE if the folder is closed.

create_date FN_date_typ (long). The date the folder was created.

archive_date FN_date_typ (long). The date when the folder and its
contents will be archived.

delete_date FN_date_typ (long). The date when the folder and its
contents will be deleted.

December 1996 WAL for Windows Programmer’s Reference Manual 367


6 Data Types and Structures
INX_folder_desc_typ

auto_del_period
short. The number of months to leave documents in a folder.

security SCT_access_restrictions. Contains information about the


folder’s access restrictions.

retent_disp INX_retent_disp_typ (char). Specifies whether to delete or


archive the folder when the retention period expires.
FN_ARCHIVE ‘1’
FN_DELETE ‘\0’

retent_base INX_retent_base_typ (char). Specifies whether retention is


relative to creation or closing.
FN_REL_TO_CLOSING ‘\0’
FN_REL_TO_ENTRY ‘1’
FN_REL_TO_LAST_ACCESS ‘2’
FN_ABSOLUTE ‘3’

retent_offset INX_retent_offset_typ (unsigned long). Number of months to


retain the folder after the retention base date.

See Also
“FN_date_typ” on page 259

“FN_folnum_typ” on page 261

“INX_folder_name_typ” on page 369

“INX_retent_base_typ” on page 376

“INX_retent_disp_typ” on page 377

“INX_retent_offset_typ” on page 378

“SCT_access_restrictions” on page 481

368 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_folder_name_typ

INX_folder_name_typ
This structure specifies the name of a folder.

typedef char INX_folder_name_typ [INX_MAX_FLD_NAME + 1];

The following characters can be used in folder names:

uppercase letters (A–Z)


lowercase letters (a–z)
decimal digits (0–9)
underscore (_)

The character slash (/) separates the components. Each full folder name is
unique within a system.

December 1996 WAL for Windows Programmer’s Reference Manual 369


6 Data Types and Structures
INX_folder_spec_typ

INX_folder_spec_typ
This structure is like INX_folder_name_typ except that you can use wildcards
to specify folder names. Through the use of common prefixes, folders can be
logically grouped. You can use the notation described in the text below to
specify collections of folders.

An asterisk (*) wildcard refers to zero or more folder-name characters and can
appear at the end of the last component of the name. A trailing slash has a
special function and refers to both the name specified and all folders below it.
For example:

/i refers to a single folder called i


/i/ refers to i and all folders below i

/i/J* refers to all folders beginning with J, one level below i


/i/J*/ refers to all folders beginning with J, one level below i,
and all those below.

typedef INX_folder_name_typ INX_folder_spec_typ;

370 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_index_id_typ

INX_index_id_typ
This type specifies an index ID, which defines a system-wide unique number
to identify an index. Index IDs are refer to both system and user indexes.

typedef unsigned short INX_index_id_typ;

INX_index_id_typ has the following defined constant:

INX_INVALID_INDEX_ID 0

December 1996 WAL for Windows Programmer’s Reference Manual 371


6 Data Types and Structures
INX_index_name_typ

INX_index_name_typ
This type specifies a system-wide unique index name.

typedef char INX_index_name_typ[FN_MAX_IXNAME +1];

372 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_index_value_typ

INX_index_value_typ
typedef INX_VARYING struct {
INX_index_id_typ index_id;
INX_value_type_typ type;
char data[2];
} INX_index_value_typ;

The INX_index_value_typ structure has the following fields:

index_id INX_index_id_typ (unsigned short). Index ID number.


Numbers from 0 to 30 are reserved for system indices.
Numbers greater than 31 are for user defined indices.

type INX_value_type_typ (unsigned short). See INX_value_type_


typ.

data char. Type-dependent; can be longer.

See Also
“INX_index_id_typ” on page 371

“INX_value_type_typ” on page 379

December 1996 WAL for Windows Programmer’s Reference Manual 373


6 Data Types and Structures
INX_query_match_typ

INX_query_match_typ
This variable structure specifies a query match record. IAFLIB_query_db()
and IAFLIB_continue_query() return a sequence of INX_query_match_typ
structures.

The returned string data (ASCII) varies in length, but must have an even
number of bytes. Other returned data has constant length defined in INX_
index_value_type_typ (see “INX_value_type_typ” on page 379). Strings are
stored and padded with null characters, if needed, for even-byte boundary
alignment.

typedef INX_VARYING struct query_match {


struct query_match * next_p;
FN_folnum_typ folder_id;
INX_dir_typ dir;
} INX_query_match_typ;

The INX_query_match_typ structure has the following fields:

next_p query_match * (INX_query_match_typ). next_p is an offset to


the next structure.

folder_id FN_folnum_typ (unsigned long). The folder in which the


document index record was filed (or 0 if not in a folder).

dir INX_dir_typ. The document index record for the document


matching the query.

Note next_p is NOT used as a pointer. To retrieve the next query match, you need
to use the INX_query_match_typ pointer as follows:

error_typ err;
HANDLE qm_h;
INX_query_match_typ *qm_p;
WORD ii, num_matches;
...
err = IAFLIB_query_db(...&num_matches, &qm_h);
qm_p = (INX_query_match_typ *)GlobalLock(qm_h);
for (ii=0; ii<num_matches; ii++) {
...
/* Next query match is offset by next_p */
(LPSTR)qm_p += (WORD)qm_p->next_p;
} /* end of for */
GlobalUnlock(qm_h);

374 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_query_match_typ

See Also
“FN_folnum_typ” on page 261

“INX_dir_typ” on page 362

December 1996 WAL for Windows Programmer’s Reference Manual 375


6 Data Types and Structures
INX_retent_base_typ

INX_retent_base_typ
This type specifies a document or folder retention base. The time at which a
document or folder is to be disposed of is specified by its retention base and
retention offset, defined as the system indexes f_retentBase and
f_retentOffset. The retention base is either the entry date of the document or
folder or the date the document was explicitly closed by a client.

typedef char INX_retent_base_typ[2];

INX_retent_base_typ has the following defined constants. The descriptions in


this table use the word document, but apply to documents and folders.

FN_REL_TO_CLOSING 0 If a document’s retention base is relative to closing, the


document must be closed explicitly by a client of Index
Services. When a client uses IAFLIB_update_db() to close
a document explicitly, Index Services sets one of the system
indexes (f_archiveDate or f_deleteDate, depending on its
retention disposition) to the current date plus the number of
months specified for the retention offset. Thus, the
document is ready to be archived or deleted INX_retent_
offset_typ months following the client’s call to close the
document.
FN_REL_TO_ENTRY 1 If a document’s retention base is relative to entry, then the
f_archiveDate or f_deleteDate is set at the time the
document index record is created. It is set to the current
date plus the months in INX_retent_offset_typ.
FN_REL_TO_LAST_ACCESS 2 Obsolete.
FN_ABSOLUTE 3 Obsolete.

376 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_retent_disp_typ

INX_retent_disp_typ
This type describes a document or folder retention disposition. The retention
disposition, defined in the system index f_retentDisp, specifies what happens
to a document when its retention date has expired. Default retention
parameters are associated with both document classes and folders, but the
retention parameters for a specific document or folder can be modified by the
client using IAFLIB_update_db() or IAFLIB_update_folder().

typedef char INX_retent_disp_typ[2];

INX_retent_disp_typ has the following defined constants:

FN_ARCHIVE '1' Archive the documents.


FN_PURGE '2' Not currently used.
FN_DELETE '\0' Delete the document or folder. The document or folder is not
actually deleted until the System Administrator runs a program
to do this.

December 1996 WAL for Windows Programmer’s Reference Manual 377


6 Data Types and Structures
INX_retent_offset_typ

INX_retent_offset_typ
This type designates a document or folder retention offset. The time at which
a document or folder is to be disposed of is specified by its retention base and
retention offset, defined as the system indexes f_retentBase and
f_retentOffset. The retention offset specifies the minimum number of months
from the retention base at which time the document will be disposed of.

typedef unsigned long INX_retent_offset_typ;

From release 3.0, the maximum value of the retention offset is 16,383 months
instead of 966 months. It is defined in limits.h as:

#define FN_MAX_RETENTION 16383

378 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
INX_value_type_typ

INX_value_type_typ
This type defines the data types of an index value. Each index value in a
document index record has a fixed data type.

The INX_VT_BYTE and INX_VT_UNS_BYTE values are translated into


Courier INTEGER and CARDINAL types, respectively, by specifying a sign
extension. The low byte contains the datum.

Currently, user indexes are restricted to the values INX_VT_FPNUM, INX_


VT_ASCII, INX_VT_DATE, and INX_VT_MENU, although system indexes
can take any of the values. INX_VT_NULL is unique because no index can be
defined to be of type null. INX_VT_NULL is either a constant value in the
Query record or explicitly sets index values to null in IAFLIB_update_db(). An
index value of any type can be compared against null. All compares against
null return FALSE, except “<null index> = null” and “<non-null index> != null”.

typedef unsigned short INX_value_type_typ

INX_VT_BOOLEAN 'A' TRUE or FALSE


INX_VT_BYTE 'B' Signed two’s complement 8 bit quantity
INX_VT_UNS_BYTE 'C' Unsigned 8 bit quantity
INX_VT_SHORT 'D' Signed two’s complement 16 bit quantity
INX_VT_UNS_SHORT 'E' Unsigned 16 bit quantity
INX_VT_LONG 'F' Signed two’s complement 32 bit quantity
INX_VT_UNS_LONG 'G' Unsigned 32 bit quantity
INX_VT_FPNUM '1' FN_NUMBER–FileNet Floating point number
INX_VT_ASCII '2' FN_STRING–String data
INX_VT_DATE '8' FN_DATE–FileNet encoded date
INX_VT_TIME '3' FN_TIME–FileNet encoded date and time
INX_VT_MENU '4' FN_SELECTION–Integer values encoding string
constants
INX_VT_NULL '0' No value

December 1996 WAL for Windows Programmer’s Reference Manual 379


6 Data Types and Structures
NCH_AttributesDescValue

NCH_AttributesDescValue
This structure defines the format of the attributes property value. These
attributes can be returned from SVN_get_Attr_desc() function.

typedef struct {
unsigned short level;
unsigned long object_checksum_level;
unsigned long default_system_char_set;
unsigned long former_system_char_set;
unsigned long major_high_num;
unsigned long major_low_num;
unsigned long major_minor_num;
unsigned long major_cycle_num;
unsigned long vendor_id;
} NCH_AttributesDescValue;

The NCH_AttributesDescValue structure has the following fields:

level unsigned short. Indicates the record format level; must be


NCH_AttributesDescLevel.

object_checksum_level
unsigned long. Indicates the level of checksum checking to
be implemented on the object. Valid values are:
NCH_NO_CHECKSUM 0
NCH_MIN_CHECKSUM 1
NCH_FULL_CHECKSUM 2

default_system_char_set
unsigned long. Defines the character set this system uses in
its RPC communications. See the table on page 381.

former_system_char_set
unsigned long. Defines the character set of the rendering
objects that come into the system.

Used by object rendering software when rendering objects


that are not character set self-describing.

380 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_AttributesDescValue

major_high_num
unsigned long. Indicates the system software release
number. For example, for server software 3.1.0.7, it returns:
major_high_num =3
major_low_num =1
major_minor_num = 0
major_cycle_num = 7

major_low_num
unsigned long. See major_high_num.

major_minor_num
unsigned long. See major_high_num.

major_cycle_num
unsigned long. See major_high_num.

vendor_id unsigned long. Indicates the distribution channel. It can also


be used by application software to implement license
restrictions. The predefined distribution channels are:
NCH_VENDOR_FILENET 0
NCH_VENDOR_UNISYS 1
NCH_VENDOR_OLIVETTI 2

Default_system_char_set and former_system_char_set have the following


defined constants:

FN_CHAR_SET_FORMER 0 0 and 1 are from system configuration. Values can be


any of the following.
FN_CHAR_SET_DEFAULT 1 See 0.
FN_CHAR_SET_INTERNATIONAL 2 2 and 3 are for FileNet server software release 2.6 or
before.
FN_CHAR_SET_ARABIC 3 See 2. This is the same as the ASMO 708 character
set.
FN_CHAR_SET_8859_1 11 11 to 19 are for the ISO character sets
FN_CHAR_SET_8859_2 12 See 11.
FN_CHAR_SET_8859_3 13 See 11.
FN_CHAR_SET_8859_4 14 See 11.
FN_CHAR_SET_8859_5 15 See 11.
FN_CHAR_SET_8859_6 16 See 11.

December 1996 WAL for Windows Programmer’s Reference Manual 381


6 Data Types and Structures
NCH_AttributesDescValue

FN_CHAR_SET_8859_7 17 See 11.


FN_CHAR_SET_8859_8 18 See 11.
FN_CHAR_SET_8859_9 19 See 11.
FN_CHAR_SET_SHIFT_JIS 30 30 and 31 are for Japanese character sets
FN_CHAR_SET_EUC_J 31 See 30.
FN_CHAR_SET_KSC_5601 40 This is for the Korean character set
FN_CHAR_SET_LOCAL 255 This represents the local character set

382 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_BatchDescValue

NCH_BatchDescValue
This structure defines the format of the BatchDesc property value.

typedef struct {
unsigned short level;
NCH_ObjectName ims;
NCH_ObjectName cachename;
} NCH_BatchDescValue;

The NCH_BatchDescValue structure has the following fields:

level unsigned short. Indicates the record format level; must be


NCH_BatchDescLevel.

ims NCH_ObjectName. Name of the IMS for the specified Batch


Entry Service.

cachename NCH_ObjectName. Indicates which cache is used to store


the uncommitted images.

See Also
“NCH_ObjectName” on page 395

December 1996 WAL for Windows Programmer’s Reference Manual 383


6 Data Types and Structures
NCH_CacheDescValue

NCH_CacheDescValue
This structure defines the format of the CacheDesc property value.

typedef struct {
unsigned short level;
unsigned long ssn;
unsigned long cache_id;
unsigned long min_sector_size;
unsigned long max_sector_size;
unsigned short refcnts;
unsigned short ageable;
struct {
unsigned long read_group
unsigned long write_group
unsigned long AX_group;
} security;
} NCH_CacheDescValue;

The NCH_CacheDescValue structure has the following fields:

level unsigned short. Indicates the record format level; must be


NCH_CacheDescLevel.

ssn unsigned long. System serial number for the specified cache.

cache_id unsigned long. The cache ID of the specified cache.

min_sector_size
unsigned long. The minimum size in sectors of the specified
cache.

max_sector_size
unsigned long. The maximum size in sectors of the specified
cache.

refcnts unsigned short. Whether reference counts (vs. ageing) are


enabled or not.

ageable unsigned short. Whether ageing (vs. reference counts) is


enabled or not.

read_group unsigned long. Security for the specified cache (document


access restriction for read).

384 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_CacheDescValue

write_group unsigned long. Security for the specified cache (document


access restriction for write).

AX_group unsigned long. Security for the specified cache (document


access restriction for append/execute).

December 1996 WAL for Windows Programmer’s Reference Manual 385


6 Data Types and Structures
NCH_DefCacheDescValue

NCH_DefCacheDescValue
This structure defines the format of the property value used to store
information about the default cache.

typedef struct {
unsigned short level;
NCH_ObjectName default_cold_cache;
NCH_ObjectName default_entry_cache;
NCH_ObjectName default_gti_cache;
NCH_ObjectName default_pdb_cache;
NCH_ObjectName default_fillin_cache;
NCH_ObjectName default_ocr_cache;
} NCH_DefCacheDescValue;

The NCH_DefCacheDescValue structure has the following fields:

level unsigned short. Indicates the record format level; must be


NCH_DefCacheDescLevel.

default_cold_cache
NCH_ObjectName.

default_entry_cache
NCH_ObjectName.

default_gti_cache
NCH_ObjectName.

default_pdb_cache
NCH_ObjectName.

default_fillin_cache
NCH_ObjectName.

default_ocr_cache
NCH_ObjectName.

See Also
“NCH_ObjectName” on page 395

386 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_DefDeviceDescValue

NCH_DefDeviceDescValue
typedef struct {
unsigned short level;
NCH_ObjectName default_printer;
NCH_ObjectName default_tape_drive;
} NCH_DefDeviceDescValue;

The NCH_DefDeviceDescValue structure has the following fields:

level unsigned short. FileNet property level number.

default_printer
NCH_ObjectName. Three-part NCH name for default printer.

default_tape_drive
NCH_ObjectName. Three-part NCH name for default tape
drive.

See Also
“NCH_ObjectName” on page 395

December 1996 WAL for Windows Programmer’s Reference Manual 387


6 Data Types and Structures
NCH_DefServiceDescValue

NCH_DefServiceDescValue
This structure defines the format of the property value used to store
information about the default service.

typedef struct {
unsigned short level;
NCH_ObjectName default_bes;
NCH_ObjectName default_dtars_service;
NCH_ObjectName default_ims;
NCH_ObjectName default_print_service;
NCH_ObjectName default_skf_service;
NCH_ObjectName default_wflq_service;
NCH_ObjectName default_sort_service;
NCH_ObjectName default_sql_service;
} NCH_DefServiceDescValue;

The NCH_DefServiceDescValue structure has the following fields:

level unsigned short. FileNet property level number.

default_bes NCH_ObjectName.

default_dtars_service
NCH_ObjectName.

default_ims NCH_ObjectName.

default_print_service
NCH_ObjectName.

default_skf_service
NCH_ObjectName.

default_sflq_service
NCH_ObjectName.

default_sort_service
NCH_ObjectName.

default_sql_service
NCH_ObjectName.

See Also
“NCH_ObjectName” on page 395

388 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_DefService1DescValue

NCH_DefService1DescValue
This structure defines the format of the property value used to store
information about the default service.

We have renamed OCR service to ICR service in the Network Clearing House
(NCH). The following changes in the nch_form.h include:

NCH_ocrDesc has been changed from:

#define NCH_ocrDesc 60117

to:

#define NCH_ICRServiceDesc 60117


#define NCH_ocrDesc NCH_ICRServiceDesc

NCH_OCRService has been changed from:

#define NCH_OCRService 60025

to:

#define NCH_ICRService 60025


#define NCH_OCRService NCH_ICR_Service

The NCH_DefService1DescValue structure has the following definition:

#define NCH_DefService1DescLevel NCH_Prop_Level(0,0)

typedef struct {
unsigned short level;
NCH_ObjectName default_icr_service;
NCH_ObjectName default_file_service;
NCH_ObjectName default_sec_service;
} NCH_DefService1DescValue;

December 1996 WAL for Windows Programmer’s Reference Manual 389


6 Data Types and Structures
NCH_DefService1DescValue

The NCH_DefService1DescValue structure has the following fields:

level unsigned short. FileNet property level number.

default_icr_service
NCH_ObjectName. Assigned name.

default_file_service
NCH_ObjectName. Assigned name.

default_sec_service
NCH_ObjectName. Assigned name.

See Also
“NCH_ObjectName” on page 395

390 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_DomainName

NCH_DomainName
typedef struct {
char organization[NCH_MAX_ORG_LENGTH];
char domain[NCH_MAX_DOMAIN_LENGTH];
} NCH_TwoPartName,
NCH_DomainName,
NCH_DomainNamePattern;

The NCH_DomainName structure has the following fields:

organization char. Name of the organization.

domain char. Name of the domain. This is usually the name of a


FileNet system.

December 1996 WAL for Windows Programmer’s Reference Manual 391


6 Data Types and Structures
NCH_ICRServiceDescValue

NCH_ICRServiceDescValue
The ICRServiceDesc property values contain the icr_wqs_service and icr_
cache service names.

#define NCH_ICRServiceDescLevel NCH_PROP_LEVEL(0,1)


#define NCH_ICRServiceDescLength 161

typedef struct {
unsigned short level;
NCH_ObejctName icr_bes_service;
NCH_ObejctName icr_wqs_service;
NCH_ObejctName icr_sql_service;
NCH_ObejctName icr_cache;
} NCH_ICRServiceDescValue;

level unsigned short. Record format level (NCH_ICR_


ServiceDescLevel).

icr_bes_service
NCH_ObjectName. BES service instance used by ICR
service.

icr_wqs_service
NCH_ObjectName. WQS service instance used by ICR
service.

icr_sql_service
NCH_ObjectName. SQL service instance used by ICR
service.

icr_cache NCH_ObjectName. The name of the ICR cache used by the


ICR service.

See Also
“NCH_ObjectName” on page 395

392 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_IMSDescValue

NCH_IMSDescValue
This structure defines the format of the IMSDesc property value.

typedef struct {
unsigned short level;
NCH_ObjectName index_service;
NCH_ObjectName document_service;
unsigned long ssn;
NCH_ObjectName forms_service;
} NCH_IMSDescValue;

The NCH_IMSDescValue structure has the following fields:

level unsigned short. Indicates the record format level; must be


NCH_IMSDescLevel.

index_service NCH_ObjectName. Name of the Index Service for the


specified IMS.

document_service
NCH_ObjectName. Name of the Document Service for the
specified IMS.

ssn unsigned long. Name of the SSN for the specified IMS.

forms_service NCH_ObjectName. Indicates which Single-Keyed File (SKF)


service handles index forms for the IMS.

See Also
“NCH_ObjectName” on page 395

December 1996 WAL for Windows Programmer’s Reference Manual 393


6 Data Types and Structures
NCH_NetAddr_typ

NCH_NetAddr_typ
This structure is equivalent to NET_NetAddr_typ structure.

typedef struct NET_NetAddr_typ {


NET_NetNum_typ netNumber;
NET_HostNum_typ hostNumber;
unsigned short socketNumber;
} NET_NetAddr_typ;

The NCH_NetAddr_typ structure has the following fields:

netNumber NET_NetNum_typ. 32-bit network number.

hostNumber NET_HostNum_typ. 48-bit host number.

socketNumber
unsigned short. 16-bit socket number.

See Also
“NET_HostNum_typ” on page 398

“NET_NetNum_typ” on page 401

394 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_ObjectName

NCH_ObjectName
This structure defines the names of each FileNet application service. Each
instance of a service has a name used to uniquely identify it. The service
name to network address translation is done by the NCH service. Each field is
null-terminated unless it’s the maximum length.

typedef struct {
char organization[NCH_MAX_ORG_LENGTH];
char domain[NCH_MAX_DOMAIN_LENGTH];
char object[NCH_MAX_OBJECT_LENGTH];
} NCH_ObjectName;

The NCH_ObjectName structure has the following fields:

organization string; maximum length 20 characters. Organization name;


third part of NCH three-part name.

domain string; maximum length 20 characters. Domain name;


second part of NCH three-part name.

object string; maximum length 40 characters. Object name; first part


of NCH three-part name.

December 1996 WAL for Windows Programmer’s Reference Manual 395


6 Data Types and Structures
NCH_PrintServDescValue

NCH_PrintServDescValue
typedef struct {
unsigned short level;
NCH_ObjectName print_cache;
} NCH_PrintServDescValue;

#define NCH_printServDescLevel NCH_PROP_LEVEL(0,0)

The NCH_PrintServDescValue structure has the following fields:

level unsigned short. The record format level. must be NCH_


printServDescLevel.

print_cache NCH_objectName. The name of the print cache that can be


used by print service clients for building temporary cache
objects that will eventually be printed.

See Also
“NCH_ObjectName” on page 395

396 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NCH_Property

NCH_Property
typedef unsigned long NCH_Property;

NCH_Property has the following defined constants:

NCH_ITEM_PROP 0
NCH_GROUP_PROP 1
NCH_ALL_PROPERTIES 0
NCH_NULL_PROPERTY 0xffffffff unsigned long
NCH_SERV_TER 0
NCH_SERV_SEC 1
NCH_SERV_PRI 2

December 1996 WAL for Windows Programmer’s Reference Manual 397


6 Data Types and Structures
NET_HostNum_typ

NET_HostNum_typ
typedef struct NET_HostNum_typ {
unsigned char hostNumber[6];
} NET_HostNum_typ;

The NET_HostNum_typ structure has the following field:

hostNumber unsigned char. 48-bit host number.

398 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NET_ip_addr_typ

NET_ip_addr_typ
typedef struct ip_addr_typ {
unsigned char addr[4];
} NET_ip_addr_typ;

The NET_ip_addr_typ structure has the following field:

addr unsigned char. 32-bit IP address.

December 1996 WAL for Windows Programmer’s Reference Manual 399


6 Data Types and Structures
NET_NetAddr_typ

NET_NetAddr_typ
typedef struct NET_NetAddr_typ {
NET_NetNum_typ netNumber;
NET_HostNum_typ hostNumber;
unsigned short socketNumber;
} NET_NetAddr_typ;

The NET_NetAddr_typ structure has the following fields:

netNumber NET_NetNum_typ. 32-bit network number.

hostNumber NET_HostNum_typ. 48-bit host number.

socketNumber
unsigned short. 16-bit socket number.

See Also
“NET_HostNum_typ” on page 398

“NET_NetNum_typ” on page 401

400 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
NET_NetNum_typ

NET_NetNum_typ
typedef struct NET_NetNum_typ {
unsigned char netNumber[4];
} NET_NetNum_typ;

The NET_NetNum_typ structure has the following field:

netNumber unsigned char. 32-bit network number.

December 1996 WAL for Windows Programmer’s Reference Manual 401


6 Data Types and Structures
PRI_annot_mark_typ

PRI_annot_mark_typ
typedef struct {
long x_coord;
long y_coord;
unsigned short annot_id;
} PRI_annot_mark_typ;

The PRI_annot_mark_typ structure has the following fields:

x_coord long. X-coordinate position in pixel.

y_coord long. Y-coordinate position in pixel.

annot_id unsigned short. Annotation ID.

402 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_annot_marks_typ

PRI_annot_marks_typ
typedef struct {
unsigned short num_annots;
PRI_annot_mark_typ mark [1];
} PRI_annot_marks_typ;

The PRI_annot_marks_typ structure has the following fields:

num_annots unsigned short. Number of annotations.

mark PRI_annot_mark_typ. Specifies a PRI_annot_mark_typ data


structure.

See Also
“PRI_annot_mark_typ” on page 402

December 1996 WAL for Windows Programmer’s Reference Manual 403


6 Data Types and Structures
PRI_doc_specifier_typ

PRI_doc_specifier_typ
This structure specifies a document ID, a range of pages to be printed, and
the source (either a Cache service of a Document service). If the source is a
Cache service, the specification also includes an SSN, which builds the
CSM_object_desc_typ(s) for the source cache, and a boolean delete_after,
which, if TRUE, automatically deletes objects from the cache after they are
printed.

If you are printing an array of documents using IAFLIB_print_docs() or


IAFLIB_print_docs1(), you can specify an array of PRI_doc_specifier_typ
structures and specify a page range for each document to be printed.

typedef struct {
ASE_page_range_typ doc;
PRI_service_type_typ svc_type;
ASE_service_name_typ svc_name;
ASE_ssn_typ ssn;
FN_BOOL delete_after;
} PRI_doc_specifier_typ;

The PRI_doc_specifier_typ structure has the following fields:

doc ASE_page_range_typ. Defines a document ID and a


contiguous set of pages within that document. Specifying first
and last pages both equal to zero implies all pages in the
document; specifying both to the same page number prints
that one page. Specifying a first page number whose value is
greater than actual last page of the document returns the
error “87,0,7: Some or all of the specified pages are not in the
document.”

svc_type PRI_service_type_typ (unsigned short). Documents come


from one of two different services: either a Document service
or a Cache service. The caller must specify which using one
of these defines:
PRI_ST_DOC_SERVICE 1
PRI_ST_CACHE_SERVICE 2

If the svc_type is PRI_ST_DOC_SERVICE, a null string value


for svc_name implies the default document service, and the
delete_after flag is ignored. This is the normal manner of
calling IAFLIB_print_docs().

404 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_doc_specifier_typ

If the svc_type is PRI_ST_CACHE_SERVICE, the svc_name


must indicate the source cache, and the delete_after flag
determines whether to remove the object from cache after
printing.

Note Do not set the delete_after flag to TRUE if printing an uncommitted image
from the batch entry cache.

svc_name ASE_service_name_typ (NCH_ObjectName). NCH name of


a Cache or a Document service.

ssn ASE_ssn_typ (unsigned long). For a Cache service; ssn is


the SSN of the object(s) in the cache, or ASE_LOCAL_SSN
(which is the SSN of the local system).

delete_after FN_BOOL. For a Cache service; if TRUE, delete this cache


object after printing.

See Also
“ASE_page_range_typ” on page 174

“ASE_service_name_typ” on page 178

“ASE_ssn_typ” on page 180

“PRI_service_type_typ” on page 458

“IAFLIB_print_docs()” on page 1051

“IAFLIB_print_docs1()” on page 1053

December 1996 WAL for Windows Programmer’s Reference Manual 405


6 Data Types and Structures
PRI_eject_tray_typ

PRI_eject_tray_typ
This type specifies the eject tray for a print job. This value is used in the PRI_
print_option_typ2 structure. An eject tray number can be specified (1..n), or
PRI_DEFAULT_EJECT_TRAY can be specified for the default tray.

typedef unsigned short PRI_eject_tray_typ;

PRI_eject_tray_typ has the following defined constants:

PRI_DEFAULT_EJECT_TRAY 0 Default eject tray


PRI_ET_DEFAULT 0 Default eject tray
PRI_ET_UPPER 1 Upper eject tray
PRI_ET_UPPER_OFFSET 2 Upper offset eject tray
PRI_ET_LOWER 3 Lower eject tray
PRI_ET_LOWER_OFFSET 4 Lower offset eject tray
PRI_ET_SIDE 5 Side eject tray
PRI_ET_BIN1 6 Bin 1
PRI_ET_BIN2 7 Bin 2
PRI_ET_BIN3 8 Bin 3
PRI_ET_BIN4 9 Bin 4
PRI_ET_BIN5 10 Bin 5
PRI_ET_BIN6 11 Bin 6
PRI_ET_BIN7 12 Bin 7
PRI_ET_BIN8 13 Bin 8
PRI_ET_BIN9 14 Bin 9
PRI_ET_BIN10 15 Bin 10
PRI_MAX_EJECT_TRAY PRI_ET_BIN10

406 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_fax_mode_typ

PRI_fax_mode_typ
This type specifies the resolution at which the request is transmitted.

typedef unsigned short PRI_fax_mode_typ;

PRI_fax_mode_typ has the following defined constants:

PRI_FM_COURSE 0 Normal resolution (200 dpi x 100 dpi). This is the


default.
PRI_FM_FINE 1 Fine resolution (200 dpi x 200 dpi).
PRI_FM_300_DPI 2 Detail resolution (300dpi x300 dpi)
PRI_FM_400_DPI 3 Super resolution (400 dpi x 400 dpi)
PRI_FM_FNDATA 4 FileNet image data type
PRI_FM_OTHERDATA 5 Other data.
PRI_MAX_FM PRI_FM_OTHERDATA
PRI_DEFAULT_FM PRI_FM_COARSE

December 1996 WAL for Windows Programmer’s Reference Manual 407


6 Data Types and Structures
PRI_option_typ

PRI_option_typ
This type specifies print options. These defines enumerate the possible types
of print options in the PRI_print_option_typ, PS_long_option_type, and PRI_
print_option_typ2 structures. The option_type field in those structures
determines which of the union’s members is appropriate.

typedef unsigned short PRI_option_typ;

PRI_option_typ has the following defined constants:

PRI_OPTION_PAPER_SIZE 0 For print jobs; the paper size or paper tray location.
PRI_OPTION_PRIORITY 1 For print jobs; the relative importance of this print
request compared to other print jobs.
PRI_OPTION_PRINTER_NAME 2 For print or fax jobs, the specific machine to use.
PRI_OPTION_COLLATE 3 For print jobs; sorts the printed output by copy
(instead of by page) when printing multiple copies
of a multi-page document.
PRI_OPTION_SECURITY 4 Not used; if specified, it is ignored.
PRI_OPTION_COPIES 5 For print jobs; the number of copies to print. (You
can only fax one copy.)
PRI_OPTION_PRINT_TIME 6 The time at which the job is to be processed.
PRI_OPTION_STAPLE 7 For print jobs; specifies that copies are stapled.
(Note that FileNet does not currently support any
printers with this capability.)
PRI_OPTION_TWO_SIDED 8 Specifies that copies are printed on both sides.
(Note that FileNet does not currently support any
printers with this capability.)
PRI_OPTION_FORM_NAME 9 Not used; if specified, it is ignored.
PRI_OPTION_NOTE 10 Specifies a note that will print on the request
header page for a print request.
PRI_OPTION_ANNOTATIONS 11 Prints annotations associated with a document.
PRI_OPTION_REQUEST_HEADER 12 For print jobs, prints a cover page for all print jobs;
for fax, enables cover sheets.
PRI_OPTION_DOC_HEADERS 13 For print jobs; prints a cover page for each
document in a print job. Applicable to print
requests for committed documents only.

408 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_option_typ

PRI_OPTION_SCALING 14 For print jobs; specifies the method used to scale


an image.
PRI_OPTION_ORIENTATION 15 For print jobs; specifies what orientation the
images have on the page.
PRI_OPTION_OVERLAY 16 For Print jobs; specifies the overlay options. Valid
options are:
PRI_ONE_OVERLAY
PRI_MULTI_OVERLAY
PRI_OPTION_PHONE_NUM 17 For fax jobs; specifies the telephone number of the
fax machine you are transmitting to.
PRI_OPTION_HEADLINE 18 For fax jobs; specifies the To... From... Message
fields that print on the top of each faxed page.
PRI_OPTION_FAX_MODE 19 For fax jobs; specifies the resolution of the
transmitted job.
PRI_OPTION_PAGE_FOOTNOTE 20 For fax jobs; prints the page number at the bottom
of each page in a transmitted job.
PRI_OPTION_TIME_FOOTNOTE 21 For fax jobs; prints the transmission date and time
at the bottom of each page in a transmitted job.
PRI_OPTION_EJECT_TRAY 22 Printer option.
PRI_OPTION_PHONE_EXT 23 Fax option.
PRI_OPTION_MEMO 24 Fax option.
PRI_OPTION_COVER_DOC 25 Fax option.
PRI_MAX_OPTION PRI_OPTION_TIME_FOOTNOTE

December 1996 WAL for Windows Programmer’s Reference Manual 409


6 Data Types and Structures
PRI_orientation_typ

PRI_orientation_typ
This type specifies the orientation option that the image has on a page.

typedef unsigned short PRI_orientation_typ;

PRI_orientation_typ has the following defined constants:

PRI_ORIENT_DEFAULT 0 Causes the long edge of the image to be lined up with


the long edge of the paper.
PRI_ORIENT_LANDSCAPE 1 Causes the image to be rotated (if necessary) so that
the long edge of the image runs horizontally on the
paper, regardless of the orientation of the paper. The
output paper must be at least one size larger than the
stored image.
PRI_ORIENT_PORTRAIT 2 Causes the image to be rotated (if necessary) so that
the long edge of the image runs vertically on the paper,
regardless of scanning orientation.
PRI_ORIENT_NO_ROTATE 3 Causes the image to be printed in whatever orientation
it is stored, regardless of the orientation of the paper.
PRI_MAX_ORIENT PRI_ORIENT_NO_ROTATE

410 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_overlay_typ

PRI_overlay_typ
typedef unsigned short PRI_overlay_typ;

PRI_overlay_typ has the following defined constants:

PRI_NO_OVERLAY 0 No overlays.
PRI_ONE_OVERLAY 1 First page has an overlay.
PRI_MULTI_OVERLAY 2 All pages have an overlay.
PRI_MAX_OVERLAY PRI_MULTI_OVERLAY

December 1996 WAL for Windows Programmer’s Reference Manual 411


6 Data Types and Structures
PRI_pages_printed_typ

PRI_pages_printed_typ
typedef struct {
unsigned short doc_order;
ASE_page_number_typ page;
} PRI_pages_printed_typ;

The PRI_pages_printed_typ structure has the following fields:

doc_order unsigned short. The order of printing the document.


PRI_PD_FORWARD 0
PRI_PD_BACKWARD 1

page ASE_page_number_typ (unsigned short). Specifies the page


number.

See Also
“ASE_page_number_typ” on page 173

412 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_paper_size_typ

PRI_paper_size_typ
This type specifies the paper sizes or paper tray locations that printers can
handle.

Note that specifying a size or location affects what the Printer Imaging
software does when a tray runs out of paper. If you specify a paper size,
Printer Imaging takes the paper from any tray where it finds that size of paper.
If you specify a paper tray location, Printer Imaging keeps drawing paper from
that location, and pauses if the tray is empty. If you specify DONT_CARE,
Printer Imaging goes to the next tray with the same paper size, if possible;
otherwise, the print job waits until more paper is loaded. (The page bitmap is
already laid out when Printer Imaging finds the tray empty, so it locks in
whatever page size it finds first for a Don’t Care request.)

typedef unsigned short PRI_paper_size_typ;

PRI_paper_size_typ has the following defined constants:

PRI_PS_UNKNOWN 0 Some printers will return a paper size of unknown in


PRI_printer_status_typ or PRI_printer_attr_typ, but a
client must never request a paper size of unknown.
PRI_PS_LETTER 1 8.5" x 11"
PRI_PS_LEGAL 2 8.5" x 14"
PRI_PS_B 3 11" x 17"
PRI_PS_C 4 17" x 22"
PRI_PS_D 5 22" x 34"
PRI_PS_E 6 34" x 44"
PRI_PS_A0 7 841mm x 1189mm
PRI_PS_A1 8 594mm x 841mm
PRI_PS_A2 9 420mm x 594mm
PRI_PS_A3 10 297mm x 420mm
PRI_PS_A4 11 210mm x 297mm
PRI_PS_A5 12 148mm x 210mm
PRI_PS_B4 13 257.3mm x 365.25mm
PRI_PS_B5 14 257.3mm x 182.63mm
PRI_PS_18x24 15 C+ size; 18" x 24"

December 1996 WAL for Windows Programmer’s Reference Manual 413


6 Data Types and Structures
PRI_paper_size_typ

PRI_PS_TOP 16 Top tray. A client can request PRI_PS_TOP, but this


value will never be returned in PRI_printer_status_typ
or PRI_printer_attr_typ.
PRI_PS_BOTTOM 17 Bottom tray. A client can request PRI_PS_BOTTOM,
but this value will never be returned in PRI_printer_
status_typ or PRI_printer_attr_typ.
PRI_PS_THIRD 18 Third tray. A client can request PRI_PS_THIRD, but
this value will never be returned in PRI_printer_
status_typ or PRI_printer_attr_typ.
PRI_PS_DONT_CARE 19 Use the same paper size as the last print job on the
server.
PRI_PS_HALF_LETTER 20 5.5" x 8.5"
PRI_PS_BEST_AVAIL 21 Best available
PRI_PS_10x14 22 10" x 14"
PRI_PS_DEFAULT 23 Use the default paper size configured on the server.
PRI_PS_EXECUTIVE 24 7.5" x 10.5"
PRI_MAX_PAPER_SIZE PRI_PS_DEFAULT.

414 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_position_typ

PRI_position_typ
typedef struct PRI_position_typ {
unsigned long request_id;
unsigned long priority;
unsigned long sequence_num;
unsigned long num_printing_reqs;
} PRI_position_typ;

The PRI_position_typ structure has the following fields:

request_id unsigned long. Id of the print request.

priority unsigned long.

sequence_num
unsigned long.

num_printing_reqs
unsigned long.

December 1996 WAL for Windows Programmer’s Reference Manual 415


6 Data Types and Structures
PRI_print_direction_typ

PRI_print_direction_typ
This type specifies the print direction options. These values represent the two
print directions available.

typedef bool PRI_print_direction_typ;

PRI_print_direction_typ has the following defined constants:

PRI_PD_FORWARD 0 Print document pages in ascending order.


PRI_PD_BACKWARD 1 Print document pages in descending order.
PRI_MAX_PD PRI_PD_BACKWARD

416 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_print_option_typ

PRI_print_option_typ
This structure is used in a PS_options_rec_type structure, and contains a
union of all the print options. The option_type field determines which union
member is used. Union members that are larger than four bytes are pointers,
to keep the size of the structure optimal.

typedef struct {
PRI_option_typ option_type;
union {
PRI_paper_size_typ paper_size;
PRI_priority_typ priority;
ASE_service_name_typ * printer_name_p;
FN_BOOL collate;
SCT_access_restrictions security;
unsigned short copies;
FN_time_typ print_time;
FN_BOOL staple;
FN_BOOL two_sided;
char * form_name_p;
char * note_p;
FN_BOOL annotations;
FN_BOOL request_header;
FN_BOOL doc_headers;
PRI_scaling_typ scaling;
PRI_orientation_typ orientation;
FN_BOOL overlay;
char * phone_num_p;
char * headline_p;
PRI_fax_mode_typ fax_mode;
FN_BOOL page_footnote;
FN_BOOL time_footnote;
} opt;
} PRI_print_option_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 417


6 Data Types and Structures
PRI_print_option_typ

The PRI_print_option_typ structure has the following fields:

option_type PRI_option_typ (unsigned short). Determines which of the


union’s members is used.
PRI_OPTION_PAPER_SIZE 0
PRI_OPTION_PRIORITY 1
PRI_OPTION_PRINTER_NAME 2
PRI_OPTION_COLLATE 3
PRI_OPTION_SECURITY 4
PRI_OPTION_COPIES 5
PRI_OPTION_PRINT_TIME 6
PRI_OPTION_STAPLE 7
PRI_OPTION_TWO_SIDED 8
PRI_OPTION_FORM_NAME 9
PRI_OPTION_NOTE 10
PRI_OPTION_ANNOTATIONS 11
PRI_OPTION_REQUEST_HEADER 12
PRI_OPTION_DOC_HEADERS 13
PRI_OPTION_SCALING 14
PRI_OPTION_ORIENTATION 15
PRI_OPTION_OVERLAY 16
PRI_OPTION_PHONE_NUM 17
PRI_OPTION_HEADLINE 18
PRI_OPTION_FAX_MODE 19
PRI_OPTION_PAGE_FOOTNOTE 20
PRI_OPTION_TIME_FOOTNOTE 21

paper_size PRI_paper_size_typ (unsigned short). Specifies the printer’s


paper size or tray location.
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11
PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15

418 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_print_option_typ

PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DEFAULT 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_10x14 22

priority PRI_priority_typ (unsigned short). Specifies the priority of the


print job. Priority indicates the relative importance of this print
request compared to other print jobs. Legal priority values are
0 (the lowest) through 9 (the highest). The default is the
setting in the logon file (usually 4). A priority of 0 indicates
that a job is on hold.
PRI_HOLD_PRIORITY 0
PRI_MIN_PRIORITY 0
PRI_DEFAULT_PRIORITY 4
PRI_MAX_PRIORITY 9

printer_name_p
ASE_service_name_typ (NCH_ObjectName) *. Pointer to a
three-part NCH name that specifies the printer.

Print Services assigns each print request to the first available


printer that has the attributes required to process the request
unless you specify a particular printer associated with that
Print Service using the printer_name_p field. (The exception
to this is if your support representative has printer security
enabled. In this case, the operator must always choose a
printer.)

To retrieve a list of printers for a particular Print Service,


along with information about each printer (including its
status), use IAFLIB_get_print_service_info().

collate FN_BOOL. Collation sorts printed output by copy instead of


by page when printing multiple copies of a multi-page
document. You can set collate to TRUE so that an entire copy
is printed instead of all copies of page 1, followed by all
copies of page 2, etc. (Note that printing is faster without
collation.) The default value for collate is the setting in the
logon file.

security SCT_access_restrictions. Not used.

December 1996 WAL for Windows Programmer’s Reference Manual 419


6 Data Types and Structures
PRI_print_option_typ

copies unsigned short. Specifies the number of copies to be printed.


Use the copies field to request multiple copies (up to 32,767).
If you do not specify the number of copies you want, the
default is the setting in the logon file.

print_time FN_time_typ (long). The print_time field sets the time at


which the print job goes to the printer. The default is the
current time. Note that print_time is of type FN_time_typ
(long). Use the DTM library’s functions to convert the time
you want to specify to a long integer.

staple FN_BOOL. Not currently supported.

two_sided FN_BOOL. Not currently supported.

form_name_p char *. Not used.

note_p char *. The note_p field is a pointer to a note appearing on


the request header page for a print request. The maximum
length of the note is 40 characters. Only use this if you’re
requesting a job header.

annotations FN_BOOL. You can print any notes the user has attached to
a document by setting annotations to TRUE. If TRUE, the
annotations attached to a page of a document print on a
separate page directly after the document page. The default
value for annotations is the setting in the logon file.

The document page prints with numbered squares indicating


the location of the annotations. The annotations print
sequentially on the page following the document page. If
more than one page has annotations, each page’s
annotations are printed separately. Note that the annotations
field is only valid for printing committed documents.

420 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_print_option_typ

request_header
FN_BOOL. If TRUE, prints a job header for the specified print
job. The default is the setting in the logon file.

A job header prints a cover page for all print jobs. The Printer
Imaging software lays out job headers using a template file,
header.job, located in /usr/local/sd/<print_server_station#>
(i.e., there’s one header.job file per print server). Your support
representative can modify the template file to customize the
job header.

One of the fields on the job header is a note. Use the note
field to specify the text (up to 40 characters) for this note.

doc_headers FN_BOOL. If TRUE, prints header page for each document.


The default is the setting in the logon file.

A document header prints a cover page for each document in


a print job. The Printer Imaging software lays out document
headers using a template file, header.doc, located in /usr/
local/sd/<print_server_station#> (i.e., there’s one header.doc
file per print server). Your support representative can modify
the template file to customize the document header.

The document headers print independently of request


headers. When both are specified, both types of headers are
printed. You usually use this feature when printing an array of
documents. Note that you can only print document headers
for committed documents.

scaling PRI_scaling_typ (unsigned short). Specifies the scaling


option to use for printing.
PRI_SCALE_NORMAL 0
PRI_SCALE_CLIPBOTH 1
PRI_SCALE_EXACT 2
PRI_SCALE_APPROX 3
PRI_SCALE_ORIGINAL 4
PRI_SCALE_CENTER 5
PRI_SCALE_ENHANCED_EXACT 6

December 1996 WAL for Windows Programmer’s Reference Manual 421


6 Data Types and Structures
PRI_print_option_typ

orientation PRI_orientation_typ (unsigned short). Specifies the


orientation of the document for printing.
PRI_ORIENT_DEFAULT 0
PRI_ORIENT_LANDSCAPE 1
PRI_ORIENT_PORTRAIT 2
PRI_ORIENT_NO_ROTATE 3

overlay FN_BOOL. Not used.

phone_num_p
char *. Fax option.

headline_p char *. Fax option.

fax_mode PRI_fax_mode_typ (unsigned short). Fax option. Specifies


the resolution at which the request is transmitted. It can be
one of the following values:
PRI_FM_COURSE 0
PRI_FM_FINE 1

page_footnote FN_BOOL. Fax option.

time_footnote FN_BOOL. Fax option.

See Also
“ASE_service_name_typ” on page 178

“FN_time_typ” on page 264

“PRI_fax_mode_typ” on page 407

“PRI_option_typ” on page 408

“PRI_orientation_typ” on page 410

“PRI_paper_size_typ” on page 413

“PRI_priority_typ” on page 438

“PRI_scaling_typ” on page 455

“SCT_access_restrictions” on page 481

422 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_print_option_typ2

PRI_print_option_typ2
This structure is used in a PS_options_rec_type structure and contains a
union of all print options. The option_type field determines which union
member is used. Union members that are larger than 4 bytes are pointers,
which keeps the size of the structure optimal. This structure is used by
IAFLIB_modify_print2(), IAFLIB_print_docs1(), and IAFLIB_print_files1().

typedef struct {
PRI_option_typ option_type;
union {
PRI_paper_size_typ paper_size;
PRI_priority_typ priority;
ASE_service_name_typ * printer_name_p;
FN_BOOL collate;
SCT_access_restrictions security;
unsigned short copies;
FN_time_typ print_time;
FN_BOOL staple;
FN_BOOL two_sided;
char form_name_p[PRI_MAX_FORM_NAME_LEN + 1];
char note_p[PRI_MAX_NOTE_LEN + 1];
FN_BOOL annotations;
FN_BOOL request_header;
FN_BOOL doc_headers;
PRI_scaling_typ scaling;
PRI_orientation_typ orientation;
FN_BOOL overlay;
char phone_num_p[PRI_MAX_PHONE_NUM_LEN + 1];
char phone_ext_p[PRI_MAX_PHONE_EXT_LEN + 1];
char headline_p[PRI_MAX_HEADLINE_LEN + 1];
char memo_p[PRI_MAX_MEMO_LEN + 1];
PRI_fax_mode_typ fax_mode;
FN_BOOL page_footnote;
FN_BOOL time_footnote;
PRI_eject_tray_typ eject_tray;
ASE_doc_id_typ cover_doc;
ASE_ssn_typ ssn;
} opt;
} PRI_print_option_typ2;

December 1996 WAL for Windows Programmer’s Reference Manual 423


6 Data Types and Structures
PRI_print_option_typ2

The PRI_print_option_typ2 structure has the following fields:

option_type PRI_option_typ (unsigned short). Determines which of the


union’s members is used.
PRI_OPTION_PAPER_SIZE 0
PRI_OPTION_PRIORITY 1
PRI_OPTION_PRINTER_NAME 2
PRI_OPTION_COLLATE 3
PRI_OPTION_SECURITY 4
PRI_OPTION_COPIES 5
PRI_OPTION_PRINT_TIME 6
PRI_OPTION_STAPLE 7
PRI_OPTION_TWO_SIDED 8
PRI_OPTION_FORM_NAME 9
PRI_OPTION_NOTE 10
PRI_OPTION_ANNOTATIONS 11
PRI_OPTION_REQUEST_HEADER 12
PRI_OPTION_DOC_HEADERS 13
PRI_OPTION_SCALING 14
PRI_OPTION_ORIENTATION 15
PRI_OPTION_OVERLAY 16
PRI_OPTION_PHONE_NUM 17
PRI_OPTION_HEADLINE 18
PRI_OPTION_FAX_MODE 19
PRI_OPTION_PAGE_FOOTNOTE 20
PRI_OPTION_TIME_FOOTNOTE 21
PRI_OPTION_EJECT_TRAY 22
PRI_OPTION_PHONE_EXT 23
PRI_OPTION_MEMO 24
PRI_OPTION_COVER_DOC 25

paper_size PRI_paper_size_typ (unsigned short). Specifies the printer’s


paper size or tray location.
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11

424 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_print_option_typ2

PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15
PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DONT_CARE 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_10x14 22
PRI_PS_DEFAULT 23
PRI_PS_EXECUTIVE 24

priority PRI_priority_typ (unsigned short). Specifies the priority of the


print job. Priority indicates the relative importance of this print
request compared to other print jobs. Valid priority values are
0 (the lowest) through 9 (the highest). The default is the
setting in the logon file (usually 4). A priority of 0 indicates
that a job is on hold.
PRI_HOLD_PRIORITY 0
PRI_MIN_PRIORITY 0
PRI_DEFAULT_PRIORITY 4
PRI_MIN_PRIORITY_NO_HOLD 1
PRI_MAX_PRIORITY 9

printer_name_p
ASE_service_name_typ (NCH_ObjectName) *. The printer_
name_p field is a pointer to a three-part NCH name that
specifies the printer you want to use.

Print Services assigns each print request to the first available


printer that has the attributes required to process the request
unless you specify a particular printer associated with that
Print Service using the printer_name_p field. (The exception
to this is if your support representative has printer security
enabled. In this case, the operator must always choose a
printer.)

To retrieve a list of printers for a particular Print Service,


along with information about each printer (including its
status), use IAFLIB_get_print_service_info() or IAFLIB_get_
print_service_into1().

December 1996 WAL for Windows Programmer’s Reference Manual 425


6 Data Types and Structures
PRI_print_option_typ2

collate FN_BOOL. Collation sorts printed output by copy instead of


by page when printing multiple copies of a multi-page
document. You can set collate to TRUE so that an entire copy
is printed instead of all copies of page 1, followed by all
copies of page 2, etc. (Note that printing is faster without
collation.) The default value for collate is the setting in the
LOGON.CFG file.

security SCT_access_restrictions. Not currently supported.

copies unsigned short. Specifies the number of copies to be printed.


Use the copies field to request multiple copies (up to 32,767).
If you do not specify the number of copies you want, the
default is the setting in the LOGON.CFG file.

print_time FN_time_typ (long). The print_time field sets the time at


which the print job goes to the printer. The default is the
current time. Note that print_time is of type FN_time_typ
(long). Use the DTM library’s functions to convert the time
you want to specify to a long integer.

staple FN_BOOL. Not currently supported.

two_sided FN_BOOL. Not currently supported.

form_name_p char. Not used. If you specify this option, the corresponding
argument is ignored.

note_p char. The note_p field is a pointer to a note appearing on the


request header page for a print request. The maximum length
of the note is 40 characters. Use this only if you’re requesting
a job header.

annotations FN_BOOL. You can print any notes the user attached to a
document by setting annotations to TRUE. If TRUE, the
annotations attached to a page of a document print on a
separate page directly after the document page. The default
value for annotations is the setting in the LOGON.CFG file.

The document page prints with numbered squares that


indicate the location of the annotations. The annotations print
sequentially on the page following the document page. If
more than one page has annotations, each page’s
annotations are printed separately. Note that the annotations
field is valid for printing only committed documents.

426 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_print_option_typ2

request_header
FN_BOOL. If TRUE, prints a job header for the specified print
job. The default is the setting in the LOGON.CFG file.

A job header prints a cover page for all print jobs. The Printer
Imaging software lays out job headers using a template file,
header.job, located in /usr/local/sd/<print_server_station#>
(i.e., there’s one header.job file per print server). Your support
representative can modify the template file to customize the
job header.

One of the fields on the job header is a note. Use the note
field to specify the text (up to 40 characters) for this note.

doc_headers FN_BOOL. If TRUE, prints a header page for each


document. The default is the setting in the logon file.

A document header prints a cover page for each document in


a print job. The Printer Imaging software lays out document
headers using a template file, header.doc, located in /usr/
local/sd/<print_server_station#> (i.e., there’s one header.doc
file per print server). Your support representative can modify
the template file to customize the document header.

The document headers print independently of request


headers. When both are specified, both types of headers are
printed. You usually use this feature when printing an array of
documents. Note that you can only print document headers
for committed documents.

scaling PRI_scaling_typ (unsigned short). Specifies the scaling


option to use for printing.
PRI_SCALE_NORMAL 0
PRI_SCALE_CLIPBOTH 1
PRI_SCALE_EXACT 2
PRI_SCALE_APPROX 3
PRI_SCALE_ORIGINAL 4
PRI_SCALE_CENTER 5
PRI_SCALE_ENHANCED_EXACT 6

December 1996 WAL for Windows Programmer’s Reference Manual 427


6 Data Types and Structures
PRI_print_option_typ2

orientation PRI_orientation_typ (unsigned short). Specifies the


orientation of the document for printing.
PRI_ORIENT_DEFAULT 0
PRI_ORIENT_LANDSCAPE 1
PRI_ORIENT_PORTRAIT 2
PRI_ORIENT_NO_ROTATE 3

overlay FN_BOOL. Not used.

phone_num_p char. Fax phone number.

phone_ext char. Fax phone extension.

headline_p char. Head line message for fax.

memo_p char. Memo for fax.

fax_mode PRI_fax_mode_typ (unsigned short). Fax option. Specifies


the resolution at which the request is transmitted. It can be
one of the following values:
PRI_FM_COARSE 0
PRI_FM_FINE 1

page_footnote FN_BOOL. If true, page footnote will be printed.

time_footnote FN_BOOL. If true, time footnote will be printed.

eject_tray PRI_eject_tray_typ. The printer eject tray.


PRI_DEFAULT_EJECT_TRAY 0
PRI_ET_DEFAULT 0
PRI_ET_UPPER 1
PRI_ET_UPPER_OFFSET 2
PRI_ET_LOWER 3
PRI_ET_LOWER_OFFSET 4
PRI_ET_SIDE 5
PRI_ET_BIN1 6
PRI_ET_BIN2 7
PRI_ET_BIN3 8
PRI_ET_BIN4 9
PRI_ET_BIN5 10
PRI_ET_BIN6 11
PRI_ET_BIN7 12
PRI_ET_BIN8 13
PRI_ET_BIN9 14
PRI_ET_BIN10 15

428 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_print_option_typ2

cover_doc ASE_doc_id_typ. Document ID number in the range 100,000


to 3,999,999,999.

ssn ASE_ssn_typ. System serial number in the range 10,000 to


4,294,967,295.

See Also
“ASE_doc_id_typ” on page 164

“ASE_service_name_typ” on page 178

“ASE_ssn_typ” on page 180

“FN_time_typ” on page 264

“PRI_eject_tray_typ” on page 406

“PRI_fax_mode_typ” on page 407

“PRI_option_typ” on page 408

“PRI_orientation_typ” on page 410

“PRI_paper_size_typ” on page 413

“PRI_priority_typ” on page 438

“PRI_scaling_typ” on page 455

“SCT_access_restrictions” on page 481

December 1996 WAL for Windows Programmer’s Reference Manual 429


6 Data Types and Structures
PRI_printer_attr_typ

PRI_printer_attr_typ
This structure describes the capabilities of a specified printer.

typedef struct PRI_printer_attr {


ASE_service_name_typ name;
PRI_printer_type_typ printer_type;
ASE_service_name_typ security;
unsigned short pages_per_min;
FN_BOOL two_sided;
FN_BOOL staple;
unsigned short trays;
unsigned short num_paper_sizes;
PRI_paper_size_typ * paper_sizes;
} PRI_printer_attr_typ;

The PRI_printer_attr_typ structure has the following fields:

name ASE_service_name_typ (NCH_ObjectName). Name of


printer server.

printer_type PRI_printer_type_typ (unsigned short). Can have one of the


following values:
PRI_PT_UNKNOWN 0
PRI_PT_PRINTER 1
PRI_PT_FAX 2

security ASE_service_name_typ (NCH_ObjectName). Security


needed to print on this printer.

pages_per_min
unsigned short. Speed of this printer.

two_sided bool. True if printer can duplex (print on both sides of the
paper).

staple bool. True if printer can staple.

trays unsigned short. The number of paper trays on this printer: 1,


2, or 3.

num_paper_sizes
unsigned short. Length of paper_sizes array.

430 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_printer_attr_typ

paper_sizes PRI_paper_size_typ (unsigned short) *. Pointer to array of


paper sizes supported.
PRI_PS_UNKNOWN 0
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11
PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15
PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DEFAULT 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_10x14 22

See Also
“ASE_service_name_typ” on page 178

“PRI_paper_size_typ” on page 413

“PRI_printer_type_typ” on page 437

December 1996 WAL for Windows Programmer’s Reference Manual 431


6 Data Types and Structures
PRI_printer_attr_typ2

PRI_printer_attr_typ2
This structure describes the capabilities of a specified printer.

typedef struct PRI_printer_attr_typ2 {


struct PRI_printer_attr_typ2 * next_p;
ASE_service_name_typ name;
PRI_printer_type_typ printer_type;
ASE_service_name_typ security;
unsigned short pages_per_min;
FN_BOOL two_sided;
FN_BOOL staple;
unsigned short trays;
unsigned short num_paper_sizes;
PRI_paper_size_typ * paper_sizes;
unsigned short num_eject_trays;
PRI_eject_tray_typ * eject_trays;
unsigned short num_fax_modes;
PRI_fax_mode_typ * fax_modes;
} PRI_printer_attr_typ2;

next_p struct PRI_printer_attr_typ2 *. Pointer to the next structure in


the list.

name ASE_service_name_typ. The name of the printer server.

printer_type PRI_printer_type_typ. The printer type.

security ASE_service_name_typ. Security needed to print on this


printer.

pages_per_min
unsigned short. Speed of the printer.

two_sided FN_BOOL. True if the printer is a duplex printer.

staple FN_BOOL. True if the printer can staple.

trays unsigned short. The number of trays on this printer: 1, 2, or 3.

num_paper_sizes
unsigned short. Number of items in paper_sizes.

paper_sizes PRI_paper_size_typ *. Pointer to an array of paper sizes


supported by the printer.

432 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_printer_attr_typ2

num_eject_trays
unsigned short. Number of items in eject_trays.

eject_trays PRI_eject_tray_typ *. Pointer to an array of eject trays that


are available on the printer.

num_fax_modes
unsigned short. Number of items in fax_modes.

fax_modes PRI_fax_mode_typ *. Pointer to an array of fax modes


available.

See Also
“ASE_service_name_typ” on page 178

“PRI_eject_tray_typ” on page 406

“PRI_fax_mode_typ” on page 407

“PRI_paper_size_typ” on page 413

“PRI_printer_type_typ” on page 437

December 1996 WAL for Windows Programmer’s Reference Manual 433


6 Data Types and Structures
PRI_printer_op_status_typ

PRI_printer_op_status_typ
This type specifies the operational status of a printer. PRI_get_service_
status() returns the status.

typedef unsigned short PRI_printer_op_status_typ;

PRI_printer_op_status_typ has the following defined constants:

PRI_POS_UNKNOWN 0 Not known.


PRI_POS_DISABLED 1 Printer has been manually suspended.
PRI_POS_AVAILABLE 2 Printer is available and ready.
PRI_POS_NEEDS_ATTN 3 Printer needs paper or toner.
PRI_POS_NEEDS_SVC 4 Hardware malfunction.
PRI_MAX_OP_STATUS PRI_POS_NEEDS_SVC

434 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_printer_status_typ

PRI_printer_status_typ
This structure represents the status of a printer. The structure has a *next
pointer to build a linked list of PRI_printer_statuses, one for each physical
printer controlled by the service.

typedef struct PRI_printer_status {


ASE_service_name_typ name;
PRI_printer_op_status_typ oper_status;
FN_BOOL print_direction;
unsigned short requests_queued;
unsigned short pages_queued;
unsigned short num_paper_sizes;
PRI_paper_size_typ * paper_sizes;
} PRI_printer_status_typ;

The PRI_request_desc_typ structure has the following fields:

magic unsigned short. Magic number.

name ASE_service_name_typ (NCH_ObjectName). Print server’s


name.

oper_status PRI_printer_op_status_typ (unsigned short). The printer’s


operational status. Can be:
PRI_POS_UNKNOWN 0
PRI_POS_DISABLED 1
PRI_POS_AVAILABLE 2
PRI_POS_NEEDS_ATTN 3
PRI_POS_NEEDS_SVC 4

print_direction FN_BOOL. PRI_PD_FORWARD (0) or PRI_PD_


BACKWARD (1).

requests_queued
unsigned short. The requests queued for this print server
only. For the entire service, see “PRI_service_status_typ” on
page 457.

pages_queued
unsigned short. Pages assigned to this print server only.

num_paper_sizes
unsigned short. Number of items in paper_sizes array.

December 1996 WAL for Windows Programmer’s Reference Manual 435


6 Data Types and Structures
PRI_printer_status_typ

paper_sizes PRI_paper_size_typ (unsigned short) *. Pointer to an array of


paper sizes currently loaded on the printer. For this printer’s
paper_size capabilities, see “PRI_printer_attr_typ” on
page 430.
PRI_PS_UNKNOWN 0
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11
PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15
PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DEFAULT 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_10x14 22

See Also
“ASE_service_name_typ” on page 178

“PRI_paper_size_typ” on page 413

“PRI_printer_op_status_typ” on page 434

436 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_printer_type_typ

PRI_printer_type_typ
This type specifies the type of a device.

typedef unsigned short PRI_printer_type_typ;

PRI_printer_type_typ has the following defined constants:

PRI_PT_UNKNOWN 0 Device type is unknown.


PRI_PT_PRINTER 1 Device is a printer.
PRI_PT_FAX 2 Device is a facsimile machine.
PRI_MAX_PT PRI_PT_FAX

December 1996 WAL for Windows Programmer’s Reference Manual 437


6 Data Types and Structures
PRI_priority_typ

PRI_priority_typ
This type specifies the priority given to requests if no other priority is
specified.

typedef unsigned short PRI_priority_typ;

PRI_priority_typ has the following defined constants:

PRI_HOLD_PRIORITY 0 To hold the print request. Requests will not be printed


unless priority is greater than or equal to 1.
PRI_MIN_PRIORITY 0 Print request will be held.
PRI_DEFAULT_PRIORITY 4 Request will be printed in FIFO order (first in first out).
Note, the priority will override the FIFO order.
PRI_MIN_PRIORITY_NO_HOLD 1 Minimum priority without holding print request.
PRI_MAX_PRIORITY 9 The highest priority.

438 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_desc_typ

PRI_request_desc_typ
This structure describes the publicly-visible attributes of a print request.
IAFLIB_get_print_queues() returns an array of these structures.

typedef struct {
ASE_request_id_typ request_id;
FN_time_typ submit_time;
PRI_request_status_typ request_status;
FN_BOOL fax_request;
PRI_request_type_typ request_type;
union {
unsigned long pages;
unsigned long bytes;
} length;
FN_time_typ done_time;
FN_time_typ print_time;
PRI_priority_typ priority;
PRI_paper_size_typ paper_size;
unsigned short copies;
FN_BOOL collate;
FN_BOOL staple;
FN_BOOL two_sided;
FN_BOOL annotate;
FN_BOOL req_header;
FN_BOOL doc_headers;
PRI_scaling_typ scaling;
PRI_orientation_typ orientation;
PRI_fax_mode_typ fax_mode;
FN_BOOL page_footnote;
FN_BOOL time_footnote;
ASE_service_name_typ printer;
ASE_service_name_typ user;
char form_name[32];
char note[42];
char phone_num[40];
char headline[98];
} PRI_request_desc_typ;

The PRI_request_desc_typ structure has the following fields:

request_id ASE_request_id_typ (unsigned long). ID of the print job.

submit_time FN_time_typ (long). Time the print job was submitted.

December 1996 WAL for Windows Programmer’s Reference Manual 439


6 Data Types and Structures
PRI_request_desc_typ

request_status
PRI_request_status_typ (unsigned short)
PRI_RS_UNKNOWN 0
PRI_RS_QUEUED 1
PRI_RS_PRINTING 2
PRI_RS_COMPLETE 3
PRI_RS_FAILED 4
PRI_RS_CANCELLED 5
PRI_RS_WAITING 6
PRI_RS_FETCHING 7
PRI_RS_SUSPENDED 8

fax_request FN_BOOL. If TRUE, request will be sent to fax machine;


otherwise, it is sent to the printer.

request_type PRI_request_type_typ (unsigned short). PRI_RT_DATA0


PRI_RT_DOC 1

pages unsigned long. Number of pages.

bytes unsigned long.

done_time FN_time_typ (long). The time the print job finished.

print_time FN_time_typ (long). The time the print job started.

priority PRI_priority_typ (unsigned short).


PRI_HOLD_PRIORITY 0
PRI_MIN_PRIORITY 0
PRI_DEFAULT_PRIORITY 4
PRI_MAX_PRIORITY 9

paper_size PRI_paper_size_typ (unsigned short).


PRI_PS_UNKNOWN 0
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11

440 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_desc_typ

PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15
PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DONT_CARE 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_DEFAULT 23
PRI_PS_MAX_PAPER_SIZE 23

copies unsigned short. Number of copies.

collate FN_BOOL. Collate the pages.

staple FN_BOOL. Staple the pages.

two-sided FN_BOOL. Print pages using both side.

annotate FN_BOOL. If TRUE, annotations will be printed.

req_header FN_BOOL. If TRUE, header page will be printed per each


request.

doc_headers FN_BOOL. If TRUE, header page will be printed per each


document.

scaling PRI_scaling_typ (unsigned short). Can be one of the


following:
PRI_SCALE_NORMAL 0
PRI_SCALE_CLIPBOTH 1
PRI_SCALE_EXACT 2
PRI_SCALE_APPROX 3
PRI_SCALE_ORIGINAL 4
PRI_SCALE_CENTER 5
PRI_SCALE_ENHANCED_EXACT 6

December 1996 WAL for Windows Programmer’s Reference Manual 441


6 Data Types and Structures
PRI_request_desc_typ

orientation PRI_orientation_typ (unsigned short). Can be one of the


following:
PRI_ORIENT_DEFAULT 0
PRI_ORIENT_LANDSCAPE 1
PRI_ORIENT_PORTRAIT 2
PRI_ORIENT_NO_ROTATE 3

fax_mode PRI_fax_mode_typ (unsigned short). Fax option. Specifies


the resolution at which the request is transmitted. It can be
one of the following:
PRI_FM_COURSE 0
PRI_FM_FINE 1

page_footnote
FN_BOOL. If TRUE, page footnote will be printed.

time_footnote FN_BOOL. If TRUE, time footnote will be printed.

printer ASE_service_name_typ (NCH_ObjectName). Specifies a


printer. Can be NULL for default.

user ASE_service_name_typ (NCH_ObjectName). User’s name.

form_name char. Form name (if it is a form).

note char. One line message.

phone_num char. Phone number for fax.

headline char. Head line message for fax.

See Also
“ASE_request_id_typ” on page 176

“ASE_service_name_typ” on page 178

“FN_time_typ” on page 264

“PRI_fax_mode_typ” on page 407

“PRI_orientation_typ” on page 410

“PRI_paper_size_typ” on page 413

“PRI_priority_typ” on page 438

442 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_desc_typ

“PRI_request_status_typ” on page 452

“PRI_request_type_typ” on page 454

“PRI_scaling_typ” on page 455

December 1996 WAL for Windows Programmer’s Reference Manual 443


6 Data Types and Structures
PRI_request_desc_typ2

PRI_request_desc_typ2
This structure describes the publicly-visible attributes of a print request.
IAFLIB_get_print_queues2() and IAFLIB_get_print_service_info1() return an
array of these structures.

typedef struct PRI_request_desc_typ2 {


struct PRI_request_desc_typ2 * next_p;
ASE_request_id_typ request_id;
FN_time_typ submit_time;
PRI_request_status_typ request_status;
FN_BOOL fax_request;
PRI_request_type_typ request_type;
union {
unsigned long pages;
unsigned long bytes;
} length;
FN_time_typ done_time;
FN_time_typ print_time;
PRI_priority_typ priority;
PRI_paper_size_typ paper_size;
unsigned short copies;
FN_BOOL collate;
FN_BOOL staple;
FN_BOOL two_sided;
FN_BOOL annotate;
FN_BOOL req_header;
FN_BOOL doc_headers;
PRI_scaling_typ scaling;
PRI_orientation_typ orientation;
PRI_fax_mode_typ fax_mode;
FN_BOOL page_footnote;
FN_BOOL time_footnote;
ASE_service_name_typ printer;
ASE_service_name_typ user;
char form_name [PRI_MAX_FORM_NAME_LEN + 1];
char note[PRI_MAX_NOTE_LEN + 1];
char phone_num [PRI_MAX_PHONE_NUM_LEN + 1];
char headline[PRI_MAX_HEADLINE_LEN + 1];
char phone_ext [PRI_MAX_PHONE_EXT_LEN + 1];
char memo[PRI_MAX_MEMO_LEN + 1];
PRI_eject_tray_typ eject_tray;
PRI_overlay_typ overlay;
SCT_access_restrictions security;

444 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_desc_typ2

PRI_sub_status_typ sub_status;
ASE_doc_id_typ cover_doc;
ASE_ssn_typ cover_ssn;
unsigned short num_docs;
PRI_doc_specifier_typ * doc_array;
} PRI_request_desc_typ2;

The PRI_request_desc_typ2 structure has the following fields:

request_id ASE_request_id_typ (unsigned long). The print job ID.

submit_time FN_time_typ (long). The time the print job was submitted.

request_status
PRI_request_status_typ (unsigned short).
PRI_RS_UNKNOWN 0
PRI_RS_QUEUED 1
PRI_RS_PRINTING 2
PRI_RS_COMPLETE 3
PRI_RS_FAILED 4
PRI_RS_CANCELLED 5
PRI_RS_WAITING 6
PRI_RS_FETCHING 7
PRI_RS_SUSPENDED 8

fax_request FN_BOOL. If TRUE, the request is sent to a fax machine;


otherwise, the request is sent to the printer.

request_type PRI_request_type_typ (unsigned short).


PRI_RT_DATA 0
PRI_RT_DOC 1

pages unsigned long. Number of pages.

done_time FN_time_typ (long). The time the print job finished.

print_time FN_time_typ (long). The time the print job started.

priority PRI_priority_typ (unsigned short).


PRI_HOLD_PRIORITY 0
PRI_MIN_PRIORITY 0
PRI_DEFAULT_PRIORITY 4
PRI_MIN_PRIORITY_NO_HOLD 1
PRI_MAX_PRIORITY 9

December 1996 WAL for Windows Programmer’s Reference Manual 445


6 Data Types and Structures
PRI_request_desc_typ2

paper_size PRI_paper_size_typ (unsigned short).


PRI_PS_UNKNOWN 0
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11
PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15
PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DONT_CARE 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_10x14 22
PRI_PS_DEFAULT 23
PRI_PS_EXECUTIVE 24

copies unsigned short. Number of copies.

collate FN_BOOL. Collate the pages (if supported by the printer).

staple FN_BOOL. Staple the pages (if supported by the printer).

two-sided FN_BOOL. Print pages using both sides of the paper (if
supported by the printer).

annotate FN_BOOL. If TRUE, annotations will be printed.

req_header FN_BOOL. If TRUE, header page will be printed per each


request.

doc_headers FN_BOOL. If TRUE, header page will be printed per each


document.

446 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_desc_typ2

scaling PRI_scaling_typ (unsigned short).


PRI_SCALE_NORMAL 0
PRI_SCALE_CLIPBOTH 1
PRI_SCALE_EXACT 2
PRI_SCALE_APPROX 3
PRI_SCALE_ORIGINAL 4
PRI_SCALE_CENTER 5
PRI_SCALE_ENHANCED_EXACT 6

orientation PRI_orientation_typ (unsigned short).


PRI_ORIENT_DEFAULT 0
PRI_ORIENT_LANDSCAPE 1
PRI_ORIENT_PORTRAIT 2
PRI_ORIENT_NO_ROTATE 3

fax_mode PRI_fax_mode_typ (unsigned short). Fax option. Specifies


the resolution at which the request is transmitted. It can be
one of the following values:
PRI_FM_COARSE 0
PRI_FM_FINE 1

page_footnote
FN_BOOL. If TRUE, page footnote will be printed.

time_footnote FN_BOOL. If TRUE, time footnote will be printed.

printer ASE_service_name_typ (NCH_ObjectName). Specifies a


printer. Can be NULL for default.

user ASE_service_name_typ (NCH_ObjectName). User’s name.

form_name char. Form name (if it is a form).

note char. One line of message.

phone_num char. Phone number for fax.

headline char. Head line message for fax.

phone_ext char. Phone extension for fax.

memo char. Memo for fax.

December 1996 WAL for Windows Programmer’s Reference Manual 447


6 Data Types and Structures
PRI_request_desc_typ2

eject_tray PRI_eject_tray_typ. Specifies the eject tray for the printer.


Can have one of the following values:
PRI_DEFAULT_EJECT_TRAY 0
PRI_ET_DEFAULT 0
PRI_ET_UPPER 1
PRI_ET_UPPER_OFFSET 2
PRI_ET_LOWER 3
PRI_ET_LOWER_OFFSET 4
PRI_ET_SIDE 5
PRI_ET_BIN1 6
PRI_ET_BIN2 7
PRI_ET_BIN3 8
PRI_ET_BIN4 9
PRI_ET_BIN5 10
PRI_ET_BIN6 11
PRI_ET_BIN7 12
PRI_ET_BIN8 13
PRI_ET_BIN9 14
PRI_ET_BIN10 15

overlay PRI_overlay_typ. Indicates whether or not there is an overlay:


PRI_NO_OVERLAY 0
PRI_ONE_OVERLAY 1
PRI_MULTI_OVERLAY 2

PRI_ONE_OVERLAY means that only the first page has an


overlay. PRI_MULTI_OVERLAY means that all pages have an
overlay.

security SCT_access_restrictions. Not currently supported.

sub_status PRI_sub_status_typ. Provides additional status information


about the print job (with IMS 3.3.1 or later only). sub_
status.sub_status_prg can have the following values:
PRI_SUBSTATUS_UNINITIALIZED 0
PRI_SUBSTATUS_WAITING_CONV 1
PRI_SUBSTATUS_CONVERSION 2
PRI_SUBSTATUS_SPOOLING 3
PRI_SUBSTATUS_TRANSMIT 4
PRI_SUBSTATUS_RETRY 5
PRI_SUBSTATUS_PRINTING 6

cover_doc ASE_doc_id_typ. Document ID number in the range 100,000


to 3,999,999,999.

448 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_desc_typ2

cover_ssn ASE_ssn_typ. System serial number in the range 10,000 to


4,294,967,295.

num_docs unsigned short. Specifies the number of documents in print


job (number of documents in doc_array).

doc_array PRI_doc_specifier_typ *. List of documents to be printed.

See Also
“ASE_doc_id_typ” on page 164

“ASE_request_id_typ” on page 176

“ASE_service_name_typ” on page 178

“ASE_ssn_typ” on page 180

“FN_time_typ” on page 264

“PRI_doc_specifier_typ” on page 404

“PRI_eject_tray_typ” on page 406

“PRI_fax_mode_typ” on page 407

“PRI_orientation_typ” on page 410

“PRI_overlay_typ” on page 411

“PRI_paper_size_typ” on page 413

“PRI_priority_typ” on page 438

“PRI_request_status_typ” on page 452

“PRI_request_type_typ” on page 454

“PRI_scaling_typ” on page 455

“PRI_sub_status_typ” on page 459

“SCT_access_restrictions” on page 481

December 1996 WAL for Windows Programmer’s Reference Manual 449


6 Data Types and Structures
PRI_request_filter_typ

PRI_request_filter_typ
This structure defines a filter condition for IAFLIB_get_print_queues(). This
filter makes the following choices about displaying requests:

• All requests that have an ID greater than the ID of the first request

• Only requests that have specified criteria

typedef struct {
ASE_service_name_typ user;
unsigned short queue_type;
PRI_priority_typ priority;
PRI_request_status_typ request_status;
ASE_service_name_typ printer;
ASE_request_id_typ request_id;
} PRI_request_filter_typ;

The PRI_request_filter_typ structure has the following fields:

user ASE_service_name_typ (NCH_ObjectName). Filters for this


user only (i.e., only the requests for this user are displayed).
The default is to display requests for all users. (You can
obtain the user name using IAFLIB_get_user_name().)

queue_type unsigned short. Specifies which types of requests to display:


0 - Display all requests (default)
1 - Only display print requests
2 - Only display fax requests

priority PRI_priority_typ (unsigned short). Filter for the priority (0 for


hold, 1 through 10). The default is the setting in the
LOGON.CFG file (usually 4).

450 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_filter_typ

request_status
PRI_request_status_typ (unsigned short). Filter for the
request status. The default is PRI_RS_UNKNOWN. Can be
one of the following:
PRI_RS_UNKNOWN 0
PRI_RS_QUEUES 1
PRI_RS_PRINTING 2
PRI_RS_COMPLETE 3
PRI_RS_FAILED 4
PRI_RS_CANCELLED 5
PRI_RS_WAITING 6
PRI_RS_FETCHING 7
PRI_RS_SUSPENDED 8

printer ASE_service_name_typ (NCH_ObjectName). Filter for this


printer/fax device.

request_id ASE_request_id_typ. ID of the print job.

See Also
“ASE_request_id_typ” on page 176

“ASE_service_name_typ” on page 178

“PRI_priority_typ” on page 438

“PRI_request_status_typ” on page 452

December 1996 WAL for Windows Programmer’s Reference Manual 451


6 Data Types and Structures
PRI_request_status_typ

PRI_request_status_typ
This type provides information on the current status of a print request. The
last two are internal only, and mapped into PRI_RS_QUEUED for clients.

typedef unsigned short PRI_request_status_typ;

PRI_request_status_typ has the following defined constants:

PRI_RS_UNKNOWN 0 A status of unknown means that the request is not one of the other
statuses listed above. (This might occur if the status variable has
garbage in it, such as when it has not been set.)
PRI_RS_QUEUED 1 An initiated print request is given a queued status. A delayed
request is given the status queued by Print Services when Print
Services determines that it is time to submit the request for further
processing.
PRI_RS_PRINTING 2 Just prior to printing the first page of a request, Print Services
marks the request as printing.
PRI_RS_COMPLETE 3 When the last page of a request is printed, Print Services marks
the request as complete. Requests marked as complete remain in
the database for 1 minute.
PRI_RS_FAILED 4 If the request cannot be completed and Print Services encounters
an error, the Print Services process that encounters the error is
responsible for changing the status to failed.
If the print cache is full (or if other problems exist), Print Services
does not immediately mark a job in progress as failed. It retries
once every 15 seconds up to a pre-specified time limit to copy or
migrate the document into the cache. If there is still no room in the
cache, the job is marked as failed.
Without user intervention, failed requests remain in the database
forever.
PRI_RS_CANCELLED 5 If the user cancels a print request, then Print Services marks the
request as cancelled. A cancelled job stays in the database (and
the queue) for ten minutes. (This gives the user time to restart a
job cancelled in error.)

452 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_request_status_typ

PRI_RS_WAITING 6 If you modify a printer name for a print request, Print Services
gives the request a status of waiting until it reissues the request
to the new printer. Also, if a print request was initiated as a
delayed request, it is given the status waiting. (As mentioned
above, a request has a queued status when Print Services
determines that it is time to submit the request for further
processing.)
PRI_RS_FETCHING 7 Requests that are being processed have their status changed
from queued to fetching just prior to migrating the first page of the
document from Document Services. (If Print Services receives a
request to print a document and the optical disk that contains the
document is not in the OSAR, the request’s status is fetching.)
PRI_RS_SUSPENDED 8 The same processing as a cancelled request occurs if the request
is suspended (by giving it a priority of 0) except Print Services
marks the request as suspended instead of cancelled. If you
suspend a print document request, Print Services deletes the
object related to it from the print cache except for print requests
that are reports, screens, or windows because the original copy of
these resides only in the print cache.
PRI_MAX_REQ_STATUS PRI_RS_SUSPENDED

December 1996 WAL for Windows Programmer’s Reference Manual 453


6 Data Types and Structures
PRI_request_type_typ

PRI_request_type_typ
This type specifies the two types of print requests supported by Print
Services: document print requests and data (ASCII) print requests. The type
values are only valid for the request_type field of the PRI_request_desc_typ.

typedef unsigned short PRI_request_type_typ;

PRI_request_type_typ has the following defined constants:

PRI_RT_DATA 0 To print ASCII data (e.g. DOS text files).


PRI_RT_DOC 1 To print FileNet images.
PRI_MAX_REQ_TYPE PRI_RT_DOC

454 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_scaling_typ

PRI_scaling_typ
This type specifies the values for scaling print options.

typedef unsigned short PRI_scaling_typ;

PRI_scaling_typ has the following defined constants:

PRI_SCALE_NORMAL 0 This is the default scaling option. The Printer Imaging (PI)
software on the FileNet system repetitively performs gross
scaling until the vertical dimension of the image is
approximately equal to the vertical dimension of the paper. If
this causes the horizontal dimension to grow too large, the
right margin is clipped a configured amount. This option does
not preserve the aspect ratio. However, this is very fast and
preserves data on the bottom of the image (where clipping
seems to be most objectionable).
PRI_SCALE_CLIPBOTH 1 The PI software repetitively performs gross scaling until the
image size is approximately equal to the paper size. If the
scaled image is larger than the paper, the right and bottom
margins is clipped a configured amount. The aspect ratio is
preserved.
PRI_SCALE_EXACT 2 The image is scaled to fit the paper as closely as possible
without losing any data. Despite the use of “exact” in the
name, this option does not guarantee to fit even one edge
precisely. This is the slowest scaling operation.
PRI_SCALE_APPROX 3 The PI software repetitively performs gross scaling until the
image size occupies as much of the paper size as possible
without clipping data. If the image exceeds the paper size, the
image is scaled down by an entire 2x. Successive 2x
reductions are performed until the image fits. The aspect ratio
is preserved.
PRI_SCALE_ORIGINAL 4 This option causes no change in size. Note, however, that
whenever you specify Original size, the PI software ignores
any requested paper size. Instead, the paper size for each
printed page is determined by Printer Imaging as the smallest
paper on which the image can be placed without clipping the
image. Since most scanners collect data edge-to-edge but
most printers cannot print edge-to-edge, this option usually
causes PI to request a larger paper size than was originally
scanned.

December 1996 WAL for Windows Programmer’s Reference Manual 455


6 Data Types and Structures
PRI_scaling_typ

PRI_SCALE_CENTER 5 Do not use this scaling option as it can overwrite important


configuration information. It is for the Printer Imaging software
only.
PRI_SCALE_ENHANCED_EXACT 6 This option keeps the size within 5% of the original size; this
is an improvement over PRI_SCALE_EXACT, which can
reduce the size of the printed image considerably. However,
this scaling option can be very slow.
PRI_MAX_SCALE PRI_SCALE_ENHANCED_EXACT

456 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_service_status_typ

PRI_service_status_typ
This structure is the basis for the service status. Its major component is the
head of a linked list of PRI_printer_statuses (see “PRI_printer_status_typ” on
page 435).

typedef struct {
unsigned short requests_queued;
unsigned short num_printers;
PRI_printer_status_typ* printer_statuses;
} PRI_service_status_typ;

The PRI_service_status_typ structure has the following fields:

requests_queued
unsigned short. The total number of print requests pending
for this service.

num_printers unsigned short. The length of the printer_statuses array.

printer_statuses
PRI_printer_status_typ *. Pointer to an array of printer
statuses, one for each print server under control of this
service.

See Also
“PRI_printer_status_typ” on page 435

December 1996 WAL for Windows Programmer’s Reference Manual 457


6 Data Types and Structures
PRI_service_type_typ

PRI_service_type_typ
This type specifies service types. In PRI_print_docs(), documents come from
one of two different services–either a Document service or a cache service.
The caller must specify which using one of these defines.

typedef unsigned short PRI_service_type_typ;

PRI_service_type_typ has the following defined constants:

PRI_ST_DOC_SERVICE 1 To print committed documents.


PRI_ST_CACHE_SERVICE 2 To print uncommitted images or to print images
from a particular cache.
PRI_MAX_SERVICE_TYPE PRI_ST_CACHE_SERVICE

458 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PRI_sub_status_typ

PRI_sub_status_typ
typedef struct PRI_sub_status_typ
{
unsigned long sub_status_prg;
unsigned long pct_complete;
} PRI_sub_status_typ;

The PRI_sub_status_typ structure has the following fields:

sub_status_prg
unsigned long. Sub status progress.

pct_complete unsigned long. Percent complete.

December 1996 WAL for Windows Programmer’s Reference Manual 459


6 Data Types and Structures
PS_long_option_type

PS_long_option_type
This structure contains a union of the print options that require more extensive
data, such as a character string. The PS_options_rec_type structure uses this
structure. (For options requiring no more than four bytes of information, use
the PRI_print_option_typ structure.) The option_type field determines which
union member is used.

typedef struct {
PRI_option_typ option_type;
union {
ASE_service_name_typ printer_name;
char form_name[PS_MAX_STRING_LEN];
char note[PS_MAX_NOTE_LEN + 1];
SCT_access_restrictions security;
char phone_number[FAX_PHONE_NUM_LEN + 1];
char headline_msg[PS_MAX_HEADLINE_LEN + 1];
} opt_long;
} PS_long_option_type;

The PS_long_option_type structure has the following fields:

option_type PRI_option_typ (unsigned short). Can have one of the


following values:
PRI_OPTION_PAPER_SIZE 0
PRI_OPTION_PRIORITY 1
PRI_OPTION_PRINTER_NAME 2
PRI_OPTION_COLLATE 3
PRI_OPTION_SECURITY 4
PRI_OPTION_COPIES 5
PRI_OPTION_PRINT_TIME 6
PRI_OPTION_STAPLE 7
PRI_OPTION_TWO_SIDED 8
PRI_OPTION_FORM_NAME 9
PRI_OPTION_NOTE 10
PRI_OPTION_ANNOTATIONS 11
PRI_OPTION_REQUEST_HEADER 12
PRI_OPTION_DOC_HEADERS 13
PRI_OPTION_SCALING 14
PRI_OPTION_ORIENTATION 15
PRI_OPTION_OVERLAY 16
PRI_OPTION_PHONE_NUM 17
PRI_OPTION_HEADLINE 18
PRI_OPTION_FAX_MODE 19

460 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PS_long_option_type

PRI_OPTION_PAGE_FOOTNOTE 20
PRI_OPTION_TIME_FOOTNOTE 21
PRI_OPTION_EJECT_TRAY 22
PRI_OPTION_PHONE_EXT 23
PRI_OPTION_MEMO 24
PRI_OPTION_COVER_DOC 25

printer_name ASE_service_name_typ (NCH_ObjectName). The three-


part NCH name of the desired printer. The printer must be
managed by the Print Service to which you are currently
logged on.

To print a document (or text) on a printer associated with


another system, specify the three-part NCH name of the
desired Print Service (on that system) in the print_service
argument of IAFLIB_print_docs() or IAFLIB_print_files().

form_name char. The form name. Maximum length is PS_MAX_


STRING_LEN characters.

note char. Specifies the note appearing on the job header page for
a print request. Maximum length is 40 characters.

security SCT_access_restrictions. Specifies an SCT_access_


restrictions data structure that contains information about
document access restrictions.

phone_number
char. Fax option only.

headline_msg char. Fax option only.

See Also
“ASE_service_name_typ” on page 178

“PRI_option_typ” on page 408

“SCT_access_restrictions” on page 481

December 1996 WAL for Windows Programmer’s Reference Manual 461


6 Data Types and Structures
PS_options_rec_type

PS_options_rec_type
This structure specifies the type of options. The structure contains an array of
short options and an array of long options. IAFLIB_print_docs(), IAFLIB_
print_files(), and IAFLIB_modify_print() use this structure as input.

typedef struct {
BYTE num_scalars;
BYTE num_strings;
PRI_print_option_typ short_opt[PRINT_MAX_OPTIONS];
PS_long_option_type long_opt[MAX_STRING_OPTIONS];
} PS_options_rec_type;

The PS_options_rec_type structure has the following fields:

num_scalars BYTE. Number of scalar (short_opt) options used.

num_strings BYTE. Number of string (long_opt) options used.

short_opt PRI_print_option_typ. Used for options requiring no more


than four bytes of information (short options).

long_opt PS_long_option_type. Used for options that require more


extensive data, such as a character string (long options).

See Also
“PRI_print_option_typ” on page 417

“PS_long_option_type” on page 460

462 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PS_printer_attr_desc_type

PS_printer_attr_desc_type
This structure specifies the printer attributes that define the capabilities of a
printer. IAFLIB_get_printer_info() returns this structure.

typedef struct {
ASE_service_name_typ name;
PRI_printer_type_typ device_type;
ASE_service_name_typ security;
WORD ppm;
FN_BOOL two_sided;
FN_BOOL has_stapler;
WORD num_trays;
WORD num_paper_sizes;
PRI_paper_size_typ paper_supported[PRI_MAX_PAPER_SIZE+1];
} PS_printer_attr_desc_type;

The PS_printer_attr_desc_type structure has the following fields:

name ASE_service_name_typ (NCH_ObjectName). Printer name.

device_type PRI_printer_type_typ (unsigned short). The type of device.


Can have one of the following values:
PRI_PT_UNKNOWN 0
PRI_PT_PRINTER 1
PRI_PT_FAX 2

security ASE_service_name_typ (NCH_ObjectName). The security


needed to print on this printer.

ppm WORD. The speed (pages per minute) of this printer.

two_sided FN_BOOL. Specifies whether or not this printer can print on


both sides of the paper.

has_stapler FN_BOOL. Specifies whether or not this printer is capable of


stapling.

num_trays WORD. The number of trays that this printer can support.

num_paper_sizes
WORD. The number of paper sizes that this printer is capable
of printing on.

December 1996 WAL for Windows Programmer’s Reference Manual 463


6 Data Types and Structures
PS_printer_attr_desc_type

paper_supported
PRI_paper_size_typ (unsigned short). The paper sizes that
this printer is capable of printing on. Can be one of the
following values:
PRI_PS_UNKNOWN 0
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11
PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15
PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DONT_CARE 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_10x14 22
PRI_PS_DEFAULT 23
PRI_PS_EXECUTIVE 24
PRI_PS_MAX_PAPER_SIZE 24

See Also
“ASE_service_name_typ” on page 178

“PRI_paper_size_typ” on page 413

“PRI_printer_type_typ” on page 437

464 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
PS_printer_status_desc_type

PS_printer_status_desc_type
This structure specifies printer status. IAFLIB_get_print_service_info() returns
this structure.

typedef struct {
ASE_service_name_typ name;
PRI_printer_op_status_typ op_status;
WORD prt_direction;
WORD num_requests_queued;
WORD num_pages_queued;
WORD num_paper_sizes;
PRI_paper_size_typ paper_loaded[PRI_MAX_PAPER_SIZE + 1];
} PS_printer_status_desc_type;

The PS_printer_status_desc_type structure has the following fields:

name ASE_service_name_typ (NCH_ObjectName). Printer name.

op_status PRI_printer_op_status_typ (unsigned short). The printer’s


operational status. Can be one of the following:
PRI_POS_UNKNOWN 0
PRI_POS_DISABLED 1
PRI_POS_AVAILABLE 2
PRI_POS_NEEDS_ATTN 3
PRI_POS_NEEDS_SVC 4

prt_direction WORD. The direction in which this printer is currently set up


to print (backwards for face up printing, forwards for face
down printing). 0 indicates forward, 1 backward.

num_requests_queued
WORD. The number of requests ready and queued to this
printer.

num_pages_queued
WORD. The number of document pages queued to this
printer.

num_paper_sizes
WORD. The number of paper sizes that this printer currently
has loaded.

December 1996 WAL for Windows Programmer’s Reference Manual 465


6 Data Types and Structures
PS_printer_status_desc_type

paper_loaded PRI_paper_size_typ (unsigned short). A list of the paper


sizes that this printer currently has loaded. Can be one of the
following:
PRI_PS_UNKNOWN 0
PRI_PS_LETTER 1
PRI_PS_LEGAL 2
PRI_PS_B 3
PRI_PS_C 4
PRI_PS_D 5
PRI_PS_E 6
PRI_PS_A0 7
PRI_PS_A1 8
PRI_PS_A2 9
PRI_PS_A3 10
PRI_PS_A4 11
PRI_PS_A5 12
PRI_PS_B4 13
PRI_PS_B5 14
PRI_PS_18x24 15
PRI_PS_TOP 16
PRI_PS_BOTTOM 17
PRI_PS_THIRD 18
PRI_PS_DONT_CARE 19
PRI_PS_HALF_LETTER 20
PRI_PS_BEST_AVAIL 21
PRI_PS_10x14 22
PRI_PS_DEFAULT 23
PRI_PS_EXECUTIVE 24
PRI_PS_MAX_PAPER_SIZE 24

See Also
“ASE_service_name_typ” on page 178

“PRI_paper_size_typ” on page 413

“PRI_printer_op_status_typ” on page 434

466 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
QMR_ENTRY

QMR_ENTRY
typedef struct {
FN_docnum_typ doc_id;
unsigned short pages;
FN_folnum_typ folder_id;
LONG offset;
unsigned nbytes;
int nlines;
BOOL fselect;
int DIRoffset;
int reserved1;
int reserved2;
} QMR_ENTRY;

The QMR_ENTRY structure has the following fields:

doc_id FN_docnum_typ (unsigned long). Document ID number.

pages unsigned short. Number of pages in document.

folder_id FN_folnum_typ (unsigned long). 0 if not available.

offset LONG. Offset into file where entry starts.

nbytes unsigned. Size of entry in bytes.

nlines int. Number of text lines.

fselect BOOL. TRUE if document is selected; this field is for the


application’s use.

DIRoffset int. Offset into DIRs where entry is.

reserved1 int. Not used yet.

reserved2 int. Not used yet.

See Also
“FN_docnum_typ” on page 260

“FN_folnum_typ” on page 261

December 1996 WAL for Windows Programmer’s Reference Manual 467


6 Data Types and Structures
QMR_INFO

QMR_INFO
typedef struct {
HANDLE hInstQmr;
HANDLE hHelp;
HANDLE hFolder;
HANDLE IAFLIB_client_h;
HANDLE qmr_list_h;
int no_entries;
FN_BOOL complete;
char WndTitle[80];
HWND hQmrWnd;
HANDLE DIRs_h;
HANDLE hIndexForm;
HANDLE hIndexFormLib;
byte termkey;
} QMR_INFO;

The QMR_INFO structure has the following fields:

hInstQmr HANDLE. Instance handle to QMR.

hHelp HANDLE. Handle used by HLPLIB.

hFolder HANDLE. Handle used by Folder Maint DLL.

IAFLIB_client_h
HANDLE. IAFLIB client handle.

qmr_list_h HANDLE. Handle to list of QMR entries.

no_entries int. Number of entries in qmr_list_h.

complete FN_BOOL. Indicates whether the query is complete.

WndTitle char. QMR window title.

hQmrWnd HWND. Handle to the QMR window.

DIRs_h HANDLE. Handle to DIRs, if not freeing.

hIndexForm HANDLE. IndexForm handle.

hIndexFormLib HANDLE. IndexForm library handle.

termkey byte. Softkey that caused termination.

468 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
QMR_Softkey_typ

QMR_Softkey_typ
typedef struct {
char label[QMR_LEN_SOFTKEY_LABEL+1];
byte key;
} QMR_Softkey_typ;

The QMR_Softkey_typ structure has the following fields:

label char. Key label (the text that appears on the menubar).

key byte. A virtual key code VK_F1 through VK_F12.

December 1996 WAL for Windows Programmer’s Reference Manual 469


6 Data Types and Structures
RDD Constants

RDD Constants

FN_MAX_MENU_NAME_LEN 14 Maximum of 14 characters in menu name.


FN_MAX_MENU_ITEM_NAME_LEN 40 Maximum of 40 menu items.
RDD_MAX_KEY_INDEXES 1 Currently is always 1.
RDD_INVALID_INDEX_ID 0 System index ID. 1 to 39 are reserved. Greater than
39 are used for user-defined indices.

470 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
RDD_DC_INDEX_DESC

RDD_DC_INDEX_DESC
This structure defines the unique index parameters within a specified
Document Class. These parameters are significant only for document entry in
the specified Document Class.

typedef struct {
RDD_INDEX_ID_TYP index_id;
FN_BOOL required;
FN_BOOL batch_total_flag;
FN_BOOL verify_flag
} RDD_DC_INDEX_DESC;

The RDD_DC_INDEX_DESC structure has the following fields:

index_id RDD_INDEX_ID_TYP (unsigned short). The ID of this index.

required FN_BOOL. TRUE if the index must always have a non-null


value.

batch_total_flag
FN_BOOL. TRUE if values for this index must be totaled
during document entry of batches belonging to this document
class.

verify_flag FN_BOOL. TRUE if values for this index must be verified


during document entry of documents belonging to this
document class.

See Also
“RDD_INDEX_ID_TYP” on page 474

December 1996 WAL for Windows Programmer’s Reference Manual 471


6 Data Types and Structures
RDD_DCL_ID_TYP

RDD_DCL_ID_TYP
typedef unsigned short RDD_DCL_ID_TYP;

472 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
RDD_DCLASS_DESC

RDD_DCLASS_DESC
This structure specifies the document class descriptor.

typedef VARYING struct {


unsigned short num_bytes;
char name[FN_MAX_DCNAMESIZE + 1];
RDD_DCL_ID_TYP id;
unsigned no_indices;
RDD_DC_INDEX_DESC indexes[1];
} RDD_DCLASS_DESC;

The RDD_DCLASS_DESC structure has the following fields:

num_bytes unsigned short. Size in bytes of this entry.

name char. Name of the document class.

id RDD_DCL_ID_TYP (unsigned short). Identifying number of


the document class.

no_indices unsigned. The number of indices for the document class.

indexes RDD_DC_INDEX_DESC. A sequence of records describing


the user indexes for the class.

See Also
“RDD_DC_INDEX_DESC” on page 471

“RDD_DCL_ID_TYP” on page 472

December 1996 WAL for Windows Programmer’s Reference Manual 473


6 Data Types and Structures
RDD_INDEX_ID_TYP

RDD_INDEX_ID_TYP
This type designates an index ID that is unique within a system. An index is
referenced either by an index name or an index ID. Index IDs refer to system
and user indexes.

typedef unsigned short RDD_INDEX_ID_TYP;

474 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
RDD_IXFIELD_DESC

RDD_IXFIELD_DESC
This structure specifies an index field descriptor. The descriptor is the
complete description of an index.

typedef struct {
char name[FN_MAX_IXNAME + 1];
RDD_INDEX_ID_TYP id;
char desc[FN_MAX_IXDESCLEN + 1];
RDD_VALUE_TYPE_TYP valuetype;
FN_BOOL upper;
FN_BOOL issystem;
unsigned max_length;
char menuname[FN_MAX_MENU_NAME_LEN + 1];
char maskname[FN_MAX_IXMASKLEN + 1];
} RDD_IXFIELD_DESC;

The RDD_IXFIELD_DESC structure has the following fields:

name char. The public name of the index.

id RDD_INDEX_ID_TYP (unsigned short). The number that


identifies the index.

desc char. A text string describing this index.

valuetype RDD_VALUE_TYPE_TYP (unsigned short). The data type of


the index.

upper FN_BOOL. TRUE if values are to be treated as a single case


(upper case).

issystem FN_BOOL. TRUE if this is a system index, FALSE if it is a


user index.

max_length unsigned. The maximum number of characters allowed in an


index value; only valid if the index type is RDD_VT_ASCII.

menuname char. The name of the menu associated with the index; only
valid if the index type is RDD_VT_MENU.

maskname char. Conversion mask for display of numeric and date


values.

December 1996 WAL for Windows Programmer’s Reference Manual 475


6 Data Types and Structures
RDD_IXFIELD_DESC

See Also
“RDD_INDEX_ID_TYP” on page 474

“RDD_VALUE_TYPE_TYP” on page 480

476 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
RDD_KEY_IXFIELD_DESC

RDD_KEY_IXFIELD_DESC
This structure specifies the key index field descriptor.

typedef struct {
char name[FN_MAX_IXNAME + 1];
RDD_INDEX_ID_TYP id;
unsigned no_indices;
unsigned short indices[RDD_MAX_KEY_INDEXES];
} RDD_KEY_IXFIELD_DESC;

The RDD_KEY_IXFIELD_DESC structure has the following fields:

name char. Key indexing field name.

id RDD_INDEX_ID_TYP (unsigned short). Key index ID.

no_indices unsigned. Currently is always one.

indices unsigned short. Currently is always one.

See Also
“RDD_INDEX_ID_TYP” on page 474

December 1996 WAL for Windows Programmer’s Reference Manual 477


6 Data Types and Structures
RDD_MENU_DESC

RDD_MENU_DESC
This structure provide a menu description.

typedef VARYING struct {


unsigned short num_bytes;
char name[FN_MAX_MENU_NAME_LEN+1];
unsigned short no_items;
RDD_MENUITEM_DESC item_desc[1];
} RDD_MENU_DESC;

The RDD_MENU_DESC structure has the following fields:

num_bytes unsigned short. Size in bytes of this entry.

name char. Name of the menu.

no_items unsigned short. Number of menu items.

item_desc RDD_MENUITEM_DESC. The number of elements in this


array is specified by no_items.

See Also
“RDD_MENUITEM_DESC” on page 479

478 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
RDD_MENUITEM_DESC

RDD_MENUITEM_DESC
This structure provides a description of a menu item.

typedef struct {
char name[FN_MAX_MENU_ITEM_NAME_LEN + 1];
unsigned short id;
} RDD_MENUITEM_DESC;

The RDD_MENUITEM_DESC structure has the following fields:

name char. Text description of the menu item.

id unsigned short. Menu item ID.

December 1996 WAL for Windows Programmer’s Reference Manual 479


6 Data Types and Structures
RDD_VALUE_TYPE_TYP

RDD_VALUE_TYPE_TYP
typedef unsigned short RDD_VALUE_TYPE_TYP;

RDD_VALUE_TYPE_TYP has the following defined constants:

RDD_VT_BOOLEAN 'A' Two bytes (TRUE or FALSE)


RDD_VT_BYTE 'B' Byte
RDD_VT_UNS_BYTE 'C' Unsigned byte.
RDD_VT_SHORT 'D' Short
RDD_VT_UNS_SHORT 'E' Unsigned short
RDD_VT_LONG 'F' Long
RDD_VT_UNS_LONG 'G' Unsigned long
RDD_VT_FPNUM '1' FN_NUMBER
RDD_VT_ASCII '2' FN_STRING
RDD_VT_DATE '8' FN_DATE
RDD_VT_TIME '3' FN_TIME
RDD_VT_MENU '4' FN_SELECTION
RDD_VT_NULL '0' NULL

480 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SCT_access_restrictions

SCT_access_restrictions
This structure specifies document access restrictions.

typedef struct {
SCT_id read_group;
SCT_id write_group;
SCT_id AX_group;
} SCT_access_restrictions;

The SCT_access_restrictions structure has the following fields:

read_group SCT_id (unsigned long). User or group with read permission.


The meaning of read permission can vary with object.

write_group SCT_id (unsigned long). User or group with write permission.


The meaning of write permission can vary with object.

AX_group SCT_id (unsigned long). User or group with append/execute


permission. The meaning of append/execute permission can
vary with object.

See Also
“SCT_id” on page 483

December 1996 WAL for Windows Programmer’s Reference Manual 481


6 Data Types and Structures
SCT_handle

SCT_handle
typedef struct {
SCT_id who;
SCT_id where;
SCT_password password;
} SCT_handle;

The SCT_handle structure has the following fields:

who SCT_id;

where SCT_id;

password SCT_password;

See Also
“SCT_id” on page 483

482 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SCT_id

SCT_id
This type specifies a user or group number. FileNet reserves the first 19
numbers. Other numbers are assigned to client-created users and groups as
each is created.

typedef unsigned long SCT_id;

SCT_id has the following defined constants:

SCT_null_group 0 Equivalent to “(NONE)”.


SCT_anyone 1 Equivalent to “(ANYONE)”.
SCT_system_administrator 2 Equivalent to “SysAdmin”.
SCT_field_service 3 Equivalent to “FieldService”.
SCT_operator 4 Equivalent to “Operator”.
SCT_service_process 5
SCT_last_reserved 19
SCT_MAX_GROUP_ID 0xffffffff Maximum number of groups allowed in a
FileNet system.

December 1996 WAL for Windows Programmer’s Reference Manual 483


6 Data Types and Structures
SCT_name

SCT_name
typedef char SCT_Name[SCT_maxnamelength];

484 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SCT_password

SCT_password
typedef char SCT_password[SCT_maxpasswordlength];

#define SCT_maxpasswordlength 16

December 1996 WAL for Windows Programmer’s Reference Manual 485


6 Data Types and Structures
SEC_access_wanted_typ

SEC_access_wanted_typ
This type designates the type of security access.

typedef unsigned short SEC_access_wanted_typ;

SEC_access_wanted_typ has the following defined constants:

SEC_WANT_READ 1 Read access.


SEC_WANT_WRITE 2 Write access.
SEC_WANT_AX 4 Append/execute access.

486 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_add_info_typ

SEC_add_info_typ
This structure contains information to be added to the security database. The
information is either for a user, group, workstation, or function. Information
also includes membership information for a user, group, workstation, or
function.

typedef struct {
unsigned short info_type;
union {
SEC_user_info_typ usr_info;
SEC_usr_member_info_typ usr_mbr_info;
ASE_service_name_typ term_name;
SEC_term_member_info_typ term_mbr_info;
char func_name[SEC_MAX_FUNC_NAME_LENGTH];
SEC_func_member_info_typ func_mbr_info;
} u;
} SEC_add_info_typ;

The SEC_add_info_typ structure has the following fields:

info_type unsigned short. Specifies the type of information to be added


to the security database. Can be one of the following:
SEC_INFOTYPE_USER SEC_INFOTYPE_USER_MEMBER SEC_
INFOTYPE_TERMINAL SEC_INFOTYPE_TERMINAL_MEMBER
SEC_INFOTYPE_FUNCTION SEC_INFOTYPE_FUNCTION_
MEMBER

usr_info SEC_user_info_typ. Contains information to be added to the


security database about a user. The information in this
structure is meaningful if info_type is specified as SEC_
INFOTYPE_USER.

usr_mbr_info SEC_usr_member_info_typ. Specifies an SEC_usr_


member_info_typ data structure, which contains membership
information for a user. The information in this structure is
meaningful if info_type is specified as SEC_INFOTYPE_
USER_MEMBER.

term_name ASE_service_name_typ (NCH_ObjectName). The name of


the workstation that is to be added to the security database.
This field is meaningful only if info_type is specified as SEC_
INFOTYPE_TERMINAL.

December 1996 WAL for Windows Programmer’s Reference Manual 487


6 Data Types and Structures
SEC_add_info_typ

term_mbr_info
SEC_term_member_info_typ. Contains membership
information for a workstation. The information in this structure
is only meaningful if info_type is specified as SEC_
INFOTYPE_TERMINAL_MEMBER.

func_name char. The name of a function that is to be added to the


security database. This field is only meaningful if info_type is
specified as SEC_INFOTYPE_FUNCTION.

func_mbr_info
SEC_func_member_info_typ. Contains membership
information for a function. The information in this structure is
only meaningful if info_type is specified as SEC_INFOTYPE_
FUNCTION_MEMBER.

See Also
“ASE_service_name_typ” on page 178

“SEC_func_member_info_typ” on page 499

“SEC_term_member_info_typ” on page 519

“SEC_user_info_typ” on page 527

“SEC_usr_member_info_typ” on page 528

488 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_AR_typ

SEC_AR_typ
typedef unsigned long SEC_AR_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 489


6 Data Types and Structures
SEC_AR_set_typ

SEC_AR_set_typ
This structure specifies read, write, and execute permission.

typedef struct {
SEC_AR_typ read;
SEC_AR_typ write;
SEC_AR_typ ax;
} SEC_AR_set_typ;

The SEC_AR_set_typ structure has the following fields:

read SEC_AR_typ (unsigned long). User or group with read


permission. The meaning of read permission can vary with
object.

write SEC_AR_typ (unsigned long). User or group with write


permission. The meaning of write permission can vary with
object.

ax SEC_AR_typ (unsigned long). User or group with append/


execute permission. The meaning of append/execute
permission can vary with object.

See Also
“SEC_AR_typ” on page 489

490 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_delete_info_typ

SEC_delete_info_typ
This structure contains information to be deleted from the security database.
The structure is passed as one of the input parameters to SEC_delete_info().

typedef struct {
unsigned short info_type;
union {
ASE_service_name_typ usr_name;
SEC_usr_member_info_typ usr_mbr;
ASE_service_name_typ term_name;
SEC_term_member_info_typ term_mbr;
char func_name[SEC_MAX_FUNC_NAME_LENGTH];
SEC_func_member_info_typ func_mbr;
} u;
} SEC_delete_info_typ;

The SEC_delete_info_typ structure has the following fields:

info_type unsigned short. Specifies the type of information to be


deleted from the security database. Can be one of the
following:
SEC_INFOTYPE_USER SEC_INFOTYPE_USER_MEMBER SEC_
INFOTYPE_TERMINAL SEC_INFOTYPE_TERMINAL_MEMBER
SEC_INFOTYPE_FUNCTION
SEC_INFOTYPE_FUNCTION_MEMBER

usr_name ASE_service_name_typ (NCH_ObjectName). The name of


the user that is to be deleted from the security database. This
field is only meaningful if info_type is SEC_INFOTYPE_
USER.

usr_mbr SEC_usr_member_info_typ. Contains user membership


information that is to be deleted from the security database.
The information in this structure is only meaningful if info_
type is SEC_INFOTYPE_USER_MEMBER. The semantics
of the various fields are similar to that of usr_mbr_info
described in the SEC_add_info_typ structure (see “SEC_
add_info_typ” on page 487).

term_name ASE_service_name_typ (NCH_ObjectName). The name of


the workstation that is to be deleted from the security
database. This field is only meaningful if info_type is SEC_
INFOTYPE_TERMINAL.

December 1996 WAL for Windows Programmer’s Reference Manual 491


6 Data Types and Structures
SEC_delete_info_typ

term_mbr SEC_term_member_info_typ. Contains workstation


membership information that is to be deleted from the
security database. The information in this structure is only
meaningful if info_type is SEC_INFOTYPE_TERMINAL_
MEMBER. The semantics of the various fields are similar to
that of term_mbr_info described earlier in SEC_add_info_typ
structure (see “SEC_add_info_typ” on page 487).

func_name char. The name of the function that is to be deleted from the
security database. This field is meaningful if info_type is
SEC_INFOTYPE_FUNCTION.

func_mbr SEC_func_member_info_typ. Contains function membership


information that is to be deleted from the security database.
The information in this structure is only meaningful if info_
type is SEC_INFOTYPE_FUNCTION_MEMBER. The
semantics of the various fields are similar to that of func_
mbr_info described earlier in SEC_add_info_typ structure
(see “SEC_add_info_typ” on page 487).

See Also
“ASE_service_name_typ” on page 178

“SEC_func_member_info_typ” on page 499

“SEC_term_member_info_typ” on page 519

“SEC_usr_member_info_typ” on page 528

492 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_find_func_mbr_info_typ

SEC_find_func_mbr_info_typ
typedef struct {
char func_name[SEC_MAX_FUNC_NAME_LENGTH];
ASE_service_name_typ prev_name;
} SEC_find_func_mbr_info_typ;

The SEC_find_func_mbr_info_typ structure has the following fields:

func_name char. Name of the security function.

prev_name ASE_service_name_typ (NCH_ObjectName). Specifies the


name where the search for information is to start. The first
name returned is the one following prev_name in the security
database.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 493


6 Data Types and Structures
SEC_find_info_typ

SEC_find_info_typ
This structure specifies the kind of information to be retrieved from the
security database. The information is about users, workstations, functions, or
membership. This structure is passed as one of the input parameters to SEC_
find_info().

typedef struct {
unsigned short info_type;
union {
SEC_find_usr_info_typ usr_name_info;
SEC_find_usr_mbr_info_typ usr_mbr_info;
ASE_service_name_typ term_name;
SEC_find_term_mbr_info_typ term_mbr_info;
char func_name[SEC_MAX_FUNC_NAME_LENGTH];
SEC_find_func_mbr_info_typ func_mbr_info;
} u;
unsigned short max_names;
} SEC_find_info_typ;

The SEC_find_info_typ structure has the following field:

info_type unsigned short. Specifies the type of information to be


retrieved. Can be one of the following:
SEC_INFOTYPE_USER SEC_INFOTYPE_USER_MEMBER SEC_
INFOTYPE_TERMINAL SEC_INFOTYPE_TERMINAL_MEMBER
SEC_INFOTYPE_FUNCTION
SEC_INFOTYPE_FUNCTION_MEMBER

usr_name_info
SEC_find_usr_info_typ. This field is only meaningful if info_
type is SEC_INFOTYPE_USER.

usr_mbr_info SEC_find_usr_mbr_info_typ. This field is only meaningful if


info_type is SEC_INFOTYPE_USER_MEMBER.

term_name ASE_service_name_typ (NCH_ObjectName). Find all


terminal names beginning with term_name. This field is only
meaningful if info_type is SEC_INFOTYPE_TERMINAL.

term_mbr_info
SEC_find_term_mbr_info_typ. This field is only meaningful if
info_type is SEC_INFOTYPE_TERMINAL_MEMBER.

494 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_find_info_typ

func_name char. This field is only meaningful if info_type is SEC_


INFOTYPE_FUNCTION. If func_name is NULL, then a list of
all the functions defined on the system will be returned.
Otherwise, a list of functions defined in the security database
after func_name will be returned.

func_mbr_info
SEC_find_func_mbr_info_typ. The information in this
structure is only meaningful if info_type is SEC_INFOTYPE_
FUNCTION_MEMBER.

See Also
“ASE_service_name_typ” on page 178

“SEC_find_func_mbr_info_typ” on page 493

“SEC_find_term_mbr_info_typ” on page 496

“SEC_find_usr_info_typ” on page 497

“SEC_find_usr_mbr_info_typ” on page 498

December 1996 WAL for Windows Programmer’s Reference Manual 495


6 Data Types and Structures
SEC_find_term_mbr_info_typ

SEC_find_term_mbr_info_typ
typedef struct {
ASE_service_name_typ term_name;
ASE_service_name_typ prev_name;
} SEC_find_term_mbr_info_typ;

The SEC_find_term_mbr_info_typ structure has the following fields:

term_name ASE_service_name_typ (NCH_ObjectName). Cannot be


NULL.

prev_name ASE_service_name_typ (NCH_ObjectName). Specifies the


name where the search for information is to start. The first
name returned is the one following prev_name in the security
database.

See Also
“ASE_service_name_typ” on page 178

496 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_find_usr_info_typ

SEC_find_usr_info_typ
typedef struct {
ASE_service_name_typ usr_name;
ASE_service_name_typ prev_name;
} SEC_find_usr_info_typ;

The SEC_find_usr_info_typ structure has the following field:

usr_name ASE_service_name_typ (NCH_ObjectName). If usr_name is


NULL (all three parts of the name are 0 length), then a list of
all users is returned. Otherwise, a list of users who are
members of usr_name is returned.

prev_name ASE_service_name_typ (NCH_ObjectName). Specifies the


name where the search for information is to start. The first
name returned is the one following prev_name in the security
database.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 497


6 Data Types and Structures
SEC_find_usr_mbr_info_typ

SEC_find_usr_mbr_info_typ
typedef struct {
ASE_service_name_typ term_name;
ASE_service_name_typ prev_name;
} SEC_find_term_mbr_info_typ;

term_name ASE_service_name_typ (NCH_ObjectName).

prev_name ASE_service_name_typ (NCH_ObjectName). Specifies the


name where the search for information is to start. The first
name returned is the one following prev_name in the security
database.

See Also
“ASE_service_name_typ” on page 178

498 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_func_member_info_typ

SEC_func_member_info_typ
This structure specifies membership information for a function.

typedef struct {
char func_name[SEC_MAX_FUNC_NAME_LENGTH];
unsigned short num_mbr;
ASE_service_name_typ * mem_list;
} SEC_func_member_info_typ;

The SEC_func_member_info_typ structure has the following fields:

func_name char. The name of a function that is to have members added


to or deleted from it.

num_mbr unsigned short. The number of elements in the membership


list mem_list.

mem_list ASE_service_name_typ (NCH_ObjectName) *. A list of


member names to be added or deleted. A member for
functions is a user who is allowed to access the function.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 499


6 Data Types and Structures
SEC_func_name_typ

SEC_func_name_typ
typedef struct {
char func_name[SEC_MAX_FUNC_NAME_LENGTH];
} SEC_func_name_typ;

The SEC_func_name_typ structure has the following field:

func_name char. Name of the security function.

500 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_get_defaults_typ

SEC_get_defaults_typ
This structure specifies the default security information for a system.

typedef struct {
unsigned short term_sec;
unsigned short und_func;
unsigned short def_lang;
ASE_service_name_typ noone_name;
ASE_service_name_typ anyone_name;
char def_org[NCH_MAX_ORG_LENGTH];
char def_domain[NCH_MAX_DOMAIN_LENGTH];
} SEC_get_defaults_typ;

The SEC_get_defaults_typ structure has the following fields:

term_sec unsigned short. Specifies whether workstation security must


be enforced.

und_func unsigned short. Specifies whether any user can access a


function if the access list for that function is not explicitly
defined.

def_lang unsigned short. The default language can be specified from


setup.

noone_name ASE_service_name_typ (NCH_ObjectName). The name for


the security default, no one.

anyone_name
ASE_service_name_typ (NCH_ObjectName). The name for
the security default, any one.

def_org char. The default Clearinghouse organization.

def_domain char. The default Clearinghouse domain.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 501


6 Data Types and Structures
SEC_get_system_info_typ

SEC_get_system_info_typ
This structure contains the system information retrieved by SEC_get_system_
info() to be returned to the client.

typedef struct {
unsigned short get_type;
union {
SEC_get_defaults_typ get_def;
long get_date_time;
} u;
} SEC_get_system_info_typ;

The SEC_get_system_info_typ structure has the following fields:

get_type unsigned short. Specifies the type of system information to


be retrieved. The value can be either SEC_INFOTYPE_
DEFAULTS or SEC_INFOTYPE_DATE_TIME.

get_def SEC_get_defaults_typ. This field is meaningful if get_type is


SEC_INFOTYPE_DEFAULTS. The kind of system default
information provided includes whether workstation security
must be enforced, whether any user can access a function if
the access list for that function is not explicitly defined, the
default language, the names for the security defaults “no one”
and “any one,” the default Clearinghouse organization, and
the default Clearinghouse domain.

get_date_time
long. This field is meaningful if get_type is SEC_INFOTYPE_
DATE_TIME. The information in this field is the date and time
of the system clock in seconds since 1/1/70.

See Also
“SEC_get_defaults_typ” on page 501

502 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_handle_typ

SEC_handle_typ
This structure is a security service handle that enables a user to log on again
and to identify a user to a remote system.

typedef struct {
SCT_handle sct_handle;
} SEC_handle_typ;

The SEC_handle_typ structure has the following field:

sct_handle SCT_handle. Specifies an SCT_handle data structure that


contains the credential information.

See Also
“SCT_handle” on page 482

December 1996 WAL for Windows Programmer’s Reference Manual 503


6 Data Types and Structures
SEC_id_typ

SEC_id_typ
This type designates security IDs for IMS 3.x. The first six constants
correspond to the SCT_id constants used in IMS releases prior to 3.1.

Only the user system administrator can create or update users or groups from
a PC client. The following categories of users or groups are defined for
IMS 3.1:

• System administrator user and system administrator group

• Field service user and field service group

• Operator user and operator group

• Audit group with universal read access

These IDs are not in the security database. Some security services entry-
points, such as, SEC_id_to_name(), accept the IDs as valid. The IDs occur in
access restrictions for objects such as documents and queues.

typedef SCT_id SEC_id_typ;

SEC_NULL_GROUP_ID 0 Equivalent to “(NONE)”.


SEC_ANYONE_ID 1 Equivalent to “(ANYONE)”.
SEC_SYSADMIN_GRP_ID 2 Equivalent to “SysAdmin”.Note that any member of this
group will automatically have access to all documents,
regardless of the access restrictions placed on the
document.
SEC_FIELD_SVC_GRP_ID 3 Equivalent to “Field Service”.
SEC_OPERATOR_GRP_ID 4 Equivalent to “Operator”.
SEC_SERVPROC_ID 5 The FileNet set of services use the local service process ID,
which is generally for internal use. However, you can use the
ID to restrict access between different security domains by
changing the service process password to a password other
than that used by other domains' service process objects.
SEC_UNDEFINED_ID 6 Reserved. Internal unknown object.
SEC_USER_DEFAULTS_ID 7 Default user object template. When you create an object, it
will be populated with the settings contained in default
templates (Values 7-10) unless you specify otherwise.
SEC_GROUP_DEFAULTS_ID 8 Default group object template.

504 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_id_typ

SEC_DEVICE_DEFAULTS_ID 9 Default device object template.


SEC_SYSTEM_DEFAULTS_ID 10 Default system security domain object template.
SEC_SYSADMIN_USR_ID 11 The SysAdmin user is the equivalent of the UNIX root user.
SysAdmin user has complete access to all documents and
can modify the security database without restriction. This is
the initial account.
SEC_FIELD_SVC_USR_ID 12 Reserved.
SEC_OPERATOR_USR_ID 13 Reserved.
SEC_SERVPROC_TERM_ID 14 Service process terminal.
SEC_AUDIT_GRP_ID 15 Members of the audit group have read all access.
SEC_LAST_RESERVED_ID 19 Last reserved ID.

December 1996 WAL for Windows Programmer’s Reference Manual 505


6 Data Types and Structures
SEC_info_type_typ

SEC_info_type_typ
typedef unsigned short SEC_info_type_typ;

SEC_info_type_typ has the following defined constants:

SEC_INFOTYPE_USER 1 To specify SEC_user_info_typ.


SEC_INFOTYPE_USER_MEMBER 2 To specify SEC_user_member_info_typ.
SEC_INFOTYPE_TERMINAL 3 To specify SEC_service_name_typ.
SEC_INFOTYPE_TERMINAL_MEMBER 4 To specify SEC_term_member_info_typ.
SEC_INFOTYPE_FUNCTION 5 To specify a function name.
SEC_INFOTYPE_FUNCTION_MEMBER 6 To specify a SEC_func_member_info_typ.
SEC_INFOTYPE_DEFAULTS 7
SEC_INFOTYPE_DATE_TIME 8
SEC_INFOTYPE_SERVICE_PROCESS 9
SEC_INFOTYPE_GROUP 11

506 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_language_typ

SEC_language_typ
typedef char SEC_language_typ[SEC_LANGAUGE_LENGTH + 1];

#define SEC_LANGUAGE_LENGTH 16

December 1996 WAL for Windows Programmer’s Reference Manual 507


6 Data Types and Structures
SEC_memlist_typ

SEC_memlist_typ
This structure contains membership information about a user or group. This
information is returned by SEC_get_membership_list(). The membership
information is either a subscription list or a subscriber list. A subscription list is
a list of groups of which this user or group is a member. A subscriber list is a
list of users who are members of this user/group. The subscriber list is not
currently supported.

typedef struct {
SEC_memlist_type_typ list_type;
SEC_id_typ security_id;
unsigned short included_len;
HANDLE included_list;
unsigned short excluded_len;
HANDLE excluded_list;
} SEC_memlist_typ;

The SEC_memlist_typ structure has the following fields:

list_type SEC_memlist_type_typ (unsigned short). Set to SEC_


MEMLIST_SUBSCRIPTION to denote a subscription list.

security_id SEC_id_typ (unsigned long). The ID of the user or group this


membership list is for.

included_len unsigned short. The number of elements in included_list.

included_list HANDLE. A handle to a list of the security IDs of the users or


groups of which this user or group is a member. This memory
for the list is allocated dynamically by SECLIB; the client is
responsible for freeing the memory.

excluded_len unsigned short. Reserved. Must have a value of 0.

excluded_list HANDLE. Reserved. Must have a value of NULL.

See Also
“SEC_id_typ” on page 504

“SEC_memlist_type_typ” on page 509

508 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_memlist_type_typ

SEC_memlist_type_typ
typedef unsigned short SEC_memlist_type_typ;

SEC_memlist_type_typ has the following defined constants:

SEC_MEMLIST_SUBSCRIPTION 1
SEC_MEMLIST_SUBSCRIBER 2

December 1996 WAL for Windows Programmer’s Reference Manual 509


6 Data Types and Structures
SEC_name_typ

SEC_name_typ
typedef char SEC_name_typ[SEC_FULL_OBJECT_LENGTH + 1];

#define SEC_FULL_OBJECT_LENGTH 83

510 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_names_found_typ

SEC_names_found_typ
This structure contains information retrieved by SEC_find_info().

typedef struct {
unsigned short name_type;
unsigned short num_found;
union {
HANDLE svc_names;
HANDLE func_names;
} u;
} SEC_names_found_typ;

The SEC_names_found_typ structure has the following fields:

name_type unsigned short. Specifies whether the names to be returned


are names of users, workstations, or functions.

num_found unsigned short. The number of elements in either svc_names


or func_names.

svc_names HANDLE. The handle to a list of the user or workstation


names, in Clearinghouse three-part format, retrieved by
SEC_find_info(). The memory for this list is allocated
dynamically by SECLIB, and the client is responsible for
freeing it when the information is no longer needed. This field
is meaningful if name_type specifies user names or
workstation names.

func_names HANDLE. The handle to a list of the function names (each is


a null-terminated char string) retrieved by SEC_find_info().
The memory for the list is allocated dynamically by SECLIB,
and the client is responsible for freeing it when the
information is no longer needed. This field is meaningful if
name_type specifies function names.

December 1996 WAL for Windows Programmer’s Reference Manual 511


6 Data Types and Structures
SEC_security_defaults_typ

SEC_security_defaults_typ
This structure contains default and configuration information about the
security service and the user ID assigned to the next, newly-created user.

typedef struct {
unsigned short terminal_security;
unsigned short undefined_functions;
unsigned short default_language;
ASE_service_name_typ noone_name;
ASE_service_name_typ anyone_name;
NCH_DomainName default_domain;
} SEC_security_defaults_typ;

The SEC_security_defaults_typ structure has the following fields:

terminal_security
unsigned short.

undefined_functions
unsigned short

default_language
unsigned short. The default language (can be specified from
setup).

noone_name ASE_service_name_typ (NCH_ObjectName). Three-part


NCH name indicating access by no one.

anyone_name
ASE_service_name_typ (NCH_ObjectName). Three-part
NCH name indicating access by anyone.

default_domain
NCH_DomainName. Specifies a default domain.

See Also
“ASE_service_name_typ” on page 178

“NCH_DomainName” on page 391

512 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_security_info_typ

SEC_security_info_typ
This structure contains user security information. SEC_get_security_info()
returns this security information.

typedef struct {
ASE_service_name_typ name;
SEC_id_typ id;
SEC_id_typ primary_group;
unsigned short language;
FN_BOOL for_login;
} SEC_security_info_typ;

The SEC_security_info_typ structure has the following fields:

name ASE_service_name_typ (NCH_ObjectName). Name of the


user.

id SEC_id_typ (unsigned long). The security ID of the user.

primary group SEC_id_typ (unsigned long). The security ID of the primary


group to which the user belongs.

language unsigned short. The language of the user. This is an encoded


value representing languages such as English, Spanish,
German, etc.

for_login FN_BOOL. A boolean flag specifying whether the user is


allowed to log in. TRUE means the user is allowed to log,
FALSE means the user is not allowed to log in.

See Also
“ASE_service_name_typ” on page 178

“SEC_id_typ” on page 504

December 1996 WAL for Windows Programmer’s Reference Manual 513


6 Data Types and Structures
SEC_set_defaults_typ

SEC_set_defaults_typ
This structure specifies the default security information for a system.

typedef struct {
unsigned short term_sec;
unsigned short undef_func;
unsigned short def_lang;
char def_org[NCH_MAX_ORG_LENGTH];
char def_domain[NCH_MAX_DOMAIN_LENGTH];
} SEC_set_defaults_typ;

The SEC_set_defaults_typ structure has the following fields:

term_sec unsigned short.

undef_func unsigned short.

def_lang unsigned short. The default language (can be specified from


setup).

def_org char. The default Clearinghouse organization.

def_domain char. The default Clearinghouse domain.

514 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_set_system_info_typ

SEC_set_system_info_typ
This structure contains system information for security. This structure is one of
the input parameters to SEC_set_system_info().

typedef struct {
unsigned short set_type;
union {
SEC_set_defaults_typ set_def;
long set_date_time;
} u;
} SEC_set_system_info_typ;

The SEC_set_system_info_typ structure has the following fields:

set_type unsigned short. Specifies the type of system information to


be changed. The value must be either SEC_INFOTYPE_
DEFAULTS or SEC_INFOTYPE_DATE_TIME.

set_def SEC_set_defaults_typ. This field is meaningful if set_type is


SEC_INFOTYPE_DEFAULTS. The kinds of system default
information contained in an SEC_set_defaults_typ structure
include whether workstation security must be enforced,
whether users can access a function if the access list for the
function is not defined, the default language, the default
Clearinghouse organization, and the default Clearinghouse
domain.

set_date_time
long. This field is meaningful if set_type is SEC_INFOTYPE_
DATE_TIME. The information in this field is the value of the
system clock in seconds elapsed since
1/1/70.

See Also
“SEC_set_defaults_typ” on page 514

December 1996 WAL for Windows Programmer’s Reference Manual 515


6 Data Types and Structures
SEC_stats_desc_typ

SEC_stats_desc_typ
This structure contains IMS 3.1 user and group security administration
information including account activity and password maintenance data.

typedef struct SEC_stats_desc_typ {


unsigned long nbr_logons;
ASE_time_typ success_log_time;
SEC_name_typ success_where;
ASE_time_typ failed_log_time;
SEC_name_typ failed_where;
error_typ failed_err;
FN_BOOL pwd_grace_period;
ASE_time_typ pwd_expires_time;
} SEC_stats_desc_typ;

nbr_logons unsigned long. Total number of successful logins.

success_log_time
ASE_time_typ. Time of last successful login.

success_where
SEC_name_typ. Location of last login.

failed_log_time
ASE_time_typ. Time of last failed login attempt.

failed_where SEC_name_typ. Location of last failed login attempt.

failed_err error_typ. Type of login failure.

pwd_grace_period
FN_BOOL. 1 indicates password grace period has begun; 0
indicates grace period has not begun.

pwd_expires_time
ASE_time_typ. Time of password expiration.

See Also
“ASE_time_typ” on page 183

“SEC_name_typ” on page 510

516 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_system_desc_typ

SEC_system_desc_typ
This structure specifies configurable security controls for IMS 3.1. You can
override system defaults by setting allow_override. Note that the password
length restriction defined in sct.def accepts 16 characters without an error
message, but uses only 8.

#define SCT_servermaxpasswordlength 8

typedef struct SEC_system_desc_typ {


SEC_id_typ system_id;
ASE_ssn_typ ssn;
FN_BOOL device_security;
FN_BOOL no_func_def_ok;
ASE_time_typ update_time;
SEC_time_range_typ logon_times;
unsigned short max_sessions;
FN_BOOL pwd_special_char;
unsigned char pwd_min_len;
unsigned short pwd_renewal_days;
unsigned short pwd_grace_period;
unsigned short pwd_attempts;
unsigned short pwd_failure_mins;
FN_BOOL log_success_logon;
FN_BOOL log_failed_logon;
FN_BOOL log_db_updates;
SEC_language_typ language;
FN_BOOL allow_override;
} SEC_system_desc_typ;

SEC_system_desc_typ has the following fields:

system_id SEC_id_typ. Object ID for service process

ssn ASE_ssn_typ. System ssn.

device_security
FN_BOOL. 0 indicates off, 1 on.

no_func_def_ok
FN_BOOL. 0 indicates no, 1 yes.

update_time ASE_time_typ. Time stamp of last db update.

logon_times SEC_time_range_typ. Allowable logon times.

December 1996 WAL for Windows Programmer’s Reference Manual 517


6 Data Types and Structures
SEC_system_desc_typ

max_sessions unsigned short. Maximum number of user sessions.

pwd_special_char
FN_BOOL. Special character required in password: 0
indicates no, 1 yes.

pwd_min_len unsigned char. Minimum allowable length of password.

pwd_renewal_days
unsigned short. Time in days until password expires.

pwd_grace_period
unsigned short. Time in days until password grace-logon
period expires.

pwd_attempts unsigned short. Number of password attempts until session


disabled.

pwd_failure_mins
unsigned short. Time delay for password entry until automatic
session disable.

log_success_logon
FN_BOOL. Record successful logons: 0 indicates no, 1 yes.

log_failed_logon
FN_BOOL. Record failed logons:0 indicates no, 1 yes.

log_db_updates
FN_BOOL. Record database updates:0 indicates no, 1 yes.

language SEC_language_typ. System language.

allow_override FN_BOOL. Allow override of system defaults.

See Also
“ASE_ssn_typ” on page 180

“ASE_time_typ” on page 183

“SEC_id_typ” on page 504

“SEC_language_typ” on page 507

“SEC_time_range_typ” on page 520

518 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_term_member_info_typ

SEC_term_member_info_typ
This structure designates the workstation. SEC_add_info() uses this structure
as input.

typedef struct {
ASE_service_name_typ term_name;
unsigned short num_mbr;
ASE_service_name_typ * mem_list;
} SEC_term_member_info_typ;

The SEC_term_member_info_typ structure has the following fields:

term_name ASE_service_name_typ (NCH_ObjectName). The name of


the workstation that is to have members added to it. This field
is meaningful only if info_type is specified as SEC_
INFOTYPE_TERMINAL.

num_mbr unsigned short. The number of elements in the membership


list mem_list.

mem_list ASE_service_name_typ (NCH_ObjectName) *. A list of


member names to be added. A member for workstations is a
user who is allowed to access the workstation.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 519


6 Data Types and Structures
SEC_time_range_typ

SEC_time_range_typ
typedef struct SEC_time_range_typ
{
long start_min;
long start_hour;
long start_dweek;
long end_min;
long end_hour;
long end_dweek;
} SEC_time_range_typ;

The SEC_time_range_typ structure has the following fields:

start_min long. Minimum value is zero, maximum is 59.

start_hour long. Minimum value is zero, maximum is 23.

start_dweek long. Minimum value is zero, maximum is 6. Zero indicates


Sunday.

end_min long. Minimum value is zero, maximum is 59.

end_hour long. Minimum value is zero, maximum is 23.

end_dweek long. Minimum value is zero, maximum is 6. Zero indicates


Sunday.

520 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_update_info_typ

SEC_update_info_typ
This structure specifies user or service process information that is updated in
the security database. This structure is one of the input parameters to SEC_
update_info().

typedef struct {
unsigned short info_typ;
union {
SEC_update_usr_info_typ update_usr;
SEC_update_service_info_typ update_service;
} u;
} SEC_update_info_typ;

The SEC_update_info_typ structure has the following fields:

info_typ unsigned short. Specifies the type of update information. The


value must be either SEC_INFOTYPE_USER or SEC_
INFOTYPE_SERVICE_PROCESS.

update_usr SEC_update_usr_info_typ. This field is meaningful if info_typ


is SEC_INFOTYPE_USER. The SEC_update_usr_info_typ
structure contains one or more pieces of update information
about a user.

update_service
SEC_update_service_info_typ. This field is meaningful if
info_typ is SEC_INFOTYPE_SERVICE_PROCESS. The
SEC_update_service_info_typ structure contains one or
more pieces of update information about a server process.

See Also
“SEC_update_service_info_typ” on page 523

“SEC_update_usr_info_typ” on page 526

December 1996 WAL for Windows Programmer’s Reference Manual 521


6 Data Types and Structures
SEC_update_service_data_typ

SEC_update_service_data_typ
This structure contains update information about a service process.

typedef struct {
unsigned short serv_choice;
union {
ASE_service_name_typ usr_name;
char passwd [SCT_maxpasswordlength];
} u;
} SEC_update_service_data_typ;

The SEC_update_service_data_typ structure has the following fields:

serv_choice unsigned short. Specifies the type of information to be


updated. This value must be one of SEC_UPDATE_
SVCPRCS_NAME or SEC_UPDATE_SVCPRCS_
PASSWORD.

usr_name ASE_service_name_typ (NCH_ObjectName). Specifies the


name of the service process. This field is only meaningful if
serv_choice is SEC_UPDATE_SVCPRCS_NAME.

passwd char. Specifies the new password of the service process. This
field is only meaningful if serv_choice is SEC_UPDATE_
SVCPRCS_PASSWORD.

See Also
“ASE_service_name_typ” on page 178

522 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_update_service_info_typ

SEC_update_service_info_typ
This structure contains update information about a server process.

typedef struct {
unsigned short num_service;
SEC_update_service_data_typ * service_data;
} SEC_update_service_info_typ;

The SEC_update_service_info_typ structure has the following fields:

num_service unsigned short. The number of elements in the service_data


list. Each element represents a piece of information about the
service process that is to be updated.

service_data SEC_update_service_data_typ *. A list of update information


about a service process.

See Also
“SEC_update_service_data_typ” on page 522

December 1996 WAL for Windows Programmer’s Reference Manual 523


6 Data Types and Structures
SEC_update_typ

SEC_update_typ
typedef unsigned long SEC_update_typ;

SEC_update_typ has the following defined constants:

SEC_UPDATE_USER_PASSWORD 0 (unsigned short)


SEC_UPDATE_USER_LANGUAGE 1 (unsigned short)
SEC_UPDATE_USER_PRIMARY 2 (unsigned short)
SEC_UPDATE_USER_FORLOGIN 3 (unsigned short)
SEC_UPDATE_SVCPRCS_NAME 4 (unsigned short)
SEC_UPDATE_SVCPRCS_PASSWORD 5 (unsigned short)

524 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_update_usr_choice_typ

SEC_update_usr_choice_typ
This structure contains update security information about a user.

typedef struct {
unsigned short choice_type;
union {
char passwd[SCT_maxpasswordlength];
unsigned short language;
ASE_service_name_typ primary;
FN_BOOL for_login;
} u;
} SEC_update_usr_choice_typ;

The SEC_update_usr_choice_typ structure has the following fields:

choice_type unsigned short. Specifies the type of information. Can be one


of the following:
SEC_UPDATE_USER_PASSWORD SEC_UPDATE_USER_
LANGUAGE SEC_UPDATE_USER_PRIMARY
SEC_UPDATE_USER_FORLOGIN

passwd char. The new password. This field is only meaningful if


choice_type is SEC_UPDATE_USER_PASSWORD.

language unsigned short. Specifies the new primary language of the


user. This field is only meaningful if choice_type is SEC_
UPDATE_USER_LANGUAGE.

primary ASE_service_name_typ (NCH_ObjectName). Specifies the


new primary group to which this user belongs. This field is
only meaningful if choice_type is SEC_UPDATE_USER_
PRIMARY.

for_login FN_BOOL. Specifies whether the user is allowed to log in.


This field is only meaningful if choice_type is SEC_UPDATE_
USER_FORLOGIN.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 525


6 Data Types and Structures
SEC_update_usr_info_typ

SEC_update_usr_info_typ
This structure specifies the user information that is to be updated.

typedef struct {
ASE_service_name_typ usr_name;
unsigned short num_usr_choices;
SEC_update_usr_choice_typ * usr_choices;
} SEC_update_usr_info_typ;

The SEC_update_usr_info_typ structure has the following fields:

usr_name ASE_service_name_typ (NCH_ObjectName). The name of


the user whose security information is to be update.

num_usr_choices
unsigned short. The number of elements in the list usr_
choices. Each element represents specific user information
to be updated.

usr_choices SEC_update_usr_choice_typ *. A list of security information


about the user that is to be updated in the security database.

See Also
“ASE_service_name_typ” on page 178

“SEC_update_usr_choice_typ” on page 525

526 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
SEC_user_info_typ

SEC_user_info_typ
This structure specifies user information to be added to the security database.
SEC_add_info() uses this structure.

typedef struct {
ASE_service_name_typ usr_name;
char passwd[SCT_maxpasswordlength];
unsigned short usr_language;
ASE_service_name_typ usr_primary_group;
unsigned short usr_for_login;
} SEC_user_info_typ;

The SEC_user_info_typ structure has the following fields:

usr_name ASE_service_name_typ (NCH_ObjectName). The name of


the user.

passwd char. The unencrypted password of this user.

usr_language unsigned short. The primary language of this user.

usr_primary_group
ASE_service_name_typ (NCH_ObjectName). The primary
group to which this user belongs.

usr_for_login unsigned short. A Boolean flag denoting whether the user is


allowed to login. TRUE indicates that the user is allowed to
log in; FALSE means the user is not allowed to log in.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 527


6 Data Types and Structures
SEC_usr_member_info_typ

SEC_usr_member_info_typ
This structure specifies user membership information. SEC_add_info() uses
this information.

typedef struct {
ASE_service_name_typ usr_name;
unsigned short num_mbr;
ASE_service_name_typ * mem_list;
} SEC_usr_member_info_typ;

The SEC_usr_member_info_typ structure has the following fields:

usr_name ASE_service_name_typ (NCH_ObjectName). The name of a


group that is to have members added to it.

num_mbr unsigned short. The number of elements in the membership


list mem_list.

mem_list ASE_service_name_typ (NCH_ObjectName) *. A list of


member names to be added. A member for users is a group
to which user usr_name belongs.

See Also
“ASE_service_name_typ” on page 178

528 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
TTY_softkey_label

TTY_softkey_label
This structure specifies key information for input to TTY_set_softkeys() call.

typedef struct TTY_softkey_label_struct {


char label[TTY_MAX_SOFTKEY + 1];
byte keystroke;
} TTY_softkey_label;

The TTY_softkey_label structure has the following fields:

label char. Key label (The text appear on the menubar).

keystroke byte. A virtual key code VK_F1 through VK_F12.

December 1996 WAL for Windows Programmer’s Reference Manual 529


6 Data Types and Structures
WQS_delete_typ

WQS_delete_typ
This structure specifies deletion information for a queue entry for input to
WQS_read_queue().

typedef unsigned short WQS_delete_typ;

WQS_delete_typ has the following defined constants:

WQS_delete_none 0 No entry is deleted.


WQS_delete_current 1 Current entry is deleted immediately after the read
queue.
WQS_delete_previous 2 Previous entry is deleted immediately after the read
queue.

530 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQS_dump_handle_typ

WQS_dump_handle_typ
This type is not currently used.

typedef unsigned long WQS_dump_handle_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 531


6 Data Types and Structures
WQS_entry_id_typ

WQS_entry_id_typ
This type specifies an entry in a queue. WQS_read_queue() or WQS_read_
dump() (in the WQSLIB_queue_entry_out_typ structure) return this type. This
type is input for WQS_read_entry(), WQS_delete_entry(), and WQS_update_
entry().

typedef char WQS_entry_id_typ [WQS_ROWID_SIZE + 1];

WQS_ROWID_SIZE is 18.

532 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQS_field_name_typ

WQS_field_name_typ
This type specifies a queue indexing field for input to several WQS and
WQSLIB data structures.

typedef char WQS_field_name_typ [WQS_max_field_name_length + 1];

December 1996 WAL for Windows Programmer’s Reference Manual 533


6 Data Types and Structures
WQS_field_unique_typ

WQS_field_unique_typ
typedef unsigned short WQS_field_unique_typ;

WQS_field_unique_typ has the following defined constants:

WQS_not_invert 0 No field index is maintained.


WQS_invert 1 A field index is maintained.
WQS_unique_invert 2 A unique field index is maintained.

534 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQS_incomplete_spec_typ

WQS_incomplete_spec_typ
typedef unsigned short WQS_incomplete_spec_typ;

WQS_incomplete_spec_typ has the following defined constants:

WQS_incomplete_not_ok 0 Retrieve only completed entries.


WQS_incomplete_ok 1 Retrieve both completed and incompleted entries.
WQS_incomplete_only 2 Retrieve only incompleted entries.

December 1996 WAL for Windows Programmer’s Reference Manual 535


6 Data Types and Structures
WQS_queue_field_typ

WQS_queue_field_typ
This type specifies the data type of a queue indexing field. Several WQS and
WQSLIB data structures use this type.

typedef unsigned short WQS_queue_field_typ;

WQS_queue_field_typ has the following defined constants:

WQS_field_type_number 1 Queue indexing field is of type number.


WQS_field_type_string 2 Queue indexing field is of type string.
WQS_field_type_time 3 Queue indexing field is of type time.
WQS_field_type_selection 4 Queue indexing field is of type selection.
WQS_field_type_document 5 Queue indexing field is of type document.
WQS_field_type_folder 6 Queue indexing field is of type folder.
WQS_field_type_int 7 Queue indexing field is of type integer.
WQS_field_type_date 8 Queue indexing field is of type date.
WQS_field_type_access 9 Not supported yet.
WQS_field_type_boolean 10 Queue indexing field is of type boolean.
WQS_field_type_null 11 For NULL value.

536 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQS_queue_handle_typ

WQS_queue_handle_typ
This type is not currently used.

typedef unsigned long WQS_queue_handle_typ;

December 1996 WAL for Windows Programmer’s Reference Manual 537


6 Data Types and Structures
WQS_queue_name_typ

WQS_queue_name_typ
This type specifies the name of a WorkFlo queue. This type is returned by
WQS_get_queue_name() and used as input to several other functions.

typedef char WQS_queue_name_typ [WQS_max_name_length + 1];

538 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQS_sort_order_typ

WQS_sort_order_typ
This type specifies the sort order of query results. The WQSLIB_fetch_spec_
typ structure uses this type for input.

typedef unsigned short WQS_sort_order_typ;

WQS_sort_order_typ has the following defined constants:

WQS_ascending_order 0 Entries are sorted in ascending order.


WQS_descending_order 1 Entries are sorted in descending order.

December 1996 WAL for Windows Programmer’s Reference Manual 539


6 Data Types and Structures
WQS_status_spec_typ

WQS_status_spec_typ
This type specifies a search condition based on the status of a field. The
WQSLIB_fetch_spec_typ structure uses this type as input.

typedef unsigned short WQS_status_spec_typ;

WQS_status_spec_typ has the following defined constants:

WQS_busy_not_ok 0 Reads only non-busy entries.


WQS_busy_ok 1 Reads any entries (even if the entry’s status is set to
busy).
WQS_busy_must_be_set 2 The busy field of the entry must be set.

540 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQS_sys_field_name_typ

WQS_sys_field_name_typ
This type specifies the name of a system indexing field.

typedef unsigned short WQS_sys_field_name_typ;

WQS_sys_field_name_typ has the following defined constants:

WQS_sys_field_pri 0 To specify the priority.


WQS_sys_field_status 1 To specify the status.
WQS_sys_field_delaytime 2 To specify the delay time.
WQS_sys_field_timeout 3 To specify the timeout period.
WQS_sys_field_userid 4 To specify the user id.
WQS_sys_field_groupid 5 To specify the group id.
WQS_sys_field_entrytime 6 To specify the entry time.

December 1996 WAL for Windows Programmer’s Reference Manual 541


6 Data Types and Structures
WQS_user_field_desc_typ

WQS_user_field_desc_typ
This structure contains the client’s view of the definition of a user-defined field.

typedef struct {
WQS_field_name_typ fld_name;
WQS_queue_field_typ fld_type;
unsigned short fld_length;
unsigned short fld_unique;
FN_BOOL fld_required;
FN_BOOL fld_rendev;
FN_BOOL fld_display;
} WQS_user_field_desc_typ;

The WQS_user_field_desc_typ structure has the following fields:

fld_name WQS_field_name_typ. Name of the field, up to 18 characters


in length.

fld_type WQS_queue_field_typ. Type of the field. Can be one of the


following: number, string, time, selection, document, folder,
integer, date, boolean, or access.

fld_length unsigned short. The length of the field in bytes. Meaningful


only if fld_type is string.

fld_unique unsigned short. Can be one of the following: WQS_not_


invert, WQS_invert, or WQS_unique_invert. If a field is
inverted or unique-inverted, then the entries can be retrieved
in ascending or descending order based on the content of the
field.

fld_required FN_BOOL. A boolean indicating whether a value must be


supplied for the field when an entry is inserted into an
ordinary queue. Note that the value specified for a field can
be the NULL value.

fld_rendev FN_BOOL. A boolean indicating whether the field is a


rendezvous field. Only one field can be designated as the
rendezvous field.

fld_display FN_BOOL. A boolean indicating whether the content of the


field is to be displayed in a retrieval.

542 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQS_user_field_desc_typ

See Also
“WQS_field_name_typ” on page 533

“WQS_queue_field_typ” on page 536

December 1996 WAL for Windows Programmer’s Reference Manual 543


6 Data Types and Structures
WQS_workspace_name_typ

WQS_workspace_name_typ
This type specifies the name of a WorkFlo workspace. To create a workspace,
use WQS_create_workspace().

typedef char WQS_workspace_name_typ [WQS_max_name_length + 1];

544 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQSLIB_fetch_spec_typ

WQSLIB_fetch_spec_typ
This structure contains the search conditions for a retrieval request. Search
conditions can be specified for the system-defined fields as well as the user-
defined fields. The search conditions are ANDed together to form a query.
The result of the retrieval can be ordered according to the content of a field (or
fields) that is declared as inverted or unique-inverted.

typedef struct {
FN_time_typ deadline;
unsigned short min_priority;
unsigned short max_priority;
char group_name[SCT_maxnamelength + 1];
char user_name[SCT_maxnamelength + 1];
WQS_status_spec_typ status_spec;
FN_BOOL even_delayed;
WQS_incomplete_spec_typ incomplete_spec;
FN_BOOL check_user;
unsigned short num_find_fields;
HANDLE find_fields_h;
HANDLE string_val_h;
WQS_field_name_typ sort_field;
WQS_sort_order_typ sort_order;
} WQSLIB_fetch_spec_typ;

The WQSLIB_fetch_spec_typ structure has the following fields:

deadline FN_time_typ. Specifies a search on the time_out field. Only


those entries with a time_out value smaller than deadline will
qualify to be included in the retrieval result. Note that a
deadline value of FN_UNDEF_DATE implies that all entries
will satisfy this deadline condition.

min_priority unsigned short. Specifies a search on the priority field. Only


those entries with a priority field value greater than or equal
to min_priority will qualify to be included in the retrieval result.

max_priority unsigned short. Specifies a search on the priority field. Only


those entries with a priority field value less than or equal to
max_priority will qualify to be included in the retrieval result.

group_name char. Specifies a search on the group_name field. If group_


name is specified and user_name is not, then all members of
the group will qualify.

December 1996 WAL for Windows Programmer’s Reference Manual 545


6 Data Types and Structures
WQSLIB_fetch_spec_typ

user_name char. Specifies a search on the user_name field. If non-


NULL, then only those entries with the user_name field
matching the value specified here will qualify to be included in
the retrieval result.

status_spec WQS_status_spec_typ. Specifies a search on the sf_status


field of the union structure WQSLIB_sys_field_value_typ.
The status_spec can be one of the following:
WQS_busy_ok
WQS_busy_not_ok
WQS_busy_must_be_set

If WQS_busy_ok is specified, then all entries in the queue will


qualify. If WQS_busy_not_ok is specified, then only those
entries with the status field set to FALSE will qualify. If WQS_
busy_must_be_set is specified, then only those entries with
the status field set to TRUE will qualify.

even_delayed FN_BOOL. Specifies a search on the delay_time field. If this


value is FALSE, then only those entries with a delay_time
value smaller than the time of the retrieval will qualify.

incomplete_spec
WQS_incomplete_spec_typ. If this value is TRUE, then only
those entries for which all the required fields have values will
qualify. Note that if a required field is explicitly set to the NULL
value, then incomplete must be TRUE in order for the entry to
be included in the match set.

check_user FN_BOOL. If this value is TRUE, then the credentials of the


logged on user attempting the retrieval will be verified against
those specified in the content_access field.

num_find_fields
unsigned short. Specifies the number of user-defined fields
that must be searched.

find_fields_h HANDLE. Handle to array of num_find_fields (WQSLIB_


user_field_value_typ).

string_val_h HANDLE. See the description of qf_string_offset in WQSLIB_


queue_field_choice_typ.

sort_field WQS_field_name_typ. Specifies that the retrieval result will


be ordered according to the content of this field.

546 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQSLIB_fetch_spec_typ

If sort_field is NULL, the retrieval result will be ordered


according to a combination of the priority and entry_time, the
entry that has the highest priority and earliest entry_time will
be returned first.

sort_order WQS_sort_order_typ. Specifies whether the retrieval result is


ordered in ascending or descending order of the content of
the sort_field. This field is meaningful only if sort_field is non-
NULL.

See Also
“FN_time_typ” on page 264

“WQS_field_name_typ” on page 533

“WQS_incomplete_spec_typ” on page 535

“WQS_sort_order_typ” on page 539

“WQS_status_spec_typ” on page 540

December 1996 WAL for Windows Programmer’s Reference Manual 547


6 Data Types and Structures
WQSLIB_queue_desc_typ

WQSLIB_queue_desc_typ
This structure contains the client’s view of a queue definition. The structure is
a collection of header information and user-defined definitions.

typedef struct {
WQS_workspace_name_typ workspace_name;
WQS_queue_name_typ queue_name;
SCT_access_restrictions desc_acc;
SCT_access_restrictions content_acc;
char text_desc[WQS_max_text_desc_length + 1];
unsigned short num_fields;
WQS_user_field_desc_typ user_field_desc[1];
} WQSLIB_queue_desc_typ;

The WQSLIB_queue_desc_typ structure has the following fields:

workspace_name
WQS_workspace_name_typ. Name of the workspace, up to
14 characters in length. Each queue logically belongs to one,
and only one, workspace.

queue_name WQS_queue_name_typ. Name of the queue, up to 14


characters in length. Queues in the same workspace must
have unique names.

desc_acc SCT_access_restrictions. Credentials of users or group of


users who can access the description of the queue.

content_acc SCT_access_restrictions. Credentials of users or group of


users who can access the queue entries.

text_desc char. The text description of the queue.

num_fields unsigned short. Number of user field descriptions in user_


field_desc.

user_field_desc
WQS_user_field_desc_typ. A list of user field descriptions.
num_fields specifies the number of items in the list.

548 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQSLIB_queue_desc_typ

See Also
“SCT_access_restrictions” on page 481

“WQS_queue_name_typ” on page 538

“WQS_user_field_desc_typ” on page 542

“WQS_workspace_name_typ” on page 544

December 1996 WAL for Windows Programmer’s Reference Manual 549


6 Data Types and Structures
WQSLIB_queue_entry_in_typ

WQSLIB_queue_entry_in_typ
This structure contains the description of an entry to be inserted into a queue.

typedef struct {
unsigned short num_user_fields;
HANDLE user_field_val_h;
HANDLE string_val_h;
unsigned short num_sys_fields;
HANDLE sys_field_val_h;
} WQSLIB_queue_entry_in_typ;

The WQSLIB_queue_entry_in_typ structure has the following fields:

num_user_fields
unsigned short. The number of user-defined fields depicted in
this record. Note that the value of num_user_fields is not
necessarily the same as the number of fields defined for the
queue. This can be because a non-required field does not
have a value specified or the queue is a rendezvous type
queue.

user_field_val_h
HANDLE. Handle to array of num_user_fields WQSLIB_
user_field_value_typ.

string_val_h HANDLE. See description of qf_string_offset in WQSLIB_


queue_field_choice_typ.

num_sys_fields
unsigned short. The number of system-defined fields
depicted in this record.

sys_field_val_h
HANDLE. Handle to array of num_sys_fields WQSLIB_sys_
field_value_typ.

550 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQSLIB_queue_entry_out_typ

WQSLIB_queue_entry_out_typ
This structure contains the description of an entry retrieved from a queue.

typedef struct {
unsigned short num_user_fields;
HANDLE user_field_val_h;
HANDLE string_val_h;
unsigned short num_sys_fields;
HANDLE sys_field_val_h;
WQS_entry_id_typ entry_id;
} WQSLIB_queue_entry_out_typ;

The WQSLIB_queue_entry_out_typ structure has the following fields:

num_user_fields
unsigned short. The number of user-defined fields in this
entry. This value is the same as the number of user-fields
defined for the queue.

user_field_val_h
HANDLE. Handle to array of num_user_fields WQSLIB_
user_field_value_typ.

string_val_h HANDLE. See description of qf_string_offset in WQSLIB_


queue_field_choice_typ.

num_sys_fields
unsigned short. The number of system-defined fields in this
entry. This value is a constant and, as of the time of this
writing, is equal to 7.

sys_field_val_h
HANDLE. Handle to array of num_sys_fields WQSLIB_sys_
field_value_typ.

entry_id WQS_entry_id_typ. The identification of the queue entry.


This entry_id is valid for the duration of the service logon, and
is meaningless outside of the service logon. Therefore, an
entry_id must be discarded once the service logon
terminates.

See Also
“WQS_entry_id_typ” on page 532

December 1996 WAL for Windows Programmer’s Reference Manual 551


6 Data Types and Structures
WQSLIB_queue_field_choice_typ

WQSLIB_queue_field_choice_typ
typedef struct {
WQS_queue_field_typ qf_type;
union {
unsigned short qf_string_offset;
FN_selection_typ qf_sel_value;
FP_number qf_number_value;
long int qf_int_value;
FN_time_typ qf_time_value;
FN_date_typ qf_date_value;
ASE_doc_id_typ qf_docid_value;
ASE_folder_id_typ qf_folderid_value;
unsigned short qf_bool_value;
} val;
} WQSLIB_queue_field_choice_typ;

The WQSLIB_queue_field_choice_typ structure has the following fields:

qf_type WQS_queue_field_typ. Data type of the user-defined queue


field.

qf_string_offset
unsigned short. For string fields, qf_string_offset contains the
offset of the actual field data in the buffer referenced through
string_val_h in WQSLIB_queue_entry_in_typ, WQSLIB_
queue_entry_out_typ, and WQSLIB_fetch_spec_typ. Each
string in the buffer is NULL-terminated, and has maximum
length WQS_max_string_field_length not including the
terminating NULL character.

qf_sel_value FN_selection_typ. Value of a selection field.

qf_number_value
FP_number. Value of a number field.

qf_int_value long int. Value of a integer field.

qf_time_value
FN_time_typ. Value of a time field.

qf_date_value
FN_date_typ. Value of a date field.

552 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQSLIB_queue_field_choice_typ

qf_docid_value
ASE_doc_id_typ. Value of a document ID field.

qf_folderid_value
ASE_folder_id_typ. Value of a folder ID field.

qf_bool_value
unsigned short. Value of a boolean field.

See Also
“ASE_doc_id_typ” on page 164

“ASE_folder_id_typ” on page 166

“FN_date_typ” on page 259

“FN_selection_typ” on page 262

“FN_time_typ” on page 264

“FP_number” on page 349

“WQS_queue_field_typ” on page 536

December 1996 WAL for Windows Programmer’s Reference Manual 553


6 Data Types and Structures
WQSLIB_sys_field_value_typ

WQSLIB_sys_field_value_typ
This structure represents the content of a system-defined field in a queue_
entry.

typedef struct {
WQS_sys_field_name_typ sys_field_name;
union {
unsigned short sf_pri;
FN_BOOL sf_status;
char sf_group_name[SCT_maxnamelength + 1];
char sf_user_name[SCT_maxnamelength + 1];
FN_time_typ sf_entry_time;
FN_time_typ sf_delay_time;
FN_time_typ sf_timeout;
} val;
} WQSLIB_sys_field_value_typ;

The WQSLIB_sys_field_value_typ structure has the following fields:

sys_field_name
WQS_sys_field_name_typ. Name of the field, which can be
one of the following: priority, status, user name, group name,
entry time, delay time, or timeout.

sf_pri unsigned short. The priority.

sf_status FN_BOOL. The status.

sf_group_name
char. The group name.

sf_user_name char. The user name.

sf_entry_time FN_time_typ. The entry time.

sf_delay_time FN_time_typ. The delay time.

sf_timeout FN_time_typ. The timeout period.

See Also
“FN_time_typ” on page 264

“WQS_sys_field_name_typ” on page 541

554 WAL for Windows Programmer’s Reference Manual December 1996


6 Data Types and Structures
WQSLIB_user_field_value_typ

WQSLIB_user_field_value_typ
This structure specifies the content of a user-defined field in a queue entry.

typedef struct {
WQS_field_name_typ field_name;
WQSLIB_queue_field_choice_typ field_value;
} WQSLIB_user_field_value_typ;

The WQSLIB_user_field_value_typ structure has the following fields:

field_name WQS_field_name_typ. The name of the field.

field_value WQSLIB_queue_field_choice_typ. The content of the field.


The content will be interpreted by Queue Services according
to the type of the field.

See Also
“WQS_field_name_typ” on page 533

“WQS_queue_field_typ” on page 536

December 1996 WAL for Windows Programmer’s Reference Manual 555


6 Data Types and Structures
WQSLIB_user_field_value_typ

556 WAL for Windows Programmer’s Reference Manual December 1996


7
7WAL Function Reference

The first section of this chapter briefly describes the functions included in
each library.

The remainder of the chapter provides an alphabetically-arranged reference


to all of the WAL functions. This reference describes each function, its syntax,
and each of the function’s parameters. If the function is used in one of the
sample applications provided with the WAL for Windows SDK, this is also
indicated. We include a list of errors returned.

Function Overview
Large libraries, such as the IAFLIB and Forms libraries, are grouped
functionally.

For information on data types, data structures, and constants used in these
functions, see Chapter 6, “Data Types and Structures,” on page 163.

Note The current WAL for Windows SDK release supports a subset of the function
protocols in the include files. If you have questions about undocumented
function protocols that are in the include files, please consult with FileNet
support before you use them.

Archive Functions
The following function allows a client to archive files to the FileNet system.

ARCH_DocEntry()
This function provides a high-level interface by which to create
archive documents in batches of one document at a time.

December 1996 WAL for Windows Programmer’s Reference Manual 557


7 WAL Function Reference
BATCHLIB Functions

BATCHLIB Functions
These functions provide a high-level interface with the BES functions. For
more information on BES functions, see “BES Functions (Batch Entry
Services)” on page 559.

BATCHLIB_BatchAbort()
This causes the batch entry in progress to be aborted. It deletes the
batch.

BATCHLIB_BatchEntry()
This provides an all-in-one user-interface for the BES functions. It
returns a handle to a batch entry status structure.

BATCHLIB_commit_files()
This commits an array of DOS files into a FileNet system as a single
document.

BATCHLIB_commit_file_list()
The use and interface of this function are similar to BATCHLIB_
commit_files(). It is easier to call from a third party application (e.g.,
WINWORD.EXE) through a Dynamic Link Library (DLL).

BATCHLIB_enqueue_batch()
This opens the batch, enqueues the named batch in the selected
queue, and closes the batch.

BATCHLIB_find_batch_docs()
This finds one or more document descriptors.

BATCHLIB_find_batch_images()
This opens the batch, returns an array of image descriptors, and
closes the batch.

BATCHLIB_find_batches()
This returns batch headers that match the specified filter.

BATCHLIB_get_batch_object()
This retrieves the object from the Batch Entry Service and places it in
a file in the PC’s local cache.

558 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES Functions (Batch Entry Services)

BATCHLIB_update_batch()
This updates the dynamic batch header for the named batch.

BATCHLIB_update_batch_doc()
This updates a previously-created document.

BES Functions (Batch Entry Services)


The Batch Entry Services library provides document entry-related services to
its clients in a batch oriented fashion. Calls are provided to create, validate,
enqueue, retrieve, and delete batches of documents. This set also provides
functions for adding images to batches, incorporating these images into
documents, and validating certain conditions on documents and images.

BESLIB calls are direct interfaces to FileNet’s Batch Entry Services. If an


application can accomplish its task via BATCHLIB calls (see below), we
recommend not using BESLIB calls, which place more rigorous constraints on
the programmer.

Session Control Functions


BES_logoff()
This terminates a Batch Entry Services session and invalidates a
session on the server.

BES_logon()
This establishes a Batch Entry Service session and returns a number
that identifies the session to the client.

BES_renew()
This has been obsolete since release 3.1.

Batch Functions
BES_alloc_batch_name()
This generates a unique batch name.

BES_alloc_ids()
This acquires a block of unique integers to be used as image
identifiers.

BES_close_batch()
This closes a specified batch.

December 1996 WAL for Windows Programmer’s Reference Manual 559


7 WAL Function Reference
BES Functions (Batch Entry Services)

BES_commit_batch_now()
This synchronously commits a batch.

BES_create_batch()
This creates a batch with the specified name (and associated with the
specified document class name).

BES_delete_batch()
This deletes all state information related to a previously-opened
batch.

BES_dequeue_batch()
This opens the batch at the head of the committal queue.

BES_enqueue_batch()
This places a previously-opened batch into the specified queue. It is
typically used for asynchronous committals.

BES_find_batches()
This returns batch headers that match the specified filter.

BES_open_batch()
This provides exclusive update privileges to a specified batch.

BES_sync_commit()
This commits the batch synchronously. Control is returned to the user
after the committal. If the page cache is full, this call returns a CSM_
no_resources error.

BES_update_batch()
This updates certain fields in the dynamic batch header.

Image Functions
BES_abort_image()
This aborts the current image transaction, and removes the image if
the transaction was started with a create.

BES_close_image()
This attempts to commit the image transaction.

BES_close_csum_image()
This attempts to commit the image transaction with checksum
information.

560 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES Functions (Batch Entry Services)

BES_create_image()
This creates an image in the cache, and leaves it open for
subsequent reads and writes.

BES_delete_image()
This deletes the image descriptor associated with the specified image
and frees space occupied by the image data.

BES_find_images()
This returns an array of image descriptors.

BES_move_image()
This moves an unassembled image from one batch to another within
the same server.

BES_open_image()
This opens the specified image for read-only (no writing or update)
and returns the associated image descriptor record.

BES_read_image()
This reads a specified number of bytes from an image in which there
is a current transaction.

BES_read_whole_image()
This reads a whole image from BES cache into PC local cache.

BES_update_image()
This updates the image attributes and leaves the image open for
subsequent reads or writes.

BES_verify_image()
This updates the image verification status in the image descriptor
record associated with the specified image.

BES_write_image()
This writes a specified number of bytes to an image.

Index Functions
BES_query_index_dir()
This retrieves the directory of indices associated with the specified
batch.

BES_update_index_total()
This updates the batch total for the specified index.

December 1996 WAL for Windows Programmer’s Reference Manual 561


7 WAL Function Reference
BES Functions (Batch Entry Services)

Document Functions
BES_create_doc()
This assembles a document from images and indices.

BES_delete_doc()
This deletes a document.

BES_find_docs()
This finds one or more document descriptors.

BES_update_doc()
This updates a previously-created document.

Miscellaneous BES Functions


BES_client_register()
This allows you to use the IMS 3.1 batch dynamic header defined in
BES_dyn_hdr_desc_typ.

BES_create_image_index()
This creates the index data associated with a specified image.

BES_delete_image_index()
This deletes the index data associated with a specified image.

BES_get_image_index()
This retrieves indexing information associated with a specified image.

BES_get_info()
This retrieves the additional information associated with a batch, a
document in a batch, an image in a batch, an index type associated
with the class of a batch, or an index value associated with a specific
document of a batch. This information is added by the BES_put_info()
function.

BES_get_num_cluster_id()
This computes the cluster ID for a key of type FP_number. After the
calculation, the cluster ID is returned as three unsigned short
integers. This function returns NULL.

BES_get_str_cluster_id()
This computes the cluster ID for a key of type LPSTR. After the
calculation, cluster ID is returned as three unsigned short integers.
This function returns NULL.

562 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CAM Functions

BES_modify_image_index()
This modifies the index data associated with a specified image.

BES_put_info()
This enables the client to associate additional information with a
batch record, a batch document record, a batch image record, a
batch class index type record, or a batch document index value
record.

CAM Functions
The F3CAM DLL contains the PCWS local cache manager. FileNet images
reside in this file-based cache when retrieved with the IAFLIB_get_object()
call.

CAM_add_file()
This writes out the retrieved object to a file in the cache.

CAM_delete_file()
This deletes a file that holds a page of a document from the local
cache.

CAM_exit()
Each application that uses CAM calls this once, when terminating or
ending the Windows session.

CAM_find_file()
This checks whether a document or image exists in the cache.

CAM_get_attr()
This gets an attribute of a local cache object.

CAM_init()
Each application that uses CAM calls this once, during initialization.

CAM_set_attr()
This sets an attribute of a local cache object.

CSM Functions
The F3CSMLIB DLL contains Cache Services Manager functions.

CSM_close_object()
This closes an object in the server cache.

December 1996 WAL for Windows Programmer’s Reference Manual 563


7 WAL Function Reference
CS Functions

CSM_delete_object()
This deletes the specified object from the server cache.

CSM_logoff()
This closes a connection to the Cache Services Manager.

CSM_logon()
This establishes a connection to the Cache Services Manager.

CSM_modify_object()
This changes the attributes of an object in the server cache.

CSM_open_object()
This opens an object in the server cache.

CSM_read_object()
This reads data from an object in the server cache.

CSM_renew()
This re-establishes a connection to the Cache Services Manager
when a disconnect occurred without logoff.

CS Functions
The F3CS DLL contains one function to compute the checksum of an object.

CS_compute_csum()
This computes the checksum of an object.

DISPLIB Functions
The F3DISPLB DLL contains functions that display and manipulate images.

DISPLIB_close_object()
This closes any FileNet banded image file opened by DISPLIB_get_
band_bitmap().

DISPLIB_free_handle()
This returns memory allocated for the DISPLIB context handle
obtained from a prior call to DISPLIB_init_handle().

DISPLIB_free_object()
This frees an object previously registered with the DISPLIB_register_
object() call.

564 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB Functions

DISPLIB_get_attr()
This retrieves the specified attribute for a currently-registered object.

DISPLIB_get_band_bitmap()
This frees a Windows bitmap object that contains the requested band
in a format suitable for use in a SelectObject, BitBlt sequence of GDI
calls.

DISPLIB_get_format()
This returns the format of a specified object.

DISPLIB_init_handle()
This allocates memory for a DISPLIB context and returns a handle.

DISPLIB_paint_bitmap()
This paints a bitmap into the output display context using a paint
structure and the specified parameters.

DISPLIB_paint_object()
This paints an object into an output device context.

DISPLIB_register_object()
This registers an object for subsequent DISPLIB_paint_object() calls
by causing the header to be read and any structures to be initialized
for subsequent optimized paints.

DISPLIB_retrieve_typ()
This is a callback to retrieve a committed FileNet banded image.

DISPLIB_set_attr()
This sets attributes for the currently-registered object.

DISPLIB_set_retrieval()
This sets the retrieval callback for subsequent DISPLIB_paint_
object() calls.

DISPLIB_stretch_bitmap()
This paints a bitmap (must be less than 64K) into the output device
context at a specified location.

DISPLIB_yield_typ()
This is a callback function supplied to the DISPLIB_paint_object() call
to provide a mechanism by which the caller yields the CPU between
processing of bands of data.

December 1996 WAL for Windows Programmer’s Reference Manual 565


7 WAL Function Reference
DTM Functions

DTM Functions
The Date/Time Manager (DTM) functions comprise the F3DTM DLL.

DTM_addtime()
This adds two time values.

DTM_asctime()
This converts a date to a string using the specified mask.

DTM_ctime()
This converts a date or time to a string using the specified mask.

DTM_date()
This converts the system time to a date string using the specified
mask.

DTM_ftime()
This returns the current date or time.

DTM_getdate()
This converts a string to a date.

DTM_getmask()
This returns the system date or time mask.

DTM_getmasklength()
This returns the maximum length of a string formatted with the
specified mask.

DTM_gmtime()
This converts a date or time value to date format representing the
equivalent Greenwich mean time.

DTM_gp()
This converts a date value to a date number.

DTM_gtime()
This converts a date or time string to a number.

DTM_localtime()
This converts a date number to date format (local time).

DTM_stime()
This sets the system (current) time from a date number.

566 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ERM Functions

DTM_subdate()
This subtracts one time period from another.

DTM_subtime()
This subtracts one time period from another.

DTM_time()
This converts the system (current) time to a date number.

DTM_verifymask()
This checks whether an input mask is valid.

ERM Functions
The F3ERM DLL contains functions that retrieve and display text messages
associated with FileNet error tuples. The message database is contained in
the PCWS-resident disk files ERM.DAT (data) and ERM.IDX (index).

ERM_display_error()
This displays a message box that contains the error tuple, the text (if
found), and a hand icon, captioned with the application name and
containing an OK button.

ERM_get_error()
This returns a string containing the message text for an error tuple.

ERM_log_error()
This searches the error message index file (ERM.IDX) for a matching
tuple. It logs the error message in a log file and displays it, if desired.

ERM_log_event()
This is the primary function for logging messages. It formats the
string, then passes the string to erm_log_message(), which appends
a time stamp and sends the message to be written.

December 1996 WAL for Windows Programmer’s Reference Manual 567


7 WAL Function Reference
FILLIN Functions

FILLIN Functions
The FILLIN functions enable a client to fill in, commit, and print a FileNet form.

FILLIN_bkg_commit()
This enqueues a fill-in request in the background process queue (if
background processing is enabled in the configuration file). The form
will be committed in FileNet PC Form format.

FILLIN_bkg_commit_image()
This enqueues a fill-in request in the background process queue (if
background processing is enabled in the configuration file). The form
will be committed in Group III banded image format.

FILLIN_commit()
This generates and commits the fill-in page for the form. The form will
be committed in FileNet PC Form format.

FILLIN_commit_image()
This generates and commits the fill-in page for the form. The form will
be committed in Group III banded image format.

FILLIN_do_form()
This synchronously executes a form.

FILLIN_get_doc_class()
This gets the name of a document class from the user.

FILLIN_get_form_name()
This gets a file name and form name from the user.

FILLIN_index()
This indexes a document using the specified document class.

FILLIN_local_print()
This locally prints an uncommitted fill-in form.

FILLIN_server_print()
This remotely prints an uncommitted fill-in form via Print Services.

568 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN Functions (APPINFO)

FN Functions (APPINFO)
The F3APPINF DLL contains functions that use application information files
and retrieve information from them.

FN_copy_file()
This copies a file.

FN_get_app_info_int()
This returns an integer from the PCWS preferences file.

FN_get_app_info_string()
This copies a character string from the PCWS preferences file into a
buffer.

FN_get_window_pos()
This gets the window position and style from the PCWS preference
file.

FN_set_app_file()
This sets the application information filename, allowing alternate files
to be used.

FN_set_app_info()
This copies a character string into the PCWS preferences file.

FN_set_window_pos()
This saves the position and style of a window to the PCWS
preference file.

FN Functions (INDXFORM)
The F3IDXFRM DLL contains a complete user interface for providing index
values for a document to be committed.

FN_clear_index_form()
This clears an indexing window of field values.

FN_custom_index_form()
This collects and validates indexing information for a document to be
created. It is similar to FN_show_index_form(), but it allows the use of
a pre-defined FormLib form.

December 1996 WAL for Windows Programmer’s Reference Manual 569


7 WAL Function Reference
FNP Functions (Local Printing)

FN_index_form()
This collects and validates indexing information for a document to be
created by displaying an indexing form window. It provides for
backward compatibility.

FN_index_form_exit()
This frees all resources allocated to an index form.

FN_index_form_init()
This allocates and initializes data for an index form.

FN_index_handle_to_text()
This converts a data handle returned from FN_show_index_form() or
FN_custom_index_form() to a text-formatted string of index
descriptions.

FN_index_text_to_handle()
This converts a text-formatted string of index descriptions into a form
suitable for input to FN_show_index_form() or FN_custom_index_
form().

FN_index_verify()
This displays the form window to enable the user to compare the
original index values to those just entered in index verification.

FN_save_index_form()
This saves an index form.

FN_show_index_form()
This collects and validates indexing information for a document to be
created. It is the recommended function for this purpose.

FN_show_new_values_in_form()
This dynamically updates a previously displayed index form.

FNP Functions (Local Printing)


The F3PRINT DLL provides access to local (PC) printing.

FNP_exit()
This deallocates all resources requested by FNPRINT.

FNP_init()
This allocates memory for an FNP_data data structure and fills it with
the corresponding information.

570 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM Functions

FNP_print()
This prints a list of documents.

FNP_print_form_page()
This prints a form page.

FNP_print_from_file()
This prints the FileNet formatted image of a specified file name.

FORM Functions

Initialization Functions
The following functions initialize and terminate the forms library.

FORM_init()
This allocates and initializes data for the session.

FORM_exit()
This frees all the resources allocated to the session.

File Manipulation Functions


These functions use form files.

FORM_find_file()
This finds the specified file using the path specified in LOGON.CFG.

FORM_find_file_in_path()
This finds the specified file using the path specified in the path
parameter.

FORM_find_file_in_path2()
This finds the specified file, using the path specified in the path
parameter, and saves it in the location specified by where_save.

FORM_generate_fill_in_page()
This writes a FileNet FORM page representation of a form to a file.

FORM_generate_one_form_file()
This writes the Forms Language specification of all objects in the
session that belong to file_name and form_name to new_file_name.

December 1996 WAL for Windows Programmer’s Reference Manual 571


7 WAL Function Reference
FORM Functions

FORM_generate_form_file()
Writes to a new file the Forms Language specification of all objects in
a session belonging to an existing file. You can then save this file to
centralized storage for general use.

FORM_generate_image_page()
This writes a FileNet IMAGE page representation of a form to a file.

FORM_generate_pcode_file()
This writes a FileNet P-code stream, including an IMAGE page
representation of a form, to a file.

FORM_get_file_list()
This returns the number of files with which objects are associated and
a handle to the list of filenames.

FORM_get_file_service()
This returns the current file service name that is associated with the
session. FORMLIB uses the service name to locate form files.

FORM_load_file()
This loads the specified file into the session by parsing its contents
and storing the data in the session.

FORM_set_file_service()
This sets the current file service name.

Object Maintenance Functions


These functions maintain objects. Objects can be forms, menus, menu bars,
or validation tables.

FORM_close_object()
This frees the resources associated with an object of type form,
menu, menu bar, or validation table.

FORM_close_volatile_objects()
This closes all objects in the session that are marked as Volatile.

FORM_create_object()
This creates a new object of the specified type and returns a handle
to the object. The object handle returned is required by other
FORMLIB calls.

572 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM Functions

FORM_get_object_attr()
This returns the form attribute for the specified form attribute type.

FORM_get_object_list()
This searches for all objects of the specified type found in the
specified file.

FORM_load_object()
This loads an object defined in a file and returns a handle to the
object.

FORM_set_object_attr()
This sets a form attribute with a specified form attribute type.

Character Map Functions


These functions operate on a form’s character map.

FORM_clear()
This clears the rectangular area specified on the character map for
the specified form.

FORM_get_row_text()
This copies the specified row into a buffer.

FORM_text_out()
This displays data on the specified character map.

Field Manipulation and Maintenance Functions


These functions create, copy, and delete fields in a form. They also set
attributes of fields and return information about them.

FORM_clear_field_value()
This resets a field to an appropriate undefined state.

FORM_clear_form_values()
This resets all input fields in the form to their appropriate undefined
state.

FORM_create_field()
This adds a field of a specified type to a form.

December 1996 WAL for Windows Programmer’s Reference Manual 573


7 WAL Function Reference
FORM Functions

FORM_default_field_value()
This sets the value of the specified input field in a form to its default
value.

FORM_default_form_values()
This sets the value of all input fields in a form to their default values.

FORM_delete_field()
This deletes a field from a form.

FORM_enable_fields()
This enables or disables input fields.

FORM_get_field_attr()
This returns the specified field attribute for the field specified.

FORM_get_field_attr_using_ord()
This returns the specified field attribute for a field specified by its
ordinal value.

FORM_get_field_count()
This returns the count of input fields, display fields, or form fields in a
form.

FORM_get_field_info()
This returns information about a specified field.

FORM_get_field_name()
This returns the name of a field of specified type and order.

FORM_get_last_field()
This returns the name of the last field (if any) visited on the most
recent execution of a form.

FORM_make_groups_contiguous()
This reorders the fields such that all radio buttons within a group are
contiguous.

FORM_set_field_attr()
This sets the specified field attribute for the specified field.

FORM_set_field_attr_using_ord()
This sets the specified field attribute for a field using a specified
ordinal value.

574 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM Functions

FORM_set_field_focus()
This sets the focus on the specified field_name field.

Menu, Menu Bar, and Validation Table Functions


These functions manipulate menu, menu bar, and validation table objects.

FORM_change_menu_item()
This changes an item in a menu.

FORM_get_menu_items()
This returns the number of menu items in a menu and a handle to the
list of menu items.

FORM_set_menu_items()
This replaces the contents of the specified menu with the specified
number of menu items.

FORM_get_menubar_items()
This returns the number of menubar items in a menubar and a handle
to the list of menubar items.

FORM_set_menubar_items()
This replaces the contents of the specified menubar with the specified
number of menubar items.

FORM_get_valtable_items()
This returns the number of table items in a validation table and a
handle to an array of structures representing the items.

FORM_get_one_valtable_item()
This returns a pointer to a single item in the validation table.

FORM_set_vltable_items()
This replaces the contents of a table with a specified number of
validation table items.

FORM_set_one_valtable_item()
This sets a single item in the validation table.

December 1996 WAL for Windows Programmer’s Reference Manual 575


7 WAL Function Reference
FORM Functions

Execute Functions
These functions execute a form and return the terminator that ended the
execution.

FORM_clone_form()
This adds an exact copy of a form to the same session as the original.

FORM_do_form()
This executes a form, displays all the visible features in a window,
accepts user input in the input fields, and calls any validation
functions as appropriate.

FORM_enable_form_window()
This enables or disables the form window.

FORM_escape_form()
This escapes form execution.

FORM_execute_form()
This executes the form associated, displays all the visible features in
a window, accepts user input in the input fields, and calls any
validation functions as appropriate.

FORM_get_terminator()
This returns the terminator (if any) from the most recent execution of
a form.

FORM_paint_in_DC()
This paints a form in the display context.

FORM_show_form()
This displays or updates a form without executing it.

FORM_step_form()
This executes a form, displays all the visible features in a window,
accepts user input in the specified input field, and calls any validation
functions as appropriate.

576 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM Functions

Forms Server Functions


These functions are used to maintain forms saved on the forms server.

FORM_server_copy_file()
This copies a file on centralized storage.

FORM_server_delete_file()
This deletes a file from the centralized storage where it resides.

FORM_server_rename_file()
This renames a file on centralized storage.

FORM_server_retrieve_file()
This retrieves a file from centralized storage.

FORM_server_save_file()
This saves a file on centralized storage.

Forms Box Functions


These functions are used to add and remove items from a listbox and get the
status of a listbox.

FORM_append_item()
This appends a NULL-terminated string to a list in a listbox field or a
combobox field.

FORM_box_add_item()
This adds an item to a listbox or combobox field.

FORM_box_delete()
This deletes an item (or all items) from a listbox or combobox field.

FORM_box_directory()
This adds a list of files from the current directory to a listbox or
combobox field.

FORM_box_find_item()
This finds the first item that matches the specified string.

FORM_box_get_count()
This returns the count of items in a listbox or combobox field.

December 1996 WAL for Windows Programmer’s Reference Manual 577


7 WAL Function Reference
FORM Functions

FORM_box_get_sel()
This returns the current selection in a single-selection listbox or
combobox field.

FORM_box_get_sel_count()
This returns the number of selected items in a listbox or combobox
field.

FORM_box_get_text()
This returns the NULL-terminated string data for the specified item in
a listbox or combobox field.

FORM_box_get_text_len()
This returns the length of the NULL-terminated string data for the
specified item in a listbox or combobox field.

FORM_box_match_item()
This finds the first item that matches the supplied prefix string.

FORM_box_select_list()
This sets or clears a list of items in a multi-selection listbox.

FORM_box_set_default()
This adds an item (or all items) to, or removes an item (or all items)
from, the default value of a multiple-selection listbox.

FORM_box_set_sel()
This sets the current selection in a single-selection listbox or
combobox field.

FORM_install_list()
This associates a list of items with a newly-created field.

Form Rule Functions


These functions are used to add rules to a form and to check a rule
expression.

FORM_add_rule()
This adds a rule to a form.

FORM_add_named_rule()
This adds a named rule to a form.

578 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
Miscellaneous Form Functions

FORM_check_syntax()
This checks the syntax for a rule expression.

FORM_evaluate()
This evaluates a rule expression.

FORM_validate_form()
This performs field and form validation given the handle to a form that
has values.

Miscellaneous Form Functions


These functions perform a variety of operations on forms.

FORM_bind_val_func()
This binds a function to a validation function name for a specific form.

FORM_get_bitmap_handle()
This gets a handle to the bitmap when a bitmap field is created or
modified.

FORM_load_form_from_page()
This reads the FORM language from a file, parses it, and returns a
form handle.

FP Functions
The F3FP DLL contains functions for manipulating floating point numbers.

FP_abs()
This returns the absolute value of a floating point number.

FP_add()
This adds two floating point numbers.

FP_assign()
This assigns the value of one floating point number to another.

FP_dbl2num()
This converts a double to an FP_number.

FP_divide()
This divides one floating point number by another.

December 1996 WAL for Windows Programmer’s Reference Manual 579


7 WAL Function Reference
FP Functions

FP_eql()
This checks whether two floating point numbers are equal.

FP_geq()
This checks whether a floating point number is greater than or equal
to another.

FP_getmode()
This returns the value of the European mode flag.

FP_gtr()
This checks whether one floating point number is greater than
another.

FP_isundef()
This checks whether a floating point number is undefined.

FP_leq()
This checks whether one floating point number is less than or equal to
another.

FP_long2num()
This converts a long to an FP_number.

FP_lss()
This checks whether one floating point number is less than another.

FP_multiply()
This multiplies two floating point numbers.

FP_neg()
This sets a floating point number to the additive inverse of another.

FP_neq()
This checks for inequality between two floating point numbers.

FP_num2dbl()
This converts an FP_number to a double.

FP_num2long()
This converts an FP_number to a long.

FP_num2mask()
This formats a floating point number using the specified mask.

580 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP Functions

FP_num2ora()
This formats a floating point number in Oracle format.

FP_num2sci()
This formats a floating point number in scientific notation.

FP_num2str()
This converts a floating point number to an ASCII string.

FP_num2unslong()
This converts an FP_number to an unsigned long.

FP_ora2num()
This converts an Oracle-formatted floating point number into a
FileNet floating point number.

FP_retsign()
This checks whether a floating point number is positive, zero, or
negative.

FP_round()
This rounds off a floating point number to the specified power of ten.

FP_rounddisp()
This rounds off a floating point number for display.

FP_setmode()
This sets or clears European mode.

FP_setundef()
This sets a floating point number to an undefined value.

FP_str2num()
This converts a string to a floating point number.

FP_subtract()
This subtracts one floating point number from another.

FP_trunc()
This truncates the mantissa of a floating point number.

FP_unslong2num()
This converts an unsigned long to an FP_number.

December 1996 WAL for Windows Programmer’s Reference Manual 581


7 WAL Function Reference
IAFLIB Functions

IAFLIB Functions
IAFLIB functions are the highest layer of interface provided in DLLs. They
reduce complex operations to a single function, such as retrieving a page for
display or performing a query.

Print Functions
IAFLIB_cancel_print()
This cancels print requests.

IAFLIB_FreeAttr2Memory()
This unlocks and frees the memory used by the PRI_printer_attr_typ2
structure.

IAFLIB_FreeRequest2Memory()
This unlocks and frees the memory used by the PRI_request_desc_
typ2 structure.

IAFLIB_FreeStatusMemory()
This unlocks and frees the memory used by the PRI_printer_status_
typ structure.

IAFLIB_get_print_queues()
This retrieves information about print requests presently known to
Print Services.

IAFLIB_get_print_queues2()
This retrieves information about one or more print requests presently
known to the Print Service. Note that this call can only be used with
IMS 3.3.1 or later.

IAFLIB_get_print_service_info()
This returns information about the status of a Print Service along with
information about the status of the individual printers and fax
machines the Print Service controls.

IAFLIB_get_print_service_info1()
This returns information about the status of a Print Service along with
information about the status of the individual printers and fax
machines this Print Service is controlling.

IAFLIB_get_printer_info()
This gets a list of printers for the specified Print Service, and retrieves
attribute information about these printers.

582 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB Functions

IAFLIB_get_printer_info2()
This gets a list of printers for the specified Print Service, and retrieves
attribute information about these printers.

IAFLIB_modify_print()
This modifies print options of a print request.

IAFLIB_print_docs()
This submits a request to print documents or uncommitted images.

IAFLIB_print_docs1()
This submits a request to print documents or uncommitted images.
IAFLIB_print_docs1() provides similar functionality to IAFLIB_print_
docs(), but uses the PRI_print_option_typ2 structure instead of PS_
options_rec_type.

IAFLIB_print_files()
This prints the contents of a DOS file containing standard ASCII text.

IAFLIB_print_files1()
This prints the contents of a DOS file containing standard ASCII text
(for example, a source program listing). IAFLIB_print_files1() provides
similar functionality to IAFLIB_print_files(), but uses the PRI_print_
option_typ2 structure instead of PS_options_rec_type.

Security Functions
IAFLIB_check_membership()
This checks whether the current user is a member of the specified
group.

IAFLIB_check_password()
This checks whether the password is correct.

IAFLIB_get_membership_list()
This returns the names of all the groups to which a user/group
belongs.

IAFLIB_get_security_info()
This retrieves information about a user or group.

IAFLIB_find_system_defaults()
This returns a structure of security configuration settings for IMS 3.1
security services.

December 1996 WAL for Windows Programmer’s Reference Manual 583


7 WAL Function Reference
IAFLIB Functions

IAFLIB_get_user_name()
This returns the NCH name for the user.

IAFLIB_get_user_stats()
This retrieves IMS 3.1 user group, password status, and account
activity information for security management and creating and
changing passwords.

IAFLIB_logon_user()
This validates the name and password by logging on and off of the
IMS.

Display Image Functions


IAFLIB_close_image_file()
This closes a file; used after a sequence of calls to IAFLIB_get_
band_bitmap().

IAFLIB_get_band_bitmap()
This returns a handle to a Windows-style BITMAP object containing
the requested band in a format suitable for use in a SelectObject,
BitBlt call sequence.

IAFLIB_get_file_text()
This extracts text from a TEXT- or a FORM-type page.

IAFLIB_get_object()
This retrieves an object and places it in a file in the PC’s local cache.

IAFLIB_get_object_text()
This extracts text from a TEXT- or FORM-type page.

IAFLIB_paint_bitmap()
This paints a bitmap (in Microsoft format) in a display context using a
PAINTSTRUCT.

IAFLIB_paint_image()
This paints a FileNet image in a display context using a
PAINTSTRUCT.

Query Functions
IAFLIB_continue_query()
This continues a query and gets more matches.

584 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB Functions

IAFLIB_get_single_DIR()
This performs a high-performance, non-interruptible query. Returns a
single document index record retrieved by its ID number.

IAFLIB_query_db()
This performs an Index Database Query. Use IAFLIB_continue_
query() to retrieve further matches from the same query specification.

IAFLIB_terminate_query()
This interrupts a query if a query or continuation is in progress. It
terminates a query if an incomplete query has been made for the
client (which frees up resources on the Index server).

Cache Functions
IAFLIB_create_cache_object()
This creates a cache object with the specified attributes.

IAFLIB_delete_cache_object()
This deletes an object from the cache.

IAFLIB_get_cache_object_attrs()
This retrieves object attributes from a Cache Service.

IAFLIB_move_cache_object()
This copies or moves a cache object to the specified cache.

IAFLIB_put_object()
This writes data to a cache object, which must already exist, or
updates the object's attributes, or both.

IAFLIB_resize_cache_object()
This modifies the max_length attribute of an object.

Document Functions
IAFLIB_delete_docs()
This deletes each document in an array from both the Index Services
database (if it is present there) and the Document Services database
of the logged on IMS.

IAFLIB_find_index_in_DIR()
Given a Document Index Record (DIR) pointer and an index ID, this
call returns a pointer to the value of the index in the DIR if the index is
present.

December 1996 WAL for Windows Programmer’s Reference Manual 585


7 WAL Function Reference
IAFLIB Functions

IAFLIB_get_doc_attr()
This returns document attributes for a document.

IAFLIB_migrate_from_optical_disk()
This retrieves a document from the optical disk and places it in the
server cache.

IAFLIB_migrate_to_optical_disk()
This migrates a committed document from a cache to optical disk.

IAFLIB_prefetch()
This initiates the prefetch of a list of documents from optical disk to
the specified cache.

IAFLIB_update_db()
This closes a document, changes the index values of an existing
document index record, or both.

Folder Functions
IAFLIB_create_folder()
This creates a new folder.

IAFLIB_delete_folders()
This removes folders from the database.

IAFLIB_file_doc()
This files a document into, or removes a document from, a folder.

IAFLIB_file_doc_after()
This files an array of documents into a folder following a specified
document ID.

IAFLIB_find_folders()
This returns an array of folder names.

IAFLIB_get_docs_in_folder()
This returns a handle for an array of document IDs that are filed in a
specified folder.

IAFLIB_get_folder_attrs()
This retrieves the attributes of a folder.

IAFLIB_move_folder()
This moves or copies a folder subtree from one parent to another.

586 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB Functions

IAFLIB_reorder_folder()
This reorders documents in a specified folder by putting a document
list after a specified document ID.

IAFLIB_unfile_docs()
This removes a list of documents from a specified folder.

IAFLIB_update_folder()
This changes the attributes of an existing folder, closes a folder, or
both.

IAFLIB_where_filed()
This returns an array of folder IDs that contain the given document.

Annotation Functions
IAFLIB_add_notation()
This adds a notation to a document list that is to be printed.

IAFLIB_add_notation1()
This adds a notation to a document list that is to be printed. IAFLIB_
add_notation1() provides similar functionality to IAFLIB_add_
notation(), but uses the PRI_print_option_typ2 structure instead of
PS_options_rec_type.

IAFLIB_delete_annotation()
This deletes an existing annotation.

IAFLIB_get_annotations()
This returns a handle to all the annotations for the specified page of a
document.

IAFLIB_is_annotated()
This returns a flag indicating whether there is an annotation on any
page of the specified document.

IAFLIB_put_annotation()
This creates or modifies an annotation.

Miscellaneous IAFLIB Functions


IAFLIB_free_client_handle()
This logs off all service sessions established for the client and frees
all resources allocated for the client.

December 1996 WAL for Windows Programmer’s Reference Manual 587


7 WAL Function Reference
IMGFMT Functions

IAFLIB_get_client_handle()
This allocates resources on behalf of a client, and returns a handle.

IAFLIB_get_current_IMS()
This returns the three-part NCH name of the IMS to which the client is
currently logged on.

IAFLIB_get_default_restrictions()
This returns default access restrictions for creation of a new FileNet
object.

IAFLIB_get_server_version()
This returns the version of the server software that is currently logged
on.

IAFLIB_get_version()
This returns the version of the WAL client libraries installed on a
particular workstation.

IMGFMT Functions
The image format (IMGFMT) functions compress and convert FileNet images.

IMGFMT_cmp_tiff()
This compresses TIFF image data. This function is usually used
within a loop to compress the image one band at a time.

IMGFMT_compress()
This compresses a specified number of lines of image data into
FileNet format.

IMGFMT_convert_image()
This converts an image file from one format to another.

QMR Functions (Query Match Report)


The QMR functions allow a client to perform a query, format the results for
display or print, and select one or more documents.

QMR_build_doc_list()
This allocates and fills a structure containing a list of the selected
documents for printing or displaying.

588 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD Functions (Retrieval Data Dictionary)

QMR_format_report()
This formats the index data from document index records into an
ASCII text file suitable for displaying or printing.

QMR_query()
This performs a query, optionally displays a QMR window, and
returns a list of selected document IDs in ASCII for DDE.

QMR_select_match()
This invokes the Query Match Report window, which displays the
results of a query against the Index Database and enables the user to
select one or more of the documents.

RDD Functions (Retrieval Data Dictionary)


The F3RDD DLL provides access to the FileNet Retrieval Data Dictionary. An
application can cause this information to be downloaded from the Index
Server by calling RDD_init().

RDD_exit()
This performs cleanup.

RDD_get_dclass_info()
This returns a handle to a memory buffer containing a document
class descriptor for the document class specified.

RDD_get_dclasses()
This returns a count of document classes and a handle to an array of
document class names.

RDD_get_handle()
This returns the handle requested (a handle previously registered
with RDD_set_handle()).

RDD_get_ix_info()
This returns an index descriptor for the specified index.

RDD_get_key_info()
This returns a key descriptor for the specified key index.

RDD_get_menuitem_info()
This returns a menu item descriptor for the specified menu item.

RDD_get_menuitems()
This returns a handle to an array of menu item strings.

December 1996 WAL for Windows Programmer’s Reference Manual 589


7 WAL Function Reference
REST Functions

RDD_get_valid_ixs()
This returns a handle to an array of index names.

RDD_get_valid_keyixs()
This returns a handle to an array of key index names.

RDD_init()
This initializes RDD with index database dictionary information from
the specified IMS.

RDD_is_field_valid()
This returns an index field descriptor if the specified index is a valid
index for one or more of the document classes listed in the input.

RDD_is_key_valid()
This returns an index field descriptor if the specified index is a valid
key index for one or more of the document classes listed in the input.

RDD_set_handle()
This registers a handle with RDD, so other modules can get it using
RDD_get_handle().

REST Functions
The following functions enable a client to restore files from an archive created
with ARCH_DocEntry().

REST_CloseArchive()
This frees resources associated with a restore operation.

REST_GetArchTime()
This returns the time at which an archive was created.

REST_GetDirEntry()
This returns the directory entry of a file in an archive.

REST_GetFileName()
This returns the name of a file in an archive.

REST_GetFileNames()
This returns a list of the files in an archive.

REST_GetVolName()
This returns the name of the volume from which an archive was
created.

590 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC Functions

REST_OpenArchive()
This obtains an archive handle, which is used to do the actual restore
operation. Optionally, it returns a list of the files in an archive.

REST_RestoreDoc()
This restores all files in an archive, with optional user interface.

REST_RestoreFile()
This restores specific files in an archive, with optional user interface.

SEC Functions
The following functions provide an interface to the security database and
Security Service.

SCT_serialize()
This has not operated since release 3.1.

SEC_add_info()
This enables a logged-on user to add information to the security
database for users, workstations, functions, and their members.

SEC_check_access()
This verifies that a user’s access is approved based on the set of
access restrictions passed to this routine and the type of access
required.

SEC_check_functions()
This verifies that a user has access to the functions indicated.

SEC_check_membership()
This checks whether a user or group is a member of the specified
group.

SEC_delete_info()
This enables the logged-on user to delete information from the
security database for users, workstations, functions, and their
members.

SEC_find_info()
This retrieves information from the security database about users,
workstations, functions, and their members.

December 1996 WAL for Windows Programmer’s Reference Manual 591


7 WAL Function Reference
SEC Functions

SEC_get_membership_list()
This returns the names of all the groups to which a user/group
belongs.

SEC_get_security_info()
This returns information about a user or group.

SEC_get_system_info()
This retrieves system information from the security database, or from
the operating system.

SEC_logoff()
This terminates a service logon with a Security Service.

SEC_logon()
This establishes a service logon with the Security Service.

SEC_rename_info()
This changes the name of a user or group in the security database to
a new name.

SEC_renew()
This re-establishes a service session with the Security Service when
a session handle times out.

SEC_set_system_info()
This enables the logged-on user to set either system information in
the security database, or the system date/time.

SEC_update_info()
This enables the logged-on user to update information in the security
database for a user, group, or service process.

The following functions provide session management capabilities for the


security database and security services. They allow you to simultaneously
manage multiple sessions to a security service.

SECMAN_free_sec_handle()
This terminates a service logon with the security services.

SECMAN_get_sec_handle()
This establishes a service logon with the security services.

592 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ServName Functions

SECMAN_renew_sec_handle()
This re-establishes a service session with the security services when
a session handle times out.

ServName Functions
The F3SRVNAM DLL contains functions to allow the user to specify a
Clearinghouse server name, and to obtain the default service names
associated with a domain and organization.

ServiceNameCacheDefaults()
This retrieves a Clearinghouse Default Cache Descriptor record from
a domain. If the domain is NULL, the default domain is used.

ServiceNameDefaults()
This retrieves a Clearinghouse Default Service Descriptor record from
a domain. If the domain is NULL, the default domain is used.

ServiceNameOptions()
This provides a user interface to select a Clearinghouse object by
browsing through organizations and domains.

SVN_get_Attr_desc()
This retrieves a server’s attributes descriptor record.

SVN_get_BES_desc()
This retrieves a Clearinghouse BES Descriptor record for the
specified Batch Entry Service.

SVN_get_CSM_desc()
This retrieves a Clearinghouse CSM Descriptor record for either the
CSM name specified or the Batch Entry Service name specified.

SVN_get_DefDevice_desc()
This gets the NCH_DefDeviceDescValue structure for the specified
domain. This structure contains the NCH object names for the default
printer and default tape drive.

SVN_get_DefServ1_desc()
This retrieves a Clearinghouse DefServ1 Descriptor record for either
the DefServ1 name specified or the Batch Entry Service name
specified.

December 1996 WAL for Windows Programmer’s Reference Manual 593


7 WAL Function Reference
SLACLIB Functions

SVN_get_IMS_desc()
This retrieves a Clearinghouse IMS Descriptor record for either the
IMS name specified or the Batch Entry Service name specified.

SVN_GetLocalAddr()
This gets the local Ethernet address.

SVN_get_PS_desc()
This retrieves a Print Service descriptor record.

SVN_IMSToStr()
This converts an ASE_service_name_typ structure to an NCH name.

SVN_parse_service_name()
Converts a 3-part NCH name to an ASE_service_name_typ.

SLACLIB Functions
The SLACLIB functions enable WAL programs to use the Software License
Access Control (SLAC) key management system. You can use these
functions to automatically log off users that have been idle for a specified
period.

SLACLIB_GetAttr()
This retrieves an attribute from SLACLIB.

SLACLIB_GetTimeStamp()
This returns the latest timestamp. Chooses the latest time stamp from
these three: the SLACLIB internal timestamp, the COURIER
timestamp, and the IAFLIB timestamp.

SLACLIB_RegisterWindow()
This registers a window with SLACLIB.

SLACLIB_ResetTimer()
This resets the SLACLIB internal timer.

SLACLIB_SetAttr()
This sets an attribute in SLACLIB.

SLACLIB_Shutdown()
This performs a SLAC key shutdown of all registered windows, in
reverse order (newest window first).

594 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY Functions

SLACLIB_UnRegisterWindow()
This unregisters a window with SLACLIB.

TTY Functions
The TTY functions provide a simple window system for reading and writing
data.

TTY_clear()
This clears the specified rectangular area.

TTY_clear_input()
This clears the input buffer.

TTY_clear_msg()
This clears the message window.

TTY_clear_softkeys()
This clears the softkey labels from the menu bar.

TTY_create_window()
This sets the defaults for the TTY window.

TTY_display()
This displays the specified data at the current caret position.

TTY_display_msg()
This replaces the contents of the message window with the specified
string.

TTY_display_popup()
This displays the specified data in a popup window.

TTY_exit()
This destroys the TTY window.

TTY_get_pos()
This returns the caret position within the TTY window.

TTY_init()
This returns a handle to client-relative data needed by the F3TTYLIB
DLL to perform its other functions. Called once for each TTY window.

December 1996 WAL for Windows Programmer’s Reference Manual 595


7 WAL Function Reference
WQS Functions (WorkFlo Queue Services)

TTY_make_current()
This performs the specified action(s): brings the TTY window to the
top and/or makes the TTY window active.

TTY_read_input()
This displays characters from the keyboard buffer.

TTY_scroll()
This scrolls the specified rectangular area.

TTY_set_app_info_key()
This sets the key under which window size and position are saved in
the LOGON.CFG file.

TTY_set_pos()
This sets the caret position within the TTY window.

TTY_set_softkeys()
This puts the softkey labels into the menu bar.

TTY_update_window()
This causes the display window to show the results of display
commands immediately.

WQS Functions (WorkFlo Queue Services)


The WQS functions interface with FileNet’s WorkFlo Queue Services, which
support the WorkFlo processing environment by providing functions for the
creation and manipulation of queues and queue entries.

Session Management Functions


The following functions manage a session between a client and the WorkFlo
Queue Services.

WQS_continue()
This has been obsolete since release 3.1.

WQS_get_default_service()
This returns the NCH object name of the default Queue Service.

WQS_get_server_name()
This returns the NCH object name of the WorkFlo Queue Server
responsible for servicing the named queue.

596 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS Functions (WorkFlo Queue Services)

WQS_is_WQS()
This determines whether the server software is using WQS services
or WQM services.

WQS_logoff()
This terminates a service logon with a Queue Service.

WQS_logon()
This establishes a service logon with a WorkFlo Queue Service.

WQS_qlogon()
This establishes a service logon with the WorkFlo Queue Service
responsible for servicing the specified queue.

WQS_renew()
This has been obsolete since release 3.1.

Queue and Workspace Functions


The following functions perform queue I/O.

WQS_close_queue()
This closes a queue (when no further operations on the queue will be
performed).

WQS_create_queue()
This sets up a new queue.

WQS_create_workspace()
This creates a workspace by setting up the necessary directories and
Clearinghouse entry.

WQS_delete_queue()
This deletes a queue from the workspace.

WQS_delete_workspace()
This deletes a workspace by removing the directories and
Clearinghouse entry associated with the workspace.

WQS_end_dump()
This terminates a dump.

WQS_get_queue_desc()
This returns the definition of an existing queue.

December 1996 WAL for Windows Programmer’s Reference Manual 597


7 WAL Function Reference
WQS Functions (WorkFlo Queue Services)

WQS_get_queue_names()
This returns the number of queues in a given workspace.

WQS_get_workspace_info()
This returns the security information and the text description of the
workspace for a specified workspace name.

WQS_get_workspace_names()
This returns the names of the workspaces defined in the specified
domain.

WQS_open_queue()
This opens a queue for processing.

WQS_read_dump()
This retrieves the next one or more entries that satisfy a set of filter
conditions from a dumped queue.

WQS_read_queue()
This retrieves one or more entries that satisfy a set of filter conditions
from a queue.

WQS_start_dump()
This signals the beginning of a queue dump.

WQS_update_queue()
This modifies the definition of an existing queue.

WQS_update_workspace()
This allows you to modify a workspace.

Queue Entry Functions


A queue entry is an individual item in a queue.

WQS_count_entries()
This returns the number of queue entries in a queue that satisfy a
specified set of filter conditions.

WQS_delete_entry()
This deletes one or more entries from a queue.

WQS_insert_entry()
This inserts one or more entries into a queue.

598 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS Functions (WorkFlo Queue Services)

WQS_read_entry()
This retrieves a specific entry, the identification of which is already
known.

WQS_update_entry()
This modifies a specific queue entry.

WAL Function Calls


The remainder of this chapter provides an alphabetically-arranged reference
to all of the functions in all of the sets.

December 1996 WAL for Windows Programmer’s Reference Manual 599


7 WAL Function Reference
ARCH_DocEntry()

ARCH_DocEntry()
ARCH_DocEntry() provides a high-level interface by which to create Archive
documents in batches of one document at a time. Each file in the file list
becomes a page in the archive document. It automatically adds a directory
page and FileNet page headers. This routine is suitable for calling from
external programs such as Microsoft Word for Windows.

Syntax
#include <archlib.i>

error_typ CALLBACK ARCH_DocEntry(batch_service_name, parent_app,


description, class_name, file_count, file_list, index_count, index_values_h,
show_progress, flags, doc_id_string);

Parameters
batch_service_name
PSTR input. A string containing the Batch Entry Service
name. For example: Bes1:domain:FileNet. If NULL, the
default BES is used.

parent_app PSTR input. Parent application name (for the format of the
data pages); can be NULL.

description PSTR input. Description to put in Archive document header.

class_name PSTR input. Name of the document class for which to create
the batch. If NULL, all document class names are shown in a
listbox to allow the user to select a document class.

file_count WORD input. Number of files in the list.

file_list PSTR input. DOS file names, separated by TAB characters.

index_count WORD input. Number of index values in index_values_h.

index_values_h
HANDLE input. Handle for an array of structures of type
BES_ixval_desc_typ. Obtained from FN_index_text_to_
handle(). Can be NULL if index_count is zero, to pass in no
indexing information.

600 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ARCH_DocEntry()

show_progress
FN_BOOL input. TRUE to create a modeless dialog box in
which to display status messages.

flags WORD input. Controls which phases are performed.


Currently, only BATCHLIB_ENQUEUE, BATCHLIB_
COMMIT_NOW, and BATCHLIB_DELETE_ON_ERR bits are
used.

doc_id_string PSTR output. Document ID of created document, as ASCII


text.

Errors Returned
ARCHLIB_No_Files
No file specified.

ARCHLIB_File_Create
Cannot create file.

ARCHLIB_No_Mem
Not enough memory.

ARCHLIB_Lock_Failed
Global lock failed (not enough memory?)

ARCHLIB_File_Write
Cannot write file.

ARCHLIB_File_Read
Cannot read file.

This function calls BATCHLIB_BatchEntry() and can return the errors from
that function.

See Also
“REST_CloseArchive()” on page 1117

“REST_GetArchTime()” on page 1118

“REST_GetDirEntry()” on page 1119

“REST_GetFileName()” on page 1120

“REST_GetFileNames()” on page 1121

December 1996 WAL for Windows Programmer’s Reference Manual 601


7 WAL Function Reference
ARCH_DocEntry()

“REST_GetVolName()” on page 1122

“REST_OpenArchive()” on page 1123

“REST_RestoreDoc()” on page 1125

“REST_RestoreFile()” on page 1127

602 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_BatchAbort()

BATCHLIB_BatchAbort()
BATCHLIB_BatchAbort() interrupts and cancels a call to BATCHLIB_
BatchEntry() in progress. The batch is deleted and all resources are cleaned
up.

This entry point is useful only if the dialogue window passed to BATCHLIB_
BatchEntry() is called. After BATCHLIB_BatchEntry() returns to the caller, the
batch can no longer be aborted.

Syntax
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_BatchAbort(client_h);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

Error Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

See Also
“BATCHLIB_BatchEntry()” on page 604

“IAFLIB_get_client_handle()” on page 994

The sample application in the default directory


C:\FILENET\SAMPLE\COMMIT\

December 1996 WAL for Windows Programmer’s Reference Manual 603


7 WAL Function Reference
BATCHLIB_BatchEntry()

BATCHLIB_BatchEntry()
BATCHLIB_BatchEntry() is a high-level interface for use by applications such
as fax. It returns a handle for a BATCHLIB_BatchEntry-Status structure. It
also creates a batch and commits it. If the batch is in an acceptable state for
committal, it is closed internally and then enqueued for committal.

The call aborts on any unrecoverable error. If the entire batch commits
successfully, the status_count field in the returned structure will be equal to
the number of documents committed, and each of the error.err_ret fields will
equal success.

For documents committed successfully, the page field will be the number of
pages (last page number) in the document. Otherwise, it will contain the page
number of the page for which the error occurred (zero meaning a document
error prior to processing any pages).

If the returned handle is NULL, no memory was available for allocating the
status structure. In this case, none of the BATCHLIB_BatchEntry() actions are
performed. BATCHLIB_BatchEntry() does not free any data handles passed
into it.

Each page to be committed must be in a separate PC file. You can pass in a


handle for an array of page headers with which to store the pages.

When you use this function with WorkForce Desktop applications, you must
always initialize all of the index fields in the BATCHLIB_DocDesc struct.

Syntax
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_BatchEntry(client_h, batch_service_p,


class_name, batch_type, dynamic_header_p, doc_count, doc_desc_p,
dialog_h, dialog_item_id, flags, status_h_p);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

class_name PSTR input. Name of the document class.

604 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_BatchEntry()

batch_type WORD input. Batch type identifier.


BES_ARCH 6 Archive batch
BES_PC 7 PC batch
BES_FAX 8 Fax batch

dynamic_header_p
BES_dyn_hdr_desc_typ * input. Pointer to a batch dynamic
header structure. The batch_name field is ignored; all others
are used. If this parameter is NULL, BATCHLIB uses a
standard set of values to make things as automatic as
possible.

doc_count WORD input. Number of documents in the batch.

doc_desc_p BATCHLIB_DocDesc * input. Pointer to an array of doc_count


structures of type BATCHLIB_DocDesc.

dialog_h HWND input. Window handle for dialogue box to be updated.


If NULL, no update is done.

dialog_item_id int input. Item ID of text item to be updated in dialogue box.

flags WORD input. Controls which phases are performed.


Currently, only BATCHLIB_ENQUEUE, BATCHLIB_
COMMIT_NOW, and BATCHLIB_DELETE_ON_ERR bits are
used. If the BATCHLIB_DELETE_ON_ERR bit is set and
there is an error, the batch is deleted. If the bit is not set, the
batch is left open.

status_h_p PHANDLE output. Pointer to a handle for a BATCHLIB_


BatchEntryStatus structure.

Errors Returned
IAFLIB_no_memory
Not enough memory.

IAFLIB_lock_err
Unable to lock memory block (low memory?)

IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_func_not_found
Entry point in library not found.

December 1996 WAL for Windows Programmer’s Reference Manual 605


7 WAL Function Reference
BATCHLIB_BatchEntry()

BATCHLIB_Bad_Page_Count
Bad page count.

BATCHLIB_Bad_FileName
The specified file does not exist.

BES_No_Mem
Not enough memory.

BES_Bad_Handle
Bad BESLIB handle.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“BATCHLIB_BatchEntryStatus” on page 184

“BATCHLIB_DocDesc” on page 186

“BES_dyn_hdr_desc_typ” on page 194

The sample application in the default directory


C:\FILENET\SAMPLE\COMMIT\

606 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_commit_files()

BATCHLIB_commit_files()
BATCHLIB_commit_files() commits an array of DOS files into a FileNet
system as a single document. Each file contains a FileNet format image. Each
file becomes one page of the document.

This call supports the FileNet Banded Group III and TIFF Unbanded Group IV
formats.

For performance reasons, we recommend that you use asynchronous


committal. For asynchronous committal, doc_id is returned once the
committal process has been enqueued into the background committal queue.
For synchronous committal, doc_id is returned after the committal process
finishes.

However, if you use asynchronous committal and the committal process


cannot be completed in the background, the return value in doc_id might not
be able to retrieve a valid document. For synchronous committal, if the
committal process fails, the function returns an error.

“BATCHLIB_commit_file_list()” on page 610 provides similar functionality.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_commit_files(client_h, filename_h,


num_files, bes_service_p, docclass, num_indices, index_h, UI, form_title,
form_file, form_name, sync, indices_returned, new_inx_h, doc_id);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

filename_h HANDLE input. Handle to a list of file names. Each file name
is separated by a null character. The file name includes drive
and path.

num_files WORD input. Number of files in filename_h.

bes_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

December 1996 WAL for Windows Programmer’s Reference Manual 607


7 WAL Function Reference
BATCHLIB_commit_files()

docclass PSTR input. Name of the document class to which images


will be committed. For an indexless document class, you
must specify UI as FALSE.

num_indices WORD input. Number of user-indices specified in index_h. If


UI is TRUE, num_indices can be zero.

index_h HANDLE input. Handle to an array of BES_ixval_desc_typ. If


UI is TRUE, index_h can be zero.

UI BOOL input. If TRUE, displays the indexing form for the user.
If FALSE, form_title, form_file, and form_name are ignored.

form_title PSTR input. The title of the indexing form. It is ignored if UI is


FALSE.

form_file PSTR input. The custom indexing form file. If NULL, the
default indexing form file is used.

form_name PSTR input. The custom indexing form name. If NULL, the
default indexing form is used.

sync BOOL input. If TRUE, the server performs a synchronous


committal. If FALSE, the server performs an asynchronous
committal.

indices_returned
WORD * output. Number of indices in new_inx_h.

new_inx_h PHANDLE output. Pointer to a handle to an array of BES_


ixval_desc_typ structures. It is the same as index_h if UI is
FALSE.

doc_id FN_docnum_typ * output. Document ID of the committed/


enqueued document.

See Also
“BATCHLIB_commit_file_list()” on page 610

“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

608 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_commit_files()

“BES_ixval_desc_typ” on page 210

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 609


7 WAL Function Reference
BATCHLIB_commit_file_list()

BATCHLIB_commit_file_list()
BATCHLIB_commit_file_list() functions similarly to BATCHLIB_commit_files(),
with regard to use and interface. It is easier to call from a third party
application (e.g., WINWORD.EXE) through a Dynamic Link Library (DLL).

The differences are as follows:

BATCHLIB_commit_file_list BATCHLIB_commit_files
Uses a TAB character to separate the Uses NULL to separate the image
image files in filename_h. files in filename_h.
Returns doc_id in LPSTR type. Returns doc_id in FN_docnum_typ.

The formats supported by this call are FileNet Banded Group III and TIFF
Unbanded Group IV.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_commit_file_list(client_h, filename_p,


num_files, bes_service_p, docclass, num_indices, index_h, UI, form_title,
form_file, form_name, sync, indices_returned, new_inx_h, doc_id);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

filename_p PSTR input. A list of file names. Each file name is separated
by a TAB. The file name includes drive and path.

num_files WORD input. Number of files in filename_p.

bes_service_p ASE_service_name_typ * input. Pointer to the Batch Entry


Service to use. If NULL, the default batch service is used.

docclass PSTR input. Name of the document class to which images


will be committed. For an indexless document class, you
must specify UI as FALSE.

num_indices WORD input. Number of user-indices specified in index_h. If


UI is TRUE, num_indices can be zero.

610 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_commit_file_list()

index_h HANDLE input. Handle to an array of BES_ixval_desc_typ. If


UI is TRUE, index_h can be zero.

UI BOOL input. If TRUE, displays the indexing form for the user.
If FALSE, form_title, form_file, and form_name are ignored.

form_title PSTR input. The title of the indexing form. It is ignored if UI is


FALSE.

form_file PSTR input. The custom indexing form file. If NULL, the
default indexing form file is used.

form_name PSTR input. The custom indexing form name. If NULL, the
default indexing form is used.

sync BOOL input. If TRUE, the server performs a synchronous


committal. If FALSE, the server performs an asynchronous
committal.

indices_returned
WORD * output. Number of indices in new_inx_h.

new_inx_h PHANDLE output. Pointer to a handle to an array of BES_


ixval_desc_typ structures. It is the same as index_h if UI is
FALSE.

doc_id PSTR output. The Document ID in string format. You must


allocate at least 11 bytes for the buffer of doc_id.

See Also
“BATCHLIB_commit_files()” on page 607

“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“BES_ixval_desc_typ” on page 210

December 1996 WAL for Windows Programmer’s Reference Manual 611


7 WAL Function Reference
BATCHLIB_enqueue_batch()

BATCHLIB_enqueue_batch()
BATCHLIB_enqueue_batch() opens the named batch, enqueues the batch in
the selected queue, and closes the batch.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_enqueue_batch(client_h, batch_service_p,


batch_name, queue_selector, override);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

batch_name PSTR input. Batch name.

queue_selector
short input. Queue ID.

override FN_BOOL input. If TRUE, opens a batch even if it is busy.

Errors Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_load_library_err
Failed to load library DLL.

IAFLIB_func_not_found
Entry point in library not found.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

612 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_find_batch_docs()

BATCHLIB_find_batch_docs()
BATCHLIB_find_batch_docs() finds one or more document descriptors. It
returns, at most, max_docs descriptors. The doc_id in the first descriptor is
greater than starting_doc_id. BATCHLIB_find_batch_docs() handles the
opening and closing of the batch.

The client can specify whether to return the page number array, the index
value array, or both.

BATCHLIB_find_batch_docs() sets a boolean (done_p) to indicate whether or


not all document descriptors satisfying the query have been returned. If
done_p is FALSE, the doc_id field from the last returned document descriptor
is the starting_doc_id in the subsequent call.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_find_batch_docs(client_h, batch_service_p,


batch_name, starting_doc_id, max_docs, get_pages_flag, get_indices_flag,
override, num_docs_p, doc_desc_h_p, pages_h_p, index_values_h_p,
done_p);

Parameters
client_h HANDLE input. The client handle obtained from IAFLIB_get_
client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

batch_name PSTR input. Required. Name of the batch to search.

starting_doc_id
FN_docnum_typ input. Starting document number for search.
Documents whose number is greater than starting_doc_id
are returned. For the first call to BATCHLIB_find_batch_
docs(), set starting_doc_id to zero.

max_docs long input. Maximum number of document descriptors to


return.

December 1996 WAL for Windows Programmer’s Reference Manual 613


7 WAL Function Reference
BATCHLIB_find_batch_docs()

get_pages_flag
FN_BOOL input. TRUE to return pages_h_p.

get_indices_flag
FN_BOOL input. TRUE to return index_values_h_p.

override FN_BOOL input. If TRUE, the batch is opened even if it is


busy.

num_docs_p long * output. Actual number of document descriptors


returned.

doc_desc_h_p
HANDLE * output. Pointer to a handle for an array of
document descriptors of type BES_doc_desc_typ.

pages_h_p HANDLE * output. If get_pages_flag is true, pages_h_p


returns a pointer to a handle for an array of page numbers
(image IDs of type FN_docnum_typ) for all the document
descriptors returned.

index_values_h_p
HANDLE * output. If get_indices_flag is true, index_values_
h_p returns a pointer to a handle for an array of BES_ixval_
desc_typ structures for all the document descriptors returned.

done_p FN_BOOL * output. TRUE if all document descriptors


satisfying the query have been returned. If FALSE, the doc_id
field from the last returned document descriptor should be
the starting_doc_id in the subsequent call.

Errors Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_load_library_err
Failed to load library DLL.

IAFLIB_func_not_found
Entry point in library not found.

614 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_find_batch_docs()

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“BES_doc_desc_typ” on page 191

“BES_ixdir_desc_typ” on page 208

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 615


7 WAL Function Reference
BATCHLIB_find_batch_images()

BATCHLIB_find_batch_images()
BATCHLIB_find_batch_images() opens the batch, returns an array of image
descriptors, and closes the batch. The image_id in the first image descriptor
will be greater than starting_image_id.

BATCHLIB_find_batch_images() sets a boolean (done_p) to indicate whether


or not all image descriptors satisfying the query have been returned. If
done_p is FALSE, the image_id field from the last returned image descriptor
should be the starting_image_id in the subsequent call.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_find_batch_images(client_h, batch_


service_p, batch_name, starting_image_id, max_images, override, num_
images_p, image_descs_h_p, done_p);

Parameters
client_h HANDLE input. The client handle obtained from IAFLIB_get_
client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

batch_name PSTR input. Name of the batch to search.

starting_image_id
FN_docnum_typ input. Starting image number. Image
descriptors containing image_ids greater than starting_
image_id are returned.

max_images long input. Maximum number of image descriptors to return.

override FN_BOOL input. If TRUE, the batch is opened even if it is


busy.

num_images_p
long * output. Pointer to actual number of image descriptors
returned.

616 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_find_batch_images()

image_descs_h_p
HANDLE * output. Pointer to a handle for an array of BES_
image_desc_typ structures.

done_p FN_BOOL * output. TRUE if all image descriptors that satisfy


the query have been returned. If FALSE, the image_id field
from the last returned image descriptor should be the
starting_image_id in the subsequent call.

Errors Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_load_library_err
Failed to load library DLL.

IAFLIB_func_not_found
Entry point in library not found.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“BES_image_desc_typ” on page 202

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 617


7 WAL Function Reference
BATCHLIB_find_batches()

BATCHLIB_find_batches()
BATCHLIB_find_batches() returns batch headers that match the specified
filter. This call, used for reports, allows the client to access one or more batch
headers without opening the batches.

For example, the client can use this call to return the headers of all active
batches, all uncommitted batches, and all batches with a particular error state.

The batch_name and rel_op parameters specify the starting point for the
search. BATCHLIB_find_batches() returns a sequence of no more than max_
headers. A boolean (done_p) is set to TRUE when no more batch headers
satisfying the condition are found.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_find_batches(client_h, batch_service_p,


batch_name, rel_op, filter_p, max_headers, num_headers_p, headers_h_p,
done_p);

Parameters
client_h HANDLE input. The client handle obtained from IAFLIB_get_
client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

batch_name PSTR input. Starting batch name. Use empty string to search
all batches.

rel_op long input. Relational operator. This parameter can be:

BES_EQUAL find an exact match to batch_name

BES_GEQ find all batches whose name is


greater than or equal to
batch_name

BES_GT find all batches whose name is


greater than batch_name

618 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_find_batches()

filter_p BES_filter_typ * input. Pointer to filter structure of type BES_


filter_typ.

max_headers unsigned short input. Maximum number of batch headers to


return.

num_headers_p
unsigned short * output. Pointer to the actual number of batch
headers returned.

headers_h_p HANDLE * output. Pointer to a handle for array of one or


more batch header structures of type BES_hdr_desc_typ.
NULL if no matches were found.

done_p FN_BOOL * output. TRUE if no more batch headers


satisfying the search condition can be found.

Errors Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_load_library_err
Failed to load library DLL.

IAFLIB_func_not_found
Entry point in library not found.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“BES_filter_typ” on page 198

“BES_hdr_desc_typ” on page 201

December 1996 WAL for Windows Programmer’s Reference Manual 619


7 WAL Function Reference
BATCHLIB_get_batch_object()

BATCHLIB_get_batch_object()
BATCHLIB_get_batch_object() retrieves the object from the Batch Entry
Service and places it in a file in the PC’s local cache. It returns the name of
the file containing the object in file_name. The object is left closed.

Reading begins at the specified offset. The actual number of bytes read will
be less than the number of bytes requested if the offset plus num_bytes goes
beyond the end of the object.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_get_batch_object(client_h,


batch_service_p, batch_name, image_id, offset, num_bytes, override,
file_name);

Parameters
client_h HANDLE input. The client handle obtained from IAFLIB_get_
client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

batch_name PSTR input. Batch name.

image_id FN_docnum_typ input. Image ID.

offset long input. Offset in bytes from beginning of the object at


which to begin reading.

num_bytes long input. Maximum number of bytes to read. If zero, the


object is read from offset to the end of the object.

override FN_BOOL input. If TRUE, the batch is opened even if it is


busy.

file_name PSTR output. The name of the file in the PC’s local cache
that contains the retrieved object.

620 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_get_batch_object()

Errors Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_load_library_err
Failed to load library DLL.

IAFLIB_func_not_found
Entry point in library not found.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 621


7 WAL Function Reference
BATCHLIB_update_batch()

BATCHLIB_update_batch()
BATCHLIB_update_batch() updates the dynamic batch header for the named
batch. The batch is closed on return from this call.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_update_batch(client_h, batch_service_p,


batch_name, header_p, override);

Parameters
client_h HANDLE input. The client handle obtained from IAFLIB_get_
client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

batch_name PSTR input. Batch name.

header_p BES_hdr_desc_typ * input. Dynamic header descriptor.

override FN_BOOL input. If TRUE, the batch is opened even if it is


busy.

Errors Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_load_library_err
Failed to load library DLL.

IAFLIB_func_not_found
Entry point in library not found.

622 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_update_batch()

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“BES_hdr_desc_typ” on page 201

December 1996 WAL for Windows Programmer’s Reference Manual 623


7 WAL Function Reference
BATCHLIB_update_batch_doc()

BATCHLIB_update_batch_doc()
BATCHLIB_update_batch_doc() updates a previously-created document. The
client can alter the page composition, the document indexing information, or
both. The session remains open on return from this call.

Syntax
#include <iaflib.i>
#include <batchlib.i>

error_typ CALLBACK BATCHLIB_update_batch_doc(client_h,


batch_service_p, batch_name, doc_desc_p, pages_p, index_values_p,
override);

Parameters
client_h HANDLE input. The client handle obtained from IAFLIB_get_
client_handle().

batch_service_p
ASE_service_name_typ * input. Pointer to the Batch Entry
Service to use. If NULL, the default batch service is used.

batch_name PSTR input. Name of the batch to search.

doc_desc_p BES_doc_desc_typ * input. Pointer to document descriptor


structure.

pages_p FN_docnum_typ * input. Array of page numbers or NULL. If


NULL, BATCHLIB_update_batch_doc() does not update
page composition.

index_values_p
BES_ixval_desc_typ * input. Array of index values or NULL. If
NULL, BATCHLIB_update_batch_doc() does not alter the
indexing information.

override FN_BOOL input. If TRUE, the batch is opened even if it is


busy.

624 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BATCHLIB_update_batch_doc()

Errors Returned
IAFLIB_bad_client_handle
Bad IAFLIB client handle.

IAFLIB_load_library_err
Failed to load library DLL.

IAFLIB_func_not_found
Entry point in library not found.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“BES_doc_desc_typ” on page 191

“BES_ixdir_desc_typ” on page 208

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 625


7 WAL Function Reference
BES_abort_image()

BES_abort_image()
BES_abort_image() aborts the current image transaction and removes the
image if the transaction was started with a create. The image is opened on
entry to this call and closed upon return. The batch retains the state it had
prior to the initiation of the transaction.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_abort_image(session_num, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_no_transaction
There is no image transaction in progress at this time.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

626 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_alloc_batch_name()

BES_alloc_batch_name()
BES_alloc_batch_name() generates a unique batch name. Batch Entry
Services can allocate several types of unique batch names. The batch_type
parameter specifies a template for the batch name.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_alloc_batch_name(session_num, batch_type,


batch_name);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_type short input. Batch type identifier. Can be one of the following:

BES_BATCH 0 Regular document entry


BES_QUICK 1 Quick document entry
BES_FORM 2 Form entry
BES_WPS 3 Word processing
BES_TEST 4 Test
BES_DEW 5 WorkFlo
BES_ARCH 6 Archive
BES_PC 7 PC
BES_FAX 8 Fax

batch_name PSTR output. The batch name.

Errors Returned
BES_err_invalid_batch_type
An invalid batch type was supplied.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

December 1996 WAL for Windows Programmer’s Reference Manual 627


7 WAL Function Reference
BES_alloc_ids()

BES_alloc_ids()
BES_alloc_ids() acquires a block of unique integers to be used as image
identifiers.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_alloc_ids(session_num, num_ids, base_id_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

num_ids long input. Number of integers requested. Must not be


greater than 100. If you need to input more than 100 images,
you must call BES_alloc_ids() again.

base_id_p FN_docnum_typ * output. Pointer to first of consecutive range


of IDs allocated.

Errors Returned
BES_err_too_many_ids
Too many image IDs requested.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“FN_docnum_typ” on page 260

628 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_client_register()

BES_client_register()
BES_client_register() enables you to use the IMS 3.1 batch dynamic header
defined in BES_dyn_hdr_desc_typ. If you have a 3.1 IMS, you can delay
migration to optical disk by setting a parameter in BES_dyn_hdr_desc_typ.
You can also control migration to a specific cache instead of to optical disk.

If you’ve used pre-WAL 4.0 versions and are now using a 3.1 IMS, redefine
session_num, formerly type HANDLE, size WORD (2 bytes), now a class
member, size DWORD (4 bytes).

To use this call, you must compile with the switch -DWFD40. If the call does
not use 40 as the client_type value in the table below or if WFD40 is not
enabled, the header type defaults to 3.0. Unless you use the new features
described, you need not compile with the -DWFD40 switch. Your application
can use the 3.1 IMS services without the switch.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_client_register(session_h, client_type);

Parameters
session_h ASE_session_number_typ input. Session handle returned by
BES_logon().

client_type WORD input. Use 40 for new header functionality.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_dyn_hdr_desc_typ” on page 194

December 1996 WAL for Windows Programmer’s Reference Manual 629


7 WAL Function Reference
BES_close_batch()

BES_close_batch()
BES_close_batch() closes a specified batch. Do not use it after you call BES_
delete_batch(), BES_enqueue_batch(), BES_commit_batch_now(), or BES_
sync_commit().

Syntax
#include <beslib.i>

error_typ CALLBACK BES_close_batch(session_num, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

630 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_close_csum_image()

BES_close_csum_image()
BES_close_csum_image() sets a checksum of an image and commits the
checksummed image transaction in the same way as BES_close_image().
The checksum of the image should be calculated as soon as the image data
is created. It is calculated by CS_compute_csum().

Within a single batch, all images should have checksum values or all images
should not have checksum values. When an image is committed by BES_
close_image() or BES_close_csum_image() with csum_exist set to FALSE,
all checksums for other images in the batch are removed.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_close_csum_image(session_num, batch_cap_p,


csum_exist, csum);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

csum_exist FN_BOOL input. If TRUE, checksum must be specified in


csum. If FALSE, csum is ignored and it works the same way
as BES_close_image().

csum long input. Specifies the checksum value for the image. Can
be obtained from CS_compute_csum().

Note This function requires IMS software version 3.0 or later.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_invalid_batch_cap
The client attempted to read or write an image with an invalid batch
capability.

December 1996 WAL for Windows Programmer’s Reference Manual 631


7 WAL Function Reference
BES_close_csum_image()

BES_err_no_transaction
There is no image transaction in progress at this time.

See Also
“BES_close_image()” on page 633

“BES_logon()” on page 668

“CS_compute_csum()” on page 709

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

632 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_close_image()

BES_close_image()
BES_close_image() attempts to commit the image transaction. For a BES_
create_image() transaction, BES_close_image() creates an image and an
image descriptor record. For a BES_update_image() transaction, BES_close_
image() replaces the prior image with the updated image and maintains
applicable document membership.

An error returned by BES_close_image() indicates that the transaction was


aborted.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_close_image(session_num, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_invalid_batch_cap
The client attempted to read or write an image with an invalid batch
capability.

BES_err_no_transaction
There is no image transaction in progress at this time.

See Also
“BES_create_image()” on page 641

“BES_logon()” on page 668

“BES_update_image()” on page 690

December 1996 WAL for Windows Programmer’s Reference Manual 633


7 WAL Function Reference
BES_close_image()

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

634 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_commit_batch_now()

BES_commit_batch_now()
BES_commit_batch_now() commits the batch synchronously. Control is
returned to the user after the committal. If the committal cache is full, this call
waits until the committal cache is cleaned up. If the call is slow to return, the
committal cache is probably full.

For performance reasons, we recommend that you use BES_sync_commit()


or BES_enqueue_batch() to commit a batch.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_commit_batch_now (session_num, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Batch capability.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_phase_incomplete
The client did not complete one or more of the required phases before
enqueuing the batch for committal.

BES_err_image_not_verified
The client did not verify one or more of the images before enqueuing
the batch for committal. This error is returned only if the client has
specified that image verification is required.

BES_err_commit_batch_total
The batch total was invalid when the batch was enqueued for
committal. This error is returned only if batch totaling is a required
phase.

BES_err_ixval_not_found
An index value record was not found.

December 1996 WAL for Windows Programmer’s Reference Manual 635


7 WAL Function Reference
BES_commit_batch_now()

BES_err_no_required_index
One or more of the required indexing fields did not have values before
the batch was enqueued for committal.

BES_err_index_not_verified
One or more index values were not verified before the batch was
enqueued for committal. This error is returned only if index verification
is a required phase.

See Also
“BES_enqueue_batch()” on page 652.

“BES_logon()” on page 668

“BES_sync_commit()” on page 685

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

636 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_create_batch()

BES_create_batch()
BES_create_batch() creates a batch with the specified name, associated with
the specified document class name. Upon success, BES_create_batch()
returns the batch header record and batch capabilities. The batch capabilities
structure, which contains the batch number, is passed to all subsequent calls
on the open batch. After the batch is created, it is left open and marked busy.

BES_create_batch() initializes all phase status records and opens the batch
for subsequent use.

The client should use BES_open_batch() to open existing batches and mark
them as busy.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_create_batch(session_num, batch_name,


class_name, header_p, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_name PSTR input. Name of the batch.

class_name PSTR input. Name of document class.

header_p BES_hdr_desc_typ * output. Pointer to batch header


structure.

batch_cap_p BES_batch_cap_typ * output. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_no_resources
The operation failed due to a lack of server-side resources. This error
might indicate a transient condition.

BES_err_batch_name_too_long
The client attempted to create a batch name that is too long.

December 1996 WAL for Windows Programmer’s Reference Manual 637


7 WAL Function Reference
BES_create_batch()

BES_err_batch_exists
A batch already exists with the name specified.

See Also
“BES_logon()” on page 668

“BES_open_batch()” on page 673

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_hdr_desc_typ” on page 201

638 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_create_doc()

BES_create_doc()
BES_create_doc() creates a document from images and indices. Batch totals,
if any, will be updated with the incoming index values. The batch must be open
and locked before using this call. It is left open and locked after completion of
the call.

Note the following calling conventions:

• You must follow a BES_create_doc() call with the BES_update_image()


call to define your new object.

• If you are using WorkFlo or WorkForce modules, be sure you initialize all
INX_doc_index_rec_typ (DIRs) before calling BES_create_doc().

Syntax
#include <beslib.i>

error_typ CALLBACK BES_create_doc(session_num, batch_cap_p,


doc_desc_p, pages_p, index_values_p, doc_id_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

doc_desc_p BES_doc_desc_typ * input. Pointer to document descriptor


structure.

pages_p FN_docnum_typ * input. Pointer to an array of image IDs that


are to become pages of the document.

index_values_p
BES_ixval_desc_typ * input. Pointer to an array of index
values.

doc_id_p FN_docnum_typ * output. Pointer to a batch-relative


document ID number.

December 1996 WAL for Windows Programmer’s Reference Manual 639


7 WAL Function Reference
BES_create_doc()

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_doc_exists
A document already exists and another cannot be created with the
same document number.

BES_err_no_resources
The operation failed due to a lack of server-side resources. This error
might indicate a transient condition.

BES_err_bad_pages
An inappropriate image ID was specified (i.e., the image ID is already
part of another document).

BES_err_too_many_pages
The client attempted to create a document with too many pages.

BES_err_too_many_indices
The client attempted to create a document with too many indices.

See Also
“BES_logon()” on page 668

“BES_update_image()” on page 690

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_doc_desc_typ” on page 191

“BES_ixval_desc_typ” on page 210

“FN_docnum_typ” on page 260

640 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_create_image()

BES_create_image()
BES_create_image() opens a transaction and creates the image attributes
(i.e., allocates space). It leaves the transaction open for BES_write_image() to
input the image data to the BES cache.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_create_image(session_num, batch_cap_p,


image_desc_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_desc_p
BES_image_desc_typ * input. Pointer to image descriptor
structure.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_image_exists
The image already exists; another cannot be created with the same
image identifier.

BES_err_no_resources
The operation failed due to a lack of server-side resources. This error
might indicate a transient condition.

BES_err_already_in_transaction
There is already a transaction in process on this image. (You cannot
do the requested operation when a transaction is in process on an
image.)

December 1996 WAL for Windows Programmer’s Reference Manual 641


7 WAL Function Reference
BES_create_image()

See Also
“BES_logon()” on page 668

“BES_write_image()” on page 695

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_image_desc_typ” on page 202

642 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_create_image_index()

BES_create_image_index()
BES_create_image_index() creates the index data associated with a
specified image. The image need not be open. However, the batch must be
open and locked before using this call and it is left open and locked after
completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_create_image_index(session_num, batch_cap_p,


index_length, index_value);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

index_length WORD input. Length of the index value.

index_value PSTR input. Index value.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_batch_busy
The batch is currently in the busy state and cannot be opened at this
time unless the client wishes to assert override.

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

BES_err_image_index_exists
The specified image already has indexing information associated with
it.

December 1996 WAL for Windows Programmer’s Reference Manual 643


7 WAL Function Reference
BES_create_image_index()

BES_err_no_transaction
There is no image transaction in progress at this time.

BES_err_invalid_image_index
The length of the image index is invalid; it cannot exceed 240 bytes.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

644 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_delete_batch()

BES_delete_batch()
BES_delete_batch() deletes all state information related to the previously-
opened batch. All images associated with the batch are deleted from the
cache. The batch and all images are closed and no longer exist.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_delete_batch(session_num, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

December 1996 WAL for Windows Programmer’s Reference Manual 645


7 WAL Function Reference
BES_delete_doc()

BES_delete_doc()
BES_delete_doc() deletes a document. The function unconditionally deletes
all assembly and indexing information associated with the document. The
client can elect to delete the images from the page cache. The batch must be
open and locked before using this call. It is left open and locked after
completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_delete_doc(session_num, batch_cap_p, doc_id,


del_images_flag);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

doc_id FN_docnum_typ input. A batch-relative document ID number.

del_images_flag
FN_BOOL input. TRUE to delete images currently assigned
to the document from the page cache.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_doc_not_found
The specified document number is not a document in this particular
batch.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

646 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_delete_doc()

“BES_batch_cap_typ” on page 188

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 647


7 WAL Function Reference
BES_delete_image()

BES_delete_image()
BES_delete_image() deletes the image descriptor associated with the
specified image and frees space occupied by the image data. The batch must
be open and locked before using this call. It is left open and locked after
completion of the call.

The image to be deleted must not be part of a document. To delete an image


that is part of a document, the client must first update the document and then
delete the image.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_delete_image(session_num, batch_cap_p,


image_id);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_id FN_docnum_typ input. Image number.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“FN_docnum_typ” on page 260

648 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_delete_image_index()

BES_delete_image_index()
BES_delete_image_index() deletes the index data associated with a specified
image. The image need not be open. However, the batch must be open and
locked before using this call. It is left open and locked after completion of the
call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_delete_image_index(session_num, batch_cap_p,


image_id);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_id FN_docnum_typ input. The ID number of the image for which


index data is to be deleted.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_batch_busy
The batch is currently in the busy state and cannot be opened at this
time unless the client wishes to assert override.

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

December 1996 WAL for Windows Programmer’s Reference Manual 649


7 WAL Function Reference
BES_delete_image_index()

“BES_batch_cap_typ” on page 188

“FN_docnum_typ” on page 260

650 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_dequeue_batch()

BES_dequeue_batch()
BES_dequeue_batch() opens the batch at the head of the committal queue.
This batch can subsequently be deleted, closed, or enqueued. Deletion
causes all batch related states to be permanently removed. Closure returns to
the queue all the batches eligible for dequeuing from the commit queue.
Enqueuing returns the batch to the uncommit queue.

Note BES_dequeue_batch() is used exclusively by the batch committal daemon.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_dequeue_batch(session_num, header_p,


batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

header_p BES_hdr_desc_typ * output. Pointer to batch header


structure.

batch_cap_p BES_batch_cap_typ * output. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_batch_not_found
There is no batch with the specified name.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_hdr_desc_typ” on page 201

December 1996 WAL for Windows Programmer’s Reference Manual 651


7 WAL Function Reference
BES_enqueue_batch()

BES_enqueue_batch()
BES_enqueue_batch() places a previously-opened batch into the specified
queue. This call is usually used to enqueue a batch for committal, but can also
be used to return a batch that failed committal to the uncommit queue.

If the commit queue is specified, BES_enqueue_batch() determines whether


or not the specified batch is in an acceptable state for committal. Each
document in the batch must be correctly defined, i.e., all its pages must exist
and values must have been assigned to all required indexing fields.

If the image_verify field in the batch header is TRUE, BES_enqueue_batch()


determines whether or not each image that is part of a document in the batch
has been successfully verified.

If the index_verify field in the batch header is TRUE, BES_enqueue_batch()


determines whether or not indices requiring verification have been
successfully verified.

If the batch_total field in the batch header is TRUE, BES_enqueue_batch()


determines whether the batch totals for the appropriate indices are correct. It
also determines whether or not the expected number of documents and
pages equals the actual numbers of documents and pages.

A batch in an acceptable state is enqueued for committal and the batch is


closed. Batches not in an acceptable state remain open.

When this function returns, the committal process might not be completed by
the FileNet Server. If you need to force the committal to take place
immediately, you can use BES_commit_batch_now() or BES_sync_commit().

For performance reasons, we recommend that you use BES_sync_commit()


or BES_enqueue_batch() to commit a batch.

Syntax
#include <beslib.i>
#include <bes.def>

error_typ CALLBACK BES_enqueue_batch(session_num, batch_cap_p,


queue_selector);

652 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_enqueue_batch()

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

queue_selector
short input. Queue identifier. Can be one of the following
(from bes.def):
BES_OCR_QUEUE
BES_INPROGRESS_QUEUE
BES_COMMIT_QUEUE
BES_UNCOMMIT_QUEUE
BES_NO_QUEUE

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_invalid_queue
The client attempted to enqueue the batch to an invalid queue.

BES_err_phase_incomplete
The client did not complete one or more of the required phases before
enqueuing the batch for committal.

BES_err_image_not_verified
The client did not verify one or more of the images before enqueuing
the batch for committal. This error is returned only if the client has
specified that image verification is required.

BES_err_no_required_index
One or more of the required indexing fields did not have values before
the batch was enqueued for committal.

BES_err_index_not_verified
One or more index values were not verified before the batch was
enqueued for committal. This error is returned only if index verification
is a required phase.

December 1996 WAL for Windows Programmer’s Reference Manual 653


7 WAL Function Reference
BES_enqueue_batch()

BES_err_commit_batch_total
The batch total was invalid when the batch was enqueued for
committal. This error is returned only if batch totaling is a required
phase.

BES_err_ixval_not_found
An index value record was not found.

See Also
“BES_commit_batch_now()” on page 635

“BES_logon()” on page 668

“BES_sync_commit()” on page 685

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

654 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_find_batches()

BES_find_batches()
BES_find_batches() returns batch headers that match the specified filter; it
accesses one or more batch headers without opening the batches. BES_find_
batches() is usually used to generate reports.

For example, the client can use this entry point to return the headers of all
active batches, all uncommitted batches, and all batches with a particular
error state.

The batch_name and rel_op parameters specify the starting point for the
search. BES_find_batches() returns a sequence of no more than max_
headers. It sets done_p to TRUE when it finds no batch header that satisfies
the condition.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_find_batches(session_num, batch_name, rel_op,


filter_p, max_headers, num_headers_p, headers_h_p, done_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_name PSTR input. Starting batch name. The least significant batch
name is a zero-length string.

rel_op long input. Relational operator. Can be one of the following:


BES_EQL find an exact match to batch_name
BES_GEQ find all batches whose name is
greater than or equal to batch_name
BES_GT find all batches whose name is
greater than batch_name

filter_p BES_filter_typ * input. Pointer to filter structure through which


batch headers are evaluated to determine whether or not
they should be returned to the client.

max_headers long input. Maximum number of batch headers to return.

December 1996 WAL for Windows Programmer’s Reference Manual 655


7 WAL Function Reference
BES_find_batches()

num_headers_p
WORD * output. Pointer to the actual number of batch
headers returned in headers_h_p.

headers_h_p HANDLE * output. Pointer to a handle for an array of batch


headers, of type BES_hdr_desc_typ. NULL if no batches
were found to match the filter.

done_p FN_BOOL * output. TRUE if no more batch headers


satisfying the search condition can be found.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_filter_typ” on page 198

“BES_hdr_desc_typ” on page 201

656 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_find_docs()

BES_find_docs()
BES_find_docs() finds one or more document descriptors. It returns, at most,
max_docs descriptors. The doc_id in the first descriptor is greater than
starting_doc_id.

The client can specify whether to return the page number array, the index
value array, or both.

BES_find_docs() sets a boolean (done_p) to indicate whether or not all


document descriptors satisfying the query have been returned. If done_p is
FALSE, the doc_id field from the last returned document descriptor is the
starting_doc_id in the subsequent call.

The batch indicated by batch_cap_p must be opened and it remains open at


completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_find_docs(session_num, batch_cap_p,


starting_doc_id, max_docs, get_pages_flag, get_indices_flag, num_docs_p,
doc_descs_h_p, pages_h_p, index_values_h_p, done_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

starting_doc_id
FN_docnum_typ input. Starting document number for search.
This number is a batch-relative document ID. Documents
whose number is greater than starting_doc_id will be
returned. For the first call to BES_find_docs(), set starting_
doc_id to zero.

max_docs long input. Maximum number of document descriptors to


return.

get_pages_flag
FN_BOOL input. TRUE to return pages_h_p.

December 1996 WAL for Windows Programmer’s Reference Manual 657


7 WAL Function Reference
BES_find_docs()

get_indices_flag
FN_BOOL input. TRUE to return index_values_h_p.

num_docs_p long * output. Pointer to the actual number of document


descriptors returned.

doc_descs_h_p
HANDLE * output. Pointer to a handle for array of document
descriptors of type BES_doc_desc_typ. Memory for this list is
allocated by BESLIB, and must be returned by calling
GlobalFree.

pages_h_p HANDLE * output. Pointer to a handle for array of page


numbers of type FN_docnum_typ (unsigned long). Memory
for this list is allocated by BESLIB, and must be returned by
calling GlobalFree.

index_values_h_p
HANDLE * output. Pointer to a handle for array of index
values of type BES_ixval_desc_typ. Memory for this list is
allocated by BESLIB, and must be returned by calling
GlobalFree.

done_p FN_BOOL * output. Pointer to a boolean that is TRUE if all


document descriptors have been returned. Otherwise, it is
FALSE.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_doc_desc_typ” on page 191

“BES_ixval_desc_typ” on page 210

“FN_docnum_typ” on page 260

658 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_find_images()

BES_find_images()
BES_find_images() returns an array of image descriptors. The image_id in
the first image descriptor is greater than starting_image_id. The batch
indicated by batch_cap_p must be open before using this call and it remains
open after completion of the call.

BES_find_images() sets a boolean (done_p) to indicate whether or not all


image descriptors satisfying the query have been returned. If done_p is
FALSE, the client uses the image_id in the last image descriptor as the
starting_image_id in the subsequent call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_find_images(session_num, batch_cap_p,


starting_image_id, max_images, num_images_p, image_descs_h_p,
done_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

starting_image_id
FN_docnum_typ input. Starting image number. Image
descriptors containing image_ids greater than starting_
image_id will be returned.

max_images long input. Maximum number of image descriptors to return.


Client must allocate memory to accommodate max_images
image descriptors.

num_images_p
long * output. Pointer to actual number of image descriptors
returned.

image_descs_h_p
HANDLE * output. Pointer to a handle for an array of image
descriptors of type BES_image_desc_typ. The array is NULL
if there is no image.

December 1996 WAL for Windows Programmer’s Reference Manual 659


7 WAL Function Reference
BES_find_images()

done_p FN_BOOL * output. TRUE if all image descriptors that satisfy


the query have been returned.

Error Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_image_desc_typ” on page 202

“FN_docnum_typ” on page 260

660 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_get_image_index()

BES_get_image_index()
BES_get_image_index() retrieves indexing information associated with a
specified image. The image need not be open. Note, however, that the batch
indicated by batch_cap_p must be open before using this call and it is left
open after completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_get_image_index(session_num, batch_cap_p,


image_id, max_index_length, index_length_p, index_value, done_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_id FN_docnum_typ input. ID of the image for which the index


value is to be retrieved.

max_index_length
WORD input. Maximum size of returned index value.

index_length_p
WORD * output. Pointer to actual length of index value.

index_value PSTR output. Index value of type BES_ixval_desc_typ.

done_p FN_BOOL * output. Pointer to flag that specifies whether or


not index_value contains the entire index value.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_batch_busy
The batch is currently in the busy state and cannot be opened at this
time unless the client wishes to assert override.

December 1996 WAL for Windows Programmer’s Reference Manual 661


7 WAL Function Reference
BES_get_image_index()

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_ixval_desc_typ” on page 210

“FN_docnum_typ” on page 260

662 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_get_info()

BES_get_info()
BES_get_info() retrieves the additional information associated with a batch, a
document in a batch, an image in a batch, an index type associated with the
class of a batch, or an index value associated with a specific document of a
batch. This information is added by the BES_put_info() function.

Valid types of information that you can retrieve are:

• BES_INFO_BATCH

• BES_INFO_DOC

• BES_INFO_IMAGE

• BES_INFO_IDXVAL

Syntax
#include <beslib.i>

error_typ CALLBACK BES_get_info(session_num, batch_cap_p,


search_spec_p, max_to_get, num_returned, info_h_p, done_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

search_spec_p
BES_info_rec_typ * input. Indicates the type of information in
which to search. You specify the information type in the info_
spec field in the structure.

max_to_get unsigned short input. Maximum number of records to return.

num_returned unsigned short * output. The actual number of records found.

info_h_p HANDLE * output. Pointer to a handle to a list of BES_info_


rec_typ records.

done_p FN_BOOL * output. If TRUE, the search is completed.

December 1996 WAL for Windows Programmer’s Reference Manual 663


7 WAL Function Reference
BES_get_info()

Note This function requires the Series 6000 software version 3.0 or later.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_no_resources
The operation failed due to a lack of server-side resources. This error
might indicate a transient condition.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_info_rec_typ” on page 205

664 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_get_num_cluster_id()

BES_get_num_cluster_id()
BES_get_num_cluster_id() computes the cluster ID for a key of type FP_
number. After the calculation, a pointer to the cluster ID is returned in cid_p.
This function returns NULL.

Syntax
#include <beslib.i>

void BES_get_info(fp_num, cid_p);

Parameters
fp_num FN_number input. Specifies the FileNet Floating Point
number that contains the cluster ID.

cid_p unsigned short * output. Pointer to three unsigned shorts


where the cluster ID is stored.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 665


7 WAL Function Reference
BES_get_str_cluster_id()

BES_get_str_cluster_id()
BES_get_str_cluster_id() computes the cluster ID for a key of type LPSTR.
After the calculation, a pointer to the cluster ID is returned in cid_p. This
function returns NULL.

Syntax
#include <beslib.i>

void BES_get_info(str_key, cid_p);

Parameters
str_key PSTR input. Specifies the alphanumeric key that contains the
cluster ID.

cid_p unsigned short * output. Pointer to three unsigned shorts


where the cluster ID is stored.

666 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_logoff()

BES_logoff()
BES_logoff() terminates a Batch Entry Services session and invalidates a
session on the server. No further call can be made to Batch Entry Services
until after another BES_logon() call.

Clients call BES_logoff() when finished with the service to minimize Batch
Entry Services’ maintenance of active sessions.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_logoff(session_num);

Parameters
session_num ASE_session_number_typ input. Session ID to log off.

Errors Returned
BES_err_bad_ses_id
The session ID passed is not a valid session ID.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

December 1996 WAL for Windows Programmer’s Reference Manual 667


7 WAL Function Reference
BES_logon()

BES_logon()
BES_logon() establishes a Batch Entry Service session and returns a number
that identifies the session to the client. The number must be passed to
subsequent calls to Batch Entry Services. The client can open multiple
batches per session and each session remains active for at least the number
of seconds specified by timeout.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_logon(credential_p, batch_service_p, leave_open,


session_num, timeout_p);

Parameters
credential_p PSTR input. An unused parameter since release 3.1.

batch_service_p
ASE_service_name_typ * input. Identifies the Batch Entry
Service. (Note that you cannot use NULL for the default
service name.)

leave_open FN_BOOL input. TRUE if connection should be left open after


logon. leave_open will most likely be TRUE.

session_num ASE_session_number_typ * output. The session number.

timeout_p unsigned short * input. Pointer to the minimum number of


seconds the service logon will remain active.

Errors Returned
BES_err_no_permission

See Also
“BES_logoff()” on page 667

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

668 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_modify_image_index()

BES_modify_image_index()
BES_modify_image_index() modifies the index data associated with a
specified image. The image need not be open. The batch must be open and
locked before using this call and it is left open and locked after completion of
the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_modify_image_index(session_num, batch_cap_p,


image_id, index_length, index_value);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_id FN_docnum_typ input. ID of the image for which the index


value is to be retrieved.

index_length WORD input. Length of the index value.

index_value PSTR input. Index value.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_batch_busy
The batch is currently in the busy state and cannot be opened at this
time unless the client wishes to assert override.

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

BES_err_no_image_index
This image does not have an associated index value.

December 1996 WAL for Windows Programmer’s Reference Manual 669


7 WAL Function Reference
BES_modify_image_index()

BES_err_invalid_image_index
The length of the image index is invalid; it cannot exceed 240 bytes.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“FN_docnum_typ” on page 260

670 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_move_image()

BES_move_image()
BES_move_image() moves an unassembled image from one batch to
another. The image remains unassembled after it is moved. You can move
images from one document class to another within the same server. You
cannot move images from one server to another.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_move_image(session_num, sbatch_cap_p,


dbatch_cap_p, image_id);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

sbatch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure of the source batch.

dbatch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure of the destination batch.

image_id FN_docnum_typ input. Image ID of the image to be moved.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_batch_busy
The batch is currently in the busy state and cannot be opened at this
time unless the client wishes to assert override.

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

BES_err_no_image_index
This image does not have an associated index value.

BES_err_invalid_image_index
The length of the image index is invalid; it cannot exceed 240 bytes.

December 1996 WAL for Windows Programmer’s Reference Manual 671


7 WAL Function Reference
BES_move_image()

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“FN_docnum_typ” on page 260

672 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_open_batch()

BES_open_batch()
BES_open_batch() provides the client with exclusive update privileges to a
specified batch. This call marks the opened batch as busy.

Note that the override parameter allows clients with sufficient privilege to open
a busy batch.

BES_open_batch() returns the batch header and the batch capabilities. The
batch capabilities structure, which contains the batch number, is passed to all
subsequent calls on the open batch.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_open_batch(session_num, batch_name, override,


header_p, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_name PSTR input. Name of the batch.

override FN_BOOL input. TRUE only if client wants to override busy


state (check that the batch is busy first); otherwise, FALSE.

header_p BES_hdr_desc_typ * output. Pointer to batch header


structure.

batch_cap_p BES_batch_cap_typ * output. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_batch_not_found
There is no batch with the specified name.

BES_err_batch_not_locked
The override parameter is set to TRUE, but the batch is not locked.

BES_err_batch_busy
The batch is currently in the busy state and cannot be opened at this
time unless the client wishes to assert override.

December 1996 WAL for Windows Programmer’s Reference Manual 673


7 WAL Function Reference
BES_open_batch()

BES_err_bad_service_name
Batch service name doesn’t match between logon and the existing
batch. The batch service name was changed in the configuration files
between the time this batch was created and now.

BES_err_wrong_queue
Cannot open batch when queue not equal to BES_UNCOMMIT_
QUEUE or BES_NO_QUEUE.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_hdr_desc_typ” on page 201

674 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_open_image()

BES_open_image()
BES_open_image() opens the specified image for read-only (no writing or
update) and returns the associated image descriptor record. The batch
remains open at completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_open_image(session_num, batch_cap_p,


image_id, image_desc_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_id FN_docnum_typ input. Image number.

image_desc_p
BES_image_desc_typ * output. Pointer to image descriptor
structure.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

BES_err_already_in_transaction
There is already a transaction in process on this image. (You cannot
do the requested operation when a transaction is in process on an
image.)

December 1996 WAL for Windows Programmer’s Reference Manual 675


7 WAL Function Reference
BES_open_image()

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_image_desc_typ” on page 202

“FN_docnum_typ” on page 260

676 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_put_info()

BES_put_info()
BES_put_info() provides the client with the ability to associate additional
information with a batch record, a batch document record, a batch image
record, a batch class index type record, or a batch document index value
record.

This information is defined and interpreted by the client. BES services does
not use this information. A client can use BES_get_info() to retrieve this
information.

Valid types of information are:

• BES_INFO_BATCH

• BES_INFO_DOC

• BES_INFO_IMAGE

• BES_INFO_IDXVAL

This function requires the Series 6000 software version 3.0 or later.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_get_info(session_num, batch_cap_p,


num_to_put, info_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

num_to_put unsigned short input. Maximum number of records to return.

info_p BES_info_rec_typ * output. Pointer to a list of BES_info_rec_


typ records.

December 1996 WAL for Windows Programmer’s Reference Manual 677


7 WAL Function Reference
BES_put_info()

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_no_resources
The operation failed due to a lack of server-side resources. This error
might indicate a transient condition.

See Also
“BES_get_info()” on page 663

“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_info_rec_typ” on page 205

678 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_query_index_dir()

BES_query_index_dir()
BES_query_index_dir() retrieves the directory of indices associated with the
specified batch. The batch has to be open before using this call and it is left
open after completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_query_index_dir(session_num, batch_cap_p,


num_indices_p, index_descs_h_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

num_indices_p
long * output. Pointer to a number of indexing fields.

index_descs_h_p
HANDLE * output. Pointer to a handle for an array of index
descriptors (BES_ixdir_desc_typ).

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_ixdir_not_found
The index record (Column name) does not exist.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_ixdir_desc_typ” on page 208

December 1996 WAL for Windows Programmer’s Reference Manual 679


7 WAL Function Reference
BES_read_image()

BES_read_image()
BES_read_image() attempts to read num_bytes bytes from an image on
which there is a current transaction. Reading begins at the specified offset.
The actual number of bytes read is less than the number of bytes requested if
offset plus num_bytes goes beyond the end of the image. The batch has to be
open before using this call and it is left open after completion of the call.

For performance reasons, we recommend that you use BES_read_whole_


image() to read an image from a BES cache to a PC local cache.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_read_image(session_num, batch_cap_p, offset,


num_bytes, bytes_read, image_data_h_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

offset unsigned long input. Begin read at offset bytes from


beginning of image.

num_bytes unsigned long input. Maximum number of bytes to read.

bytes_read unsigned long * output. Actual number of bytes read.

image_data_h_p
HANDLE * output. Pointer to a handle to buffer that contains
the data read.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_no_transaction
There is no image transaction in progress at this time.

680 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_read_image()

BES_err_invalid_batch_cap
The client attempted to read or write an image with an invalid batch
capability.

See Also
“BES_logon()” on page 668

“BES_read_whole_image()” on page 682

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

December 1996 WAL for Windows Programmer’s Reference Manual 681


7 WAL Function Reference
BES_read_whole_image()

BES_read_whole_image()
BES_read_whole_image() reads a whole image from BES cache into PC
local cache.

The buf_size parameter indicates the amount of image data to transfer


through the network each time. Before you call this function, you must allocate
the amount of memory specified by data_size (rather than buf_size) and put
the handle in buf_h. You must also free the allocated memory after this
function call.

Avoid setting the buf_size parameter too large or too small. We recommend
setting it to a minimum of 1MB or data_size. For example:

buf_size = (data_size > 0xfffcL) ? 0xfffcL : data_size;

For performance reasons, we recommend that you use this function instead of
BES_read_image().

Syntax
#include <beslib.i>

error_typ CALLBACK BES_read_whole_image(session_num, batch_cap_p,


data_size, buf_h, buf_size, ssn, image_id);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

data_size unsigned long input. The size of the whole image. It can be
found in BES_image_desc_typ which is returned from BES_
open_image().

buf_h HANDLE input. Handle to a buffer of size data_size.

buf_size unsigned long input. Specifies the amount of image data to


transfer through the network each time.

ssn ASE_ssn_typ input. System serial number.

image_id FN_docnum_typ input. Specifies the image ID to read.

682 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_read_whole_image()

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_no_transaction
There is no image transaction in progress at this time.

BES_err_invalid_batch_cap
The client attempted to read or write an image with an invalid batch
capability.

See Also
“BES_logon()” on page 668

“BES_read_image()” on page 680

“ASE_session_number_typ” on page 179

“ASE_ssn_typ” on page 180

“BES_batch_cap_typ” on page 188

“BES_image_desc_typ” on page 202

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 683


7 WAL Function Reference
BES_renew()

BES_renew()
BES_renew() re-establishes a service logon with a Batch Entry Service. If the
BES session idles longer than the timeout period, your BES session might be
lost. Your BES function call returns the error BES_err_bad_sess_id in this
case. Always check for the error and use this to re-establish the service logon.

Since the 3.0 release, BES_renew() is obsolete. The function reestablished a


session that was dropped due to a timeout. However, internal adjustment
eliminated the need for it.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_renew(credential_p, batch_service_p,


leave_open, session_num, timeout_p);

Parameters
credential_p PSTR input. An unused parameter since release 3.1.

batch_service_p
ASE_service_name_typ * input. Pointer to the name of the
Batch Entry Service. (Note that you cannot use NULL for the
default service name.)

leave_open FN_BOOL input. TRUE if connection should be left open after


logon. Leave_open will most likely be TRUE.

session_num ASE_session_number_typ output. Pointer to the session


number.

timeout_p unsigned short * input. Pointer to the minimum amount of


time in seconds that the service logon will remain alive.

See Also
“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

684 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_sync_commit()

BES_sync_commit()
BES_sync_commit() commits the batch synchronously. It returns control to
the user after the committal. If the page cache is full, this call returns a CSM_
no_resources error.

For performance reasons, we recommend that you use BES_sync_commit()


or BES_enqueue_batch() to commit a batch.

You can also use BES_commit_batch_now() or BES_enqueue_batch() to


commit a batch.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_sync_commit (session_num, batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Batch capability.

Note This function requires IMS software version 3.0 or later.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_phase_incomplete
The client did not complete one or more of the required phases before
enqueuing the batch for committal.

BES_err_image_not_verified
The client did not verify one or more of the images before enqueuing
the batch for committal. This error is returned only if the client has
specified that image verification is required.

BES_err_commit_batch_total
The batch total was invalid when the batch was enqueued for
committal. This error is returned only if batch totaling is a required
phase.

December 1996 WAL for Windows Programmer’s Reference Manual 685


7 WAL Function Reference
BES_sync_commit()

BES_err_ixval_not_found
An index value record was not found.

BES_err_no_required_index
One or more of the required indexing fields did not have values before
the batch was enqueued for committal.

BES_err_index_not_verified
One or more index values were not verified before the batch was
enqueued for committal. This error is returned only if index verification
is a required phase.

CSM_no_resources_in_target_cache
Cache is full. It needs to be cleaned up.

See Also
“BES_commit_batch_now()” on page 635

“BES_enqueue_batch()” on page 652.

“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

686 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_update_batch()

BES_update_batch()
BES_update_batch() updates certain fields in the dynamic batch header. The
batch must be open and locked before using this call. It is left open and locked
after completion of the call.

Use this function when you have written something into the BES, thereby
avoiding re-doing everything from the beginning when a problem occurs.

The BES_hdr_desc_typ field d, the WAL data type BES_dyn_hdr_desc_typ,


is the only data passed across the network from the BES_update_batch() call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_update_batch(session_num, header_p,


batch_cap_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

header_p BES_hdr_desc_typ * input. Pointer to batch header structure.

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

See Also
“BES_logon()” on page 668

“BES_hdr_desc_typ” on page 201

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_hdr_desc_typ” on page 201

December 1996 WAL for Windows Programmer’s Reference Manual 687


7 WAL Function Reference
BES_update_doc()

BES_update_doc()
BES_update_doc() updates a previously-created document. The client can
alter the page composition, the document indexing information, or both. The
batch must be open and locked before using this call. It is left open and locked
after completion of the call.

If pages_p is NULL, BES_update_doc() does not update page composition. If


the index_values_p is NULL, BES_update_doc() does not alter the indexing
information.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_update_doc(session_num, batch_cap_p,


doc_desc_p, pages_p, index_values_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

doc_desc_p BES_doc_desc_typ * input. Pointer to document descriptor


structure.

pages_p FN_docnum_typ * input. Pointer to an array of page numbers


or NULL.

index_values_p
BES_ixval_desc_typ * input. Pointer to an array of index
values or NULL.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_no_resources
The operation failed due to a lack of server-side resources. This error
might indicate a transient condition.

688 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_update_doc()

BES_err_bad_pages
An inappropriate image ID was specified (i.e., the image ID is already
part of another document).

BES_err_too_many_pages
The client attempted to create a document with too many pages.

BES_err_doc_not_found
The specified document number is not a document in this particular
batch.

BES_err_too_many_indices
The client attempted to create a document with too many indices.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_doc_desc_typ” on page 191

“BES_ixval_desc_typ” on page 210

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 689


7 WAL Function Reference
BES_update_image()

BES_update_image()
BES_update_image() updates the image attributes, then leaves the image
open for subsequent reads or writes. The batch has to be open and locked
before using this call and it is left open and locked after completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_update_image(session_num, batch_cap_p,


image_desc_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_desc_p
BES_image_desc_typ * input. Pointer to image descriptor
structure. The doc_id and page_id fields in this structure are
not updated.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_image_not_found
The specified image is not an image associated with this particular
batch.

BES_err_no_resources
The operation failed due to a lack of server-side resources. This error
might indicate a transient condition.

BES_err_already_in_transaction
There is already a transaction in process on this image. (You cannot
do the requested operation when a transaction is in process on an
image.)

690 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_update_image()

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_image_desc_typ” on page 202

December 1996 WAL for Windows Programmer’s Reference Manual 691


7 WAL Function Reference
BES_update_index_total()

BES_update_index_total()
BES_update_index_total() updates the batch total for the specified index. The
batch has to be open and locked before using this call and it is left open and
locked after completion of the call.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_update_index_total(session_num, batch_cap_p,


index_id, value_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

index_id long input. Index number.

value_p FP_number * input. Pointer to the value to which to set the


expected batch total for the specified index.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_ixdir_not_found
Column name record does not exist.

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“FP_number” on page 349

692 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_verify_image()

BES_verify_image()
BES_verify_image() updates the image verification status in the image
descriptor record associated with the specified image. The batch has to be
open and locked before using this call and it is left open and locked after
completion of the call.

Syntax
#include <beslib.i>
#include <bes.def>

error_typ CALLBACK BES_verify_image(session_num, batch_cap_p,


image_id, ver_status, image_desc_p);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

image_id FN_docnum_typ input. Image number.

ver_status short input. Image verification status. Can be one of the


following (from bes.def):
BES_UNSEEN
BES_GOOD
BES_BAD
BES_REQUIRED
BES_DELETE

image_desc_p
BES_image_desc_typ * input/output. Pointer to image
descriptor. The updated image_desc_p is returned,
overwriting the input.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_image_not_found
The specified image is not associated with this particular batch.

December 1996 WAL for Windows Programmer’s Reference Manual 693


7 WAL Function Reference
BES_verify_image()

See Also
“BES_logon()” on page 668

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

“BES_image_desc_typ” on page 202

“FN_docnum_typ” on page 260

694 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
BES_write_image()

BES_write_image()
BES_write_image() writes num_bytes bytes to the BES cache where space is
allocated by BES_create_image() or BES_update_image(). BES_write_
image() starts writing at the specified offset. The batch has to be open and
locked before using this call and it is left open and locked after the call
completes.

BES_write_image() can be called only on BES_create_image() and BES_


update_image() transactions. An error will be returned if BES_write_image()
is attempted on a BES_open_image() transaction.

Syntax
#include <beslib.i>

error_typ CALLBACK BES_write_image(session_num, batch_cap_p, offset,


num_bytes, image_data_h);

Parameters
session_num ASE_session_number_typ input. Session number returned
by BES_logon().

batch_cap_p BES_batch_cap_typ * input. Pointer to a batch capabilities


structure.

offset unsigned long input. Offset (bytes) into image at which to


start writing.

num_bytes unsigned long input. Number of bytes to be written.

image_data_h HANDLE input. Handle for image data. For clients calling
BES, buffer size must be a multiple of 1024.

Errors Returned
BES_err_batch_not_open
There is currently no open batch associated with the client’s session.

BES_err_no_transaction
There is no image transaction in progress at this time.

December 1996 WAL for Windows Programmer’s Reference Manual 695


7 WAL Function Reference
BES_write_image()

BES_err_invalid_batch_cap
The client attempted to read or write an image with an invalid batch
capability.

See Also
“BES_create_image()” on page 641

“BES_logon()” on page 668

“BES_open_image()” on page 675

“BES_update_image()” on page 690

“ASE_session_number_typ” on page 179

“BES_batch_cap_typ” on page 188

696 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CAM_add_file()

CAM_add_file()
CAM_add_file() adds a file to the cache and updates the internal file table
entry with the file name and size.

If a file already exists for the given ssn/doc_id/page_num and the append_flag
is FALSE, it does not write the data to the cache. If adding the file causes the
maximum size of the cache to be exceeded, cleanup is automatic.

If page_num is zero, the doc_id is presumed to be the window handle for the
calling client (the client is using a page from a disk file). In this case, the data
is always written, even if the file already exists.

Syntax
#include <cam.i>

error_typ CALLBACK CAM_add_file(ssn, doc_id, page_num, size, data_p,


append_flag, page_count);

Parameters
ssn unsigned long input. SSN of object. The special values ASE_
LOCAL_SSN and ASE_INVALID_SSN match any ssn.

doc_id FN_docnum_typ input. Document ID of file being put in


cache.

page_num unsigned short input. Page number (zero means always


write).

size unsigned long input. Number of bytes to be put in cache.

data_p PSTR input. Pointer to a buffer that contains compressed


image to be put in cache.

append_flag BOOL input. TRUE means append data to existing cache file,
if any. FALSE means to protect the overwriting of an existing
file.

page_count unsigned short input. The number of pages in the whole


document. This is stored and returned by CAM_find_file().
page_count can be zero, which means the current page
count is not to be updated. This might be useful when
append_flag is TRUE.

December 1996 WAL for Windows Programmer’s Reference Manual 697


7 WAL Function Reference
CAM_add_file()

Errors Returned
CAM_E_ALREADY_EXIST
The append_flag is FALSE and the file is already in cache.

See Also
“CAM_find_file()” on page 701

“FN_docnum_typ” on page 260

698 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CAM_delete_file()

CAM_delete_file()
CAM_delete_file() deletes a file that holds a page of a document from the
local cache.

When the cache is full, the CAM services have to find which objects to delete
and then delete them. To do this, the CAM services use the least-recently
used (LRU) deletion algorithm.

Your application can enhance performance by using this function to delete


objects, reducing the chance of the cache becoming full.

For more information on how objects are managed in local cache, see “CAM”
on page 33 of Chapter 3, “Data Flow Diagrams,” on page 25

This function can also be called to force a refresh of the documents in the
cache.

Syntax
#include <cam.i>

error_typ CALLBACK CAM_delete_file(ssn, doc_id, page_num);

Parameters
ssn unsigned long input. SSN of object. The special values ASE_
LOCAL_SSN and ASE_INVALID_SSN match any ssn.

doc_id FN_docnum_typ input. Document ID of file being put in


cache.

page_num unsigned short input. Page number.

Errors Returned
CAM_EE_FILE_NOT_FOUND
No such file in cache.

See Also
“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 699


7 WAL Function Reference
CAM_exit()

CAM_exit()
CAM_exit() deletes all temporary files in the cache.

Each application that uses CAM calls this function exactly once when
terminating or ending the Windows session. It decrements an internal client
count. When the client count reaches zero, CAM deletes the temporary files in
the cache.

Syntax
#include <cam.i>

error_typ CALLBACK CAM_exit(void);

700 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CAM_find_file()

CAM_find_file()
CAM_find_file() checks whether the compressed image file for the ssn/doc_id/
page_no exists in the cache. If so, it returns the file name of the temporary file
in which it is stored. The page count specified in CAM_add_file() is returned in
page_count_p.

Note Be sure to call CAM_init() exactly once before using CAM_find_file().

Syntax
#include <cam.i>

error_typ CALLBACK CAM_find_file(ssn, doc_id, page_num, file_name,


page_count_p);

Parameters
ssn unsigned long input. SSN of object. The special values ASE_
LOCAL_SSN or ASE_INVALID_SSN match any ssn.

doc_id FN_docnum_typ input. Document ID.

page_num unsigned short input. Page number.

file_name PSTR output. If the object file is found, file_name contains a


null-terminated string that is the complete pathname for the
file.

file_name must be large enough to hold the output;128 bytes


maximum.

page_count_p
unsigned short * output. If the object file is found, page_
count_p is a pointer to the number of pages in the entire
document.

Errors Returned
CAM_EE_FILE_NOT_FOUND
The specified file is not in the cache.

December 1996 WAL for Windows Programmer’s Reference Manual 701


7 WAL Function Reference
CAM_find_file()

See Also
“CAM_add_file()” on page 697

“FN_docnum_typ” on page 260

702 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CAM_get_attr()

CAM_get_attr()
CAM_get_attr() gets an attribute of a local cache object. If multiple
applications might access the same local cache object at the same time, use
this function to check whether the object is busy before you call functions such
as IAFLIB_get_object() or CAM_find_file().

Of the five attributes you can get, the most important is CAM_attr_xact_busy.
If CAM_attr_xact_busy is TRUE, the object has not yet been fully written into
the local cache.

CAM_add_file() can append data into a local cache one part at a time.
Because of this, there is a period during which CAM_find_file() or IAFLIB_
get_object() can return a file name before the object is fully written to the local
cache. Therefore, you receive the CAM_EE_XACT_BUSY error when you use
the file as though it contained the whole object. Call CAM_get_attr() when you
want your application to proceed without waiting until the whole object is
written to the local cache.

You can construct loops similar to the following:

CAM_init()

Loop2
Loop1
Use the data
CAM_add_file() Local (You can start to
CAM_get_attr()
CAM_set_attr() cache paint before the
whole file is added
to local cache.)

CAM_exit()

Loop1 adds the data one part at a time into the local cache while Loop2 uses
the available data one part at a time.

The fifth attribute in CAM_attr_typ, CAM_attr_csum, is used to store the


computed checksum of an image. When an object is copied from a server to a
PC, the original checksum is stored in CAM_attr_csum.

Note You must call CAM_init() exactly once before using CAM_get_file().

December 1996 WAL for Windows Programmer’s Reference Manual 703


7 WAL Function Reference
CAM_get_attr()

Steps required to use CAM_get_attr() to get the checksum of a local cache


object follow:

1 Read an object.

2 Call CS_compute_csum() to compute the checksum of the read object.

3 Call CAM_get_attr() to retrieve the original checksum.

4 Compare the computed checksum with the original checksum. If the two
checksums are not the same, the read object is different from the original
object. The object might have been corrupted during the device
I/O or network transfer.

Syntax
#include <cam.i>

error_typ CALLBACK CAM_get_attr(ssn, doc_id, page_num, attr_typ,


attr_ptr);

Parameters
ssn unsigned long input. SSN of object. The special values ASE_
LOCAL_SSN or ASE_INVALID_SSN match any ssn.

doc_id FN_docnum_typ input. Document ID.

page_num unsigned short input. Page number.

attr_typ CAM_attr_typ input. The type of attribute. Can be one of the


following:
CAM_attr_page_count
CAM_attr_target_size
CAM_attr_current_size
CAM_attr_xact_busy
CAM_attr_csum

attr_ptr PVOID output. The value of the attribute. Corresponds to the


input of attr_typ. Returns the pointer of the following data
types: WORD, DWORD, DWORD, BOOL, and DWORD.

704 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CAM_get_attr()

Errors Returned
CAM_EE_INVALID_ATTR
The attribute specified by attr_typ is not valid.

CAM_EE_XACT_BUSY
The object is busy. This error usually occurs when the object is not yet
completely written to the local cache.

See Also
“CAM_add_file()” on page 697

“CS_compute_csum()” on page 709

“CAM_find_file()” on page 701

“IAFLIB_get_object()” on page 1007

“CAM_attr_typ” on page 217

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 705


7 WAL Function Reference
CAM_init()

CAM_init()
CAM_init() increments an internal client count that CAM uses to determine
whether the temporary files in the cache should be deleted. Each application
that uses CAM should call it exactly once during initialization.

Syntax
#include <cam.i>

error_typ CALLBACK CAM_init(void);

706 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CAM_set_attr()

CAM_set_attr()
CAM_set_attr() sets an attribute of a local cache object. When using CAM_
add_file() to append an object into a local cache file one part at a time, use
CAM_set_attr() to set the attributes of the object to indicate the current status
of the object. This prevents other applications from treating the file as though
it contained the whole object.

Use this function when you want other applications to wait to use the whole
object until it is written into the local cache. For more information, see “CAM_
get_attr()” on page 703.

The fifth attribute in CAM_attr_typ, CAM_attr_csum stores the computed


checksum of an image. Use CAM_set_attr() to set the original checksum to
the local cache object. For more information, see “CS_compute_csum()” on
page 709.

Note You must call CAM_init() exactly once before using CAM_get_file().

Syntax
#include <cam.i>

error_typ CALLBACK CAM_set_attr(ssn, doc_id, page_num, attr_typ,


attr_ptr);

Parameters
ssn unsigned long input. SSN of object. The special values ASE_
LOCAL_SSN or ASE_INVALID_SSN match any ssn.

doc_id FN_docnum_typ input. Document ID.

page_num unsigned short input. Page number.

attr_typ CAM_attr_typ input. The attribute type. Can be one of the


following:
CAM_attr_page_count
CAM_attr_target_size
CAM_attr_current_size
CAM_attr_xact_busy
CAM_attr_csum

December 1996 WAL for Windows Programmer’s Reference Manual 707


7 WAL Function Reference
CAM_set_attr()

attr_ptr PVOID input. The value of the attribute. Corresponds to the


input of attr_typ. The data type of the value is WORD,
DWORD, DWORD, BOOL, and DWORD.

See Also
“CAM_add_file()” on page 697

“CAM_get_attr()” on page 703

“CAM_init()” on page 706

“CS_compute_csum()” on page 709

“CAM_attr_typ” on page 217

“FN_docnum_typ” on page 260

708 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CS_compute_csum()

CS_compute_csum()
CS_compute_csum() computes the checksum of the specified data and
returns it in csum. If a data object has been divided into more than one piece,
for example, in two buffers, use the following method to compute the total
checksum:

csum1 = CS_compute_csum (buf1_p, bytes_to_read1, 0);


csum2 = CS_compute_csum (buf2_p, bytes_to_read2, csum1);

where csum2 = the checksum of both buf1_p and buf2_p.

The computed checksum is in a format native to the local machine and should
be serialized across the network as a long word. If the local machine cannot
handle bigender format, long-swap the checksum before storing it on media
that must be in bigender format.

When checksumming images, buf_p must be on a 4 byte boundary. If CS_


compute_csum() is called multiple times to compute one checksum, all calls
prior to the last one must have a length which is a multiple of 4.

For applications other than checksumming images, buf_p does not need to be
on a 4 byte boundary, but “ptr modulo 4” must be the same each time CS_
compute_csum() is called.

Set Checksum
The checksum should be created as soon as the object is created. For
example, if the object (an image) is created from a PC, the checksum should
be computed and set right after the image verification state. The steps
include:

1 Read an image.

2 Display to verify the read image.

3 Call CS_compute_csum() to compute the checksum of the read image.

4 Call BES_close_csum_image() to send the image with the checksum to the


batch entry service.

5 Commit the batch. Be aware that every image in the batch must be closed by
BES_close_csum_image(), otherwise, none of the images will contain
checksums after the committal.

December 1996 WAL for Windows Programmer’s Reference Manual 709


7 WAL Function Reference
CS_compute_csum()

Get Checksum
When copying an object from a server to a PC, IAFLIB_get_object() stores the
original checksum in CAM_attr_csum using CAM_set_attr(). IAFLIB_get_
object() also computes the checksum of the read image to make sure the
image data is not corrupted during the network transfer. If the PC-computed
checksum is not the same as the original checksum, the function returns the
CSM_invalid_checksum error.

The original checksum that is stored in CAM_attr_csum can also be used in


the following way:

1 Call CAM_get_attr() to retrieve the original checksum.

2 After you have moved the image from one device to another, read the image.

3 Call CS_compute_csum() to compute the checksum of the read image.

4 Compare the computed checksum with the original checksum to test for
corruption.

Syntax
#include <cs.i>

DWORD CALLBACK CS_compute_csum(buf_p, bytes_to_read,


partial_sum);

Parameters
buf_p PSTR input. Pointer to data buffer.

bytes_to_read DWORD input. Number of bytes to checksum.

partial_sum DWORD input. Checksum computed so far. If data is in one


piece, specify 0 and the checksum is returned from the
function. If data is in multiple pieces, specify zero for the first
call to CS_compute_csum() and specify the checksum
returned from the previous call to CS_compute_csum on
subsequent calls.

Note This function requires IMS software version 3.0 or later.

710 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CS_compute_csum()

See Also
“BES_close_csum_image()” on page 631

“CAM_get_attr()” on page 703

“CAM_set_attr()” on page 707

“IAFLIB_get_object()” on page 1007

December 1996 WAL for Windows Programmer’s Reference Manual 711


7 WAL Function Reference
CSM_close_object()

CSM_close_object()
CSM_close_object() closes an object in the server cache and zeroes the
handle in oh (open object handles are never zero).

If the update parameter is FALSE, the attributes (not data) of the object are
not updated; these attributes are cur_length, last_read, duration, security, and
client_attr. Therefore, calls to CSM_modify_object() made while this object
was open do not change the value of these attributes when update is FALSE.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_close_object (handle, oh, update);

Parameters
handle ASE_session_number_typ input. The server cache handle
returned from CSM_logon().

oh CSM_object_handle_typ input/output. The object handle


returned from CSM_open_object(). Zero after the function
returns.

update FN_BOOL input. Indicates whether to update the object


attributes.

See Also
“CSM_logon()” on page 715

“CSM_modify_object()” on page 717

“CSM_open_object()” on page 718

“ASE_session_number_typ” on page 179

“CSM_object_handle_typ” on page 225

The sample application in C:\FILENET\SAMPLES\CSM\

712 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CSM_delete_object()

CSM_delete_object()
CSM_delete_object() deletes the object(s) indicated. This action deletes an
object from a non-reference count cache and decrements the reference count
by 1 for a reference count cache. The object is physically removed from a
reference count cache only when the reference count is 1 prior to this call.

The caller must be logged on to the server cache with DELETE access.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_delete_object (handle, object_p);

Parameters
handle ASE_session_number_typ input. The server cache handle
returned from CSM_logon().

object_p CSM_object_desc_typ * input. Object description, which can


include one of the following wildcard specifications:

1. object_p->page == CSM_ALL_PAGES

2. object_p->page == CSM_ALL_PAGES and


object_p->id == CSM_ALL_DOCS

3. object_p->page == CSM_ALL_PAGES and


object_p->id == CSM_ALL_DOCS and
object_p->ssn == CSM_ALL_SSNS

If a wildcard is used, the initial value of the object_p->page


field might be altered by CSM_delete_object().

See Also
“CSM_logon()” on page 715

“ASE_session_number_typ” on page 179

“CSM_object_desc_typ” on page 224

The sample application in C:\FILENET\SAMPLES\CSM\

December 1996 WAL for Windows Programmer’s Reference Manual 713


7 WAL Function Reference
CSM_logoff()

CSM_logoff()
CSM_logoff() closes a connection to the Cache Services Manager. Any object
which is open on this handle is closed. Any CSM transaction in progress on
this handle is terminated.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_logoff (handle);

Parameters
handle ASE_session_number_typ input. Handle for the cache
service returned from CSM_logon().

See Also
“CSM_logon()” on page 715

“ASE_session_number_typ” on page 179

The sample application in C:\FILENET\SAMPLES\CSM\

714 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CSM_logon()

CSM_logon()
CSM_logon() establishes a connection to the Cache Services Manager.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_logon (credential_p, service_name, cache_id,


mode, session_number, timeout);

Parameters
credential_p PSTR. Input. ID of system logged on to the IMS server.

service_name ASE_service_name_typ * input. Pointer to the NCH name for


desired Cache or Document Service. Use NULL for default.

cache_id CSM_cache_id_typ input. ID of the server cache if multiple


caches exist.

mode CSM_cache_access_mode input. Open mode for the server


cache. Can have one of the following values:
CSM_CACHE_READ
CSM_CACHE_WRITE
CSM_CACHE_DELETE
CSM_CACHE_READWRITE
CSM_CACHE_READDELETE
CSM_CACHE_READWRITEDELETE

session_number
ASE_session_number_typ * output. Handle for the cache
service.

timeout WORD * input. Pointer to the minimum number of seconds


that the connection will remain active.

See Also
“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

December 1996 WAL for Windows Programmer’s Reference Manual 715


7 WAL Function Reference
CSM_logon()

“CSM_cache_access_mode” on page 220

“CSM_cache_id_typ” on page 221

The sample application in C:\FILENET\SAMPLES\CSM\

716 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CSM_modify_object()

CSM_modify_object()
CSM_modify_object() alters the attributes of an object in the server cache.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_modify_object (number, oh, new_attr_p);

Parameters
number ASE_session_number_typ input. The server cache handle
returned from CSM_logon().

oh CSM_object_handle_typ input. The object handle returned


from CSM_open_object().

new_attr_p CSM_object_attr_typ * input. The new attributes for the


object.

See Also
“CSM_logon()” on page 715

“CSM_open_object()” on page 718

“ASE_session_number_typ” on page 179

“CSM_object_attr_typ” on page 222

“CSM_object_handle_typ” on page 225

The sample application in C:\FILENET\SAMPLES\CSM\

December 1996 WAL for Windows Programmer’s Reference Manual 717


7 WAL Function Reference
CSM_open_object()

CSM_open_object()
CSM_open_object() opens an object in the server cache. An object must be
opened before it can be read.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_open_object (handle, object_p, mode, oh_p,


attr_p);

Parameters
handle ASE_session_number_typ input. The server cache handle
obtained from CSM_logon().

object_p CSM_object_desc_typ * input. Object description, which can


include one of the following wildcard specifications:

1. object_p->page == CSM_ALL_PAGES

2. object_p->page == CSM_ALL_PAGES and


object_p->id == CSM_ALL_DOCS

3. object_p->page == CSM_ALL_PAGES and


object_p->id == CSM_ALL_DOCS and
object_p->ssn == CSM_ALL_SSNS

If a wildcard is used, the initial value of the


object_p->page field might be altered by CSM_open_
object().

mode CSM_object_access_mode input. Open mode for the object.


Can have the following values:

CSM_OBJECT_READ opens the object in shared mode.


Others can also have the object open for read at the same
time. The object can only be read when opened in this mode.

CSM_OBJECT_WRITE opens the object in exclusive mode


for either reads or writes. No other entity can have the object
open when this mode is used.

CSM_OBJECT_READNOUPDATE is the same as CSM_


OBJECT_READ, except that it won’t update the object to

718 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CSM_open_object()

record the “last_read” time. This option is a performance


optimization over CSM_OBJECT_READ mode.

oh_p CSM_object_handle_typ * output. Handle used to access the


object.

attr_p CSM_object_attr_typ * output. Object attributes.

See Also
“CSM_logon()” on page 715

“ASE_session_number_typ” on page 179

“CSM_cache_access_mode” on page 220

“CSM_object_attr_typ” on page 222

“CSM_object_desc_typ” on page 224

“CSM_object_handle_typ” on page 225

The sample application in C:\FILENET\SAMPLES\CSM\

December 1996 WAL for Windows Programmer’s Reference Manual 719


7 WAL Function Reference
CSM_read_object()

CSM_read_object()
CSM_read_object() reads data from an object in the server cache. Reads the
number of bytes requested from the specified offset in the object. If the read
passes the end of the object, but starts within the object, *bytes_read_p
equals the object size minus the starting offset and no error is returned. If the
read starts past the end of the object, a CSM_out_of_range error is returned.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_read_object (number, oh, offset, data_siz,


data_h, bytes_read_p);

Parameters
number ASE_session_number_typ input. The server cache handle
returned from CSM_logon().

oh CSM_object_handle_typ input. The object handle returned


from CSM_open_object().

offset unsigned long input. The offset at which the read should
start.

data_siz unsigned long input. The number of bytes to read.

data_h HANDLE input/output. The buffer to hold the data that is


read.

bytes_read_p unsigned long * output. The number of bytes read.

See Also
“CSM_logon()” on page 715

“CSM_open_object()” on page 718

“ASE_session_number_typ” on page 179

“CSM_object_handle_typ” on page 225

The sample application in C:\FILENET\SAMPLES\CSM\

720 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
CSM_renew()

CSM_renew()
CSM_renew() re-establishes a connection to the Cache Services Manager
when there is a disconnect without logoff.

Syntax
#include <iaflib.i>

error_typ CALLBACK CSM_renew (credential_p, service_name, cache_id,


mode, session_number, timeout);

Parameters
credential_p PSTR input. ID of system logged onto the IMS server.

service_name ASE_service_name_typ * input. Pointer to the NCH name for


desired Cache or Document Service. Use NULL for default.

cache_id CSM_cache_id_typ input. ID of the server cache if multiple


caches exist.

mode CSM_cache_access_mode input. Open mode for the server


cache. Can have one of the following values:
CSM_CACHE_READ
CSM_CACHE_WRITE
CSM_CACHE_DELETE
CSM_CACHE_READWRITE
CSM_CACHE_READDELETE
CSM_CACHE_READWRITEDELETE

session_number
ASE_session_number_typ output. Handle for the cache
service.

timeout WORD * input. Pointer to the minimum number of seconds


the connection will remain active.

See Also
“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

December 1996 WAL for Windows Programmer’s Reference Manual 721


7 WAL Function Reference
CSM_renew()

“CSM_cache_access_mode” on page 220

“CSM_cache_id_typ” on page 221

The sample application in C:\FILENET\SAMPLES\CSM\

722 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_close_object()

DISPLIB_close_object()
DISPLIB_close_object() closes any FileNet banded image file opened by
DISPLIB_get_band_bitmap(). It leaves the file open after a call to DISPLIB_
get_band_bitmap() with a file status parameter of DISP_INIT_FILE.

This function is not necessary in conjunction with the DISPLIB_paint_object()


function, which is the recommended replacement for DISPLIB_get_band_
bitmap() and IAFLIB_get_band_bitmap().

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_close_object(disp_h);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
call to DISPLIB_init_handle().

See Also
“DISPLIB_get_band_bitmap()” on page 727

“DISPLIB_init_handle()” on page 730

“DISPLIB_paint_object()” on page 733

The sample application in C:\FILENET\SAMPLE\IMAGE\

December 1996 WAL for Windows Programmer’s Reference Manual 723


7 WAL Function Reference
DISPLIB_free_handle()

DISPLIB_free_handle()
DISPLIB_free_handle() frees memory allocated for a DISPLIB context handle
obtained from a prior call to DISPLIB_init_handle().

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_free_handle(disp_h);

Parameters
disp_h HANDLE input. The DISPLIB context handle obtained from a
call to DISPLIB_init_handle().

See Also
“DISPLIB_init_handle()” on page 730

The sample applications in the directories C:\FILENET\SAMPLE\IMAGE\ and


C:\FILENET\SAMPLE\LPRINT\

724 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_free_object()

DISPLIB_free_object()
DISPLIB_free_object() frees an object previously registered with DISPLIB_
register_object().

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_free_object(disp_h);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
prior call to DISPLIB_init_handle().

See Also
“DISPLIB_init_handle()” on page 730

“DISPLIB_register_object()” on page 737

The sample application in the directory C:\FILENET\SAMPLE\IMAGE\

December 1996 WAL for Windows Programmer’s Reference Manual 725


7 WAL Function Reference
DISPLIB_get_attr()

DISPLIB_get_attr()
DISPLIB_get_attr() retrieves the specified attribute for a currently-registered
object. Before you call this function, you must call DISPLIB_register_object()
to register the object. If you do not register the object, this function returns an
error (DISPLIB_not_registered).

Specify all size attributes with a POINT structure. Specify all scaling factors
with a RECT structure as in the scaling rectangle passed into DISPLIB_paint_
object(). All other attributes are of type WORD.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_get_attr(disp_h, attr_p, type);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
prior call to DISPLIB_init_handle().

attr_p PSTR output. Pointer to the structure to receive the attribute.

type WORD input. Valid attribute types are:


DISP_ATTR_DISP_MODE
DISP_ATTR_SCALE_FACTORS
DISP_ATTR_FORMAT
DISP_ATTR_NATIVE_SIZE
DISP_ATTR_SCALED_SIZE
DISP_ATTR_RESOLUTION
DISP_ATTR_FORM_HANDLE
DISP_ATTR_TIFF_HANDLE
DISP_ATTR_UNSUPPORTED_TIFF
DISP_ATTR_EDIT_APPNAME
DISP_ATTR_EDIT_FILENAME

See Also
“DISPLIB_init_handle()” on page 730

“DISPLIB_paint_object()” on page 733

“DISPLIB_register_object()” on page 737

726 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_get_band_bitmap()

DISPLIB_get_band_bitmap()
DISPLIB_get_band_bitmap() returns a Windows bitmap object containing the
requested band in a format suitable for use in a SelectObject, BitBlt sequence
of GDI calls. It reads the band from the specified file and decompresses and
scales it, as needed, based on the other input parameters.

After making all DISPLIB_get_band_bitmap() calls to an image, use


DISPLIB_close_object() to close the image file.

We recommend using DISPLIB_paint_object() instead of this function for


painting images in an output device context. DISPLIB_get_band_bitmap()
assumes that the file is a FileNet banded image. Using DISPLIB_paint_
object() avoids this and eliminates your having to break an image into bands.
Request the desired portion of the image in full using DISPLIB_paint_object().

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_get_band_bitmap(disp_h, wnd_h, file_name,


file_status, scan_line, disp_mode, scale_rect, prior_lines, prior_disp,
band_lines, disp_width, disp_lines, bitmap_h_p);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
prior call to DISPLIB_init_handle().

wnd_h HWND input. Handle for window of bitmap designation, used


only when the mode is DISP_WHOLE or DISP_STRETCH to
calculate the appropriate scaling factors.

file_name PSTR input. A FileNet banded image file.

file_status BOOL (int) input. Set status to DISP_INIT_FILE for the first
DISPLIB_get_band_bitmap() call per file name to read the
entire header and fill in general image related structures. Use
DISP_SAME_FILE for subsequent calls to optimize
performance. Note that DISPLIB_paint_object() performs all
optimizations in a manner that is transparent to the client.

scan_line int input. Scanline in native object resolution of the band


desired. E.g., any scanline value from 0 to 63 in a typical
FileNet banded image causes the first band to be returned.

December 1996 WAL for Windows Programmer’s Reference Manual 727


7 WAL Function Reference
DISPLIB_get_band_bitmap()

disp_mode int input. The display. Can be one of the following:


DISP_PRESET
DISP_SCALE
DISP_EGA
DISP_100DPI
DISP_WHOLE

scale_rect PRECT input. The bounding rectangle when the display


mode is either DISP_WHOLE or DISP_STRETCH. The
scaling rectangle when the mode is DISP_SCALE. The
image is scaled by scale_rect->left / scale_rect->top
horizontally, and scale_rect->right / scale_rect-> bottom
vertically.

prior_lines PINT output. Number of scanlines in the native resolution


prior to this band.

prior_disp PINT output. Same as prior_lines, except in the display


resolution specified by the disp_mode.

band_lines PINT output. Number of scanlines in this band in native


object resolution.

disp_width PINT output. Width of band in the resolution specified by the


disp_mode.

disp_lines PINT output. Same as band_lines, except in the display


resolution specified by the disp_mode.

bitmap_h_p HBITMAP * output. Pointer to the handle for the bitmap. Must
be freed by calling DISPLIB_close_object() before changing
to new image.

See Also
“DISPLIB_close_object()” on page 723

“DISPLIB_get_band_bitmap()” on page 727

“DISPLIB_init_handle()” on page 730

“DISPLIB_paint_object()” on page 733

The sample application in the directory C:\FILENET\SAMPLE\IMAGE\

728 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_get_format()

DISPLIB_get_format()
DISPLIB_get_format() returns the format of the object. The file type
recognition algorithm is the same as that used by DISPLIB_paint_object() or
DISPLIB_register_object() with a DISPLIB_unknown file format parameter.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_get_format(file_name, format_p);

Parameters
file_name PSTR input. File name of object.

format_p WORD * output. Pointer to the format of object returned as a


DISPLIB file format.

See Also
“DISPLIB_paint_object()” on page 733

“DISPLIB_register_object()” on page 737

The sample applications in the directories C:\FILENET\SAMPLE\IMAGE\ and


C:\FILENET\SAMPLE\LPRINT\

December 1996 WAL for Windows Programmer’s Reference Manual 729


7 WAL Function Reference
DISPLIB_init_handle()

DISPLIB_init_handle()
DISPLIB_init_handle() allocates memory for a DISPLIB context and returns a
handle to the memory. It must eventually be called to free the allocated
memory.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_init_handle(disp_h_p);

Parameters
disp_h_p HANDLE * output. Pointer to the DISPLIB context handle for
subsequent DISPLIB functions.

See Also
“DISPLIB_free_handle()” on page 724

The sample applications in the directories C:\FILENET\SAMPLE\IMAGE\ and


C:\FILENET\SAMPLE\LPRINT\

730 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_paint_bitmap()

DISPLIB_paint_bitmap()
DISPLIB_paint_bitmap() paints a bitmap into the output display context in
ps p using the specified parameters. Does not use StretchBlt, so color is not
retained in the operation.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_paint_bitmap(ps_p, bitmap_h, x, y, xa, xb, ya,


yb, rotation, strip_size, scan_lines_p);

Parameters
ps_p LPPAINTSTRUCT input. Pointer to the output paintstruct.
Only the hdc and rcPaint fields are used.

bitmap_h HBITMAP input. Handle for the bitmap to paint into output
display context.

x int input. x and y are the origins of the bitmap in output device
context. The unit is a pixel.

y int input. See description of x above.

xa int input. Horizontal scaling factor xa/xb. xa and xb become


the fraction used to scale the original image. The numerator
must be less than or equal to the denominator and the
denominator must be less than or equal to 32.

xb int input. See description of xa above.

ya int input. Vertical scaling factor ya/yb. ya and yb become the


fraction used to scale the original image. The numerator must
be less than or equal to the denominator and the
denominator must be less than or equal to 32.

yb int input. See description of ya above.

rotation WORD input. Amount of rotation. Values are:


DISPLIB_0_DEGREES
DISPLIB_90_DEGREES
DISPLIB_180_DEGREES
DISPLIB_270_DEGREES

December 1996 WAL for Windows Programmer’s Reference Manual 731


7 WAL Function Reference
DISPLIB_paint_bitmap()

strip_size WORD input. Size of banding. Use at least 64 for scaling


quality comparable to scaling of FileNet banded images.

scan_lines_p WORD * output. Pointer to the actual number of scanlines in


the output. Note that this is the number of scanlines
regardless of the rotation, not the actual result height (which
is the image width when rotating 90 or 270 degrees).

See Also
The sample application in the directory C:\FILENET\SAMPLE\IMAGE\.

732 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_paint_object()

DISPLIB_paint_object()
DISPLIB_paint_object() paints an object into an output device context. The
file can be in any of the formats shown in the following table. The second
column of the table indicates the constant name for the format.

PCX DISPLIB_pcx
Windows 2 bitmaps DISPLIB_bmp
Windows 3 device independent bitmaps DISPLIB_dib
FileNet forms DISPLIB_fn_pcform
FileNet COLD documents DISPLIB_fn_cold
FileNet banded images DISPLIB_fn_image
FileNet tiled images DISPLIB_fn_tiled
Windows 2 Microsoft Paint DISPLIB_msp

Note WAL for Windows supports some TIFF image formats. If you need more
information, contact FileNet for details about which TIFF image formats are
supported.

Color is supported when rotation is 0 or 180 for FileNet PC forms and


Windows 3 device independent bitmaps; when rotation is 90 or 270, a black
and white rendering is produced.

Repeated painting is greatly optimized by registering the object with the


DISPLIB_register_object() before calling DISPLIB_paint_object(). If the object
is not registered, DISPLIB_paint_object() registers and frees the object in one
DISPLIB_paint_object() call.

DISPLIB_paint_object() performs one or two types of callback functions


depending on the type of page it is processing. For more information, see
“DISPLIB_yield_typ()” on page 746 and “DISPLIB_retrieve_typ()” on
page 739.

The function to which the yield_p parameter points is called before each band
is painted. This enables you to abort DISPLIB_paint_object() if, for example,
the user indicates that the object is no longer of interest. DISPLIB_paint_
object() sends to the yield_p function the client handle that was passed to it
when it was called. The yield_p function can:

December 1996 WAL for Windows Programmer’s Reference Manual 733


7 WAL Function Reference
DISPLIB_paint_object()

• Return success (zero). Then DISPLIB_paint_object() continues until the


next band is encountered and the yield_p function is called again.

• Return an error. Then DISPLIB_paint_object() aborts returning the error


from the yield_p function to the client.

To display the background image with the PCODE page, the DISPLIB_set_
retrieval() function must precede calls to DISPLIB_paint_object(). DISPLIB_
set_retrieval()’s retrieve_p parameter is a pointer to the function that
DISPLIB_paint_object() calls when it discovers that the PCODE page has a
background image. DISPLIB_paint_object() sends the client handle provided
in the DISPLIB_set_retrieval() function and information about the background
image to the retrieve_p function. This information is the system serial
number (SSN), document ID, and page number for the background image.
See “DISPLIB_retrieve_typ()” on page 739 for more information.

The retrieve_p function can:

• Return success (zero) and a NULL for the file_name parameter

This causes the PCODE page to be painted without the background


image.

• Call IAFLIB_get_object() to make the background image available

Return success (zero) and the file_name for the file containing the
background image. Then DISPLIB_paint_object() paints the background
image as well as the PCODE page.

• Return an error to DISPLIB_paint_object(), causing it to abort and return


the error from retrieve_p to the client

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_paint_object(disp_h, ps_p, file_name, x, y,


mode, scale_rect, rotation, yield_p, yield_h);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
prior call to DISPLIB_init_handle().

734 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_paint_object()

ps_p LPPAINTSTRUCT input. Only hdc and rcPaint fields are


used. The hdc is the output device context and the rcPaint
rectangle describes the clipping rect for the paint operation.

file_name PSTR input. Complete pathname of object to be displayed.

x int input. x and y are the origins of the bitmap in output device
context. The unit is a pixel.

y int input. See description of x above.

mode int input. Display mode (e.g., DISP_SCALE). Use DISP_


PRESET to use display parameters set via a combination of
DISPLIB_register_object() and DISPLIB_set_attr() calls.

scale_rect PRECT input. See “DISPLIB_get_band_bitmap()” on


page 727. Not required for irrelevant display modes.

rotation WORD input. Amount of rotation. Values are:


DISPLIB_0_DEGREES
DISPLIB_90_DEGREES
DISPLIB_180_DEGREES
DISPLIB_270_DEGREES

yield_p DISPLIB_yield_typ input. Pointer to callback function to be


called before painting each band of data. Even bitmaps are
broken down to bands to speed up painting of subregions
and provide client interrupt control via this callback. This is a
function type (rather than a data structure); see “DISPLIB_
yield_typ()” on page 746. When NULL, no callback is to be
made.

yield_h HANDLE input. A client-supplied private handle that is


passed to the function pointed to by yield_p as part of the
callback between band paints. When NULL, a NULL handle
is used.

See Also
“DISPLIB_init_handle()” on page 730

“DISPLIB_register_object()” on page 737

“DISPLIB_retrieve_typ()” on page 739

December 1996 WAL for Windows Programmer’s Reference Manual 735


7 WAL Function Reference
DISPLIB_paint_object()

“DISPLIB_set_attr()” on page 741

“DISPLIB_set_retrieval()” on page 743

“DISPLIB_yield_typ()” on page 746

“IAFLIB_get_object()” on page 1007

The sample applications in the directories C:\FILENET\SAMPLE\IMAGE\ and


C:\FILENET\SAMPLE\LPRINT\

736 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_register_object()

DISPLIB_register_object()
DISPLIB_register_object() registers an object for subsequent DISPLIB_paint_
object() calls by causing the header to be read and structures to be initialized
for optimized subsequent paints. The file name passed in doesn’t have to be
the same across subsequent DISPLIB_paint_object() calls, but the object
being displayed must be identical to the object being registered.

If this function is not used prior to calling DISPLIB_paint_object(), DISPLIB_


paint_object() performs a DISPLIB_register_object() and a DISPLIB_free_
object() as a part of each call to it.

Subsequent DISPLIB_register_object() calls (to switch from one file to


another) perform an implicit DISPLIB_free_object(), if necessary.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_register_object(disp_h, file_name, format);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
prior call to DISPLIB_init_handle().

file_name PSTR input. Complete pathname to file containing object to


be registered.

format WORD input. Format of file. Using DISPLIB_unknown makes


DISPLIB automatically recognize the file format. If file format
is unsupported, DISPLIB_register_object() fails and returns
an error. The formats are:
DISPLIB_unknown
DISPLIB_fn_image
DISPLIB_fn_cold
DISPLIB_fn_form
DISPLIB_fn_pcform
DISPLIB_fn_wordflo
DISPLIB_fn_tiled
DISPLIB_fn_other
DISPLIB_fn_format(x) (x > 0 && x < 10)
DISPLIB_bmp
DISPLIB_pcx
DISPLIB_dib_pm

December 1996 WAL for Windows Programmer’s Reference Manual 737


7 WAL Function Reference
DISPLIB_register_object()

DISPLIB_dib
DISPLIB_msp
DISPLIB_tiff
DISPLIB_jpeg

See Also
“DISPLIB_free_object()” on page 725

“DISPLIB_init_handle()” on page 730

“DISPLIB_paint_object()” on page 733

“DISPLIB_register_object()” on page 737

The sample application in the directory C:\FILENET\SAMPLE\IMAGE\

738 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_retrieve_typ()

DISPLIB_retrieve_typ()
DISPLIB_retrieve_typ() is one of the callback type that retrieves a committed
FileNet banded image. DISPLIB handles COLD pages that contain embedded
references to FileNet banded images only in this way. The DISPLIB_set_
retrieval() function sends DISPLIB a handle (retrieve_h) to a function of the
DISPLIB_retrieve_typ() type. When the DISPLIB_paint_object() function
realizes that the PCODE page (COLD page) it is processing has an
embedded reference to a committed document (a background image), it calls
the function to which retrieve_p points and sends it to the client handle
provided earlier by the DISPLIB_set_retrieval() function. It also sends the
function to which retrieve_p points the system serial number (SSN), document
ID, and page number for the embedded document.

The function to which retrieve_h points can use IAFLIB_get_object() to


retrieve that image. If so, it returns the file_name for the image and success. If
it sends NULL as the file name and success, DISPLIB_paint_object() paints
the PCODE page without the background image. If it returns an error,
DISPLIB_paint_object() aborts and returns the error from retrieve_h to the
client.

Callback functions use the CALLBACK calling convention. A callback function


must be exported by including it in an EXPORTS statement in the
application’s module-definition file.

Syntax
#include <displib.i>

typedef error_typ (CALLBACK *DISPLIB_retrieve_typ) (retrieve_h, ssn, doc,


page, file_name);

Parameters
retrieve_h HANDLE input. A client-supplied handle for the DISPLIB_
set_retrieval() function.

ssn unsigned long input. SSN of page to be retrieved.

doc unsigned long input. Committed doc ID of page to be


retrieved.

page WORD input. Page number of page to be retrieved.

December 1996 WAL for Windows Programmer’s Reference Manual 739


7 WAL Function Reference
DISPLIB_retrieve_typ()

file_name PSTR output. The name of the file containing the retrieved
page.

See Also
“DISPLIB_paint_object()” on page 733

“DISPLIB_set_retrieval()” on page 743

“IAFLIB_get_object()” on page 1007

740 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_set_attr()

DISPLIB_set_attr()
DISPLIB_set_attr() sets attributes for the currently-registered object. You can
use it to set attributes such as scaling factors, display mode, and scale to fit.

You can also use this function to set two callback functions. For more
information about setting the DISPLIB_retrieve_cb() and DISPLIB_input_cb()
callback functions, see Chapter 6, “Data Types and Structures,” on page 163.

The DISPLIB_retrieve_typ() callback function can also be set from the


DISPLIB_set_retrieval() call. We recommend that you set it from DISPLIB_
set_attr() using the DISPLIB_retrieve_cb structure.

Before you call this function, you must first call DISPLIB_register_object() to
register the object. If you do not register the object, this function returns an
error (DISPLIB_not_registered).

Scale-to-Gray
When using gray-scaling, call DISPLIB_set_attr() with the DISP_ATTR_
HWND attribute. Pass in the window handle as the attribute value. Next, set
the SCALETOGRAY attribute. Do this before painting the object. For example:

DISPLIB_set_attr (disp_h, hWnd, DISP_ATTR_HWND);

DISPLIB_set_attr (disp_h, DISP_ATTR_FAVOR_MODE, SCALETOGRAY);

Other Windows favor modes do not need the extra DISP_ATTR_HWND call.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_set_attr(disp_h, attr, type);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
prior call to DISPLIB_init_handle().

attr DWORD input. The new attribute value (a pointer to that


value if the attribute is larger than a DWORD).

type WORD input. Valid attribute types are:


DISP_ATTR_FAVOR_MODE (see below)
DISP_ATTR_DISP_MODE

December 1996 WAL for Windows Programmer’s Reference Manual 741


7 WAL Function Reference
DISPLIB_set_attr()

DISP_ATTR_SCALE_FACTORS
DISP_ATTR_FORMAT
DISP_ATTR_NATIVE_SIZE
DISP_ATTR_SCALED_SIZE
DISP_ATTR_RESOLUTION
DISP_ATTR_SCALE_TO_FIT
DISP_ATTR_FORM_HANDLE
DISP_ATTR_RETRV_CALLBACK
DISP_ATTR_INPUT_CALLBACK
DISP_ATTR_HWND
DISP_ATTR_FAVOR_MODE
DISP_ATTR_STORE_ROTATION
DISP_ATTR_TIFF_HANDLE
DISP_ATTR_UNSUPPORTED_TIFF
DISP_ATTR_EDIT_APPNAME
DISP_ATTR_EDIT_FILENAME

Constants for DISP_ATTR_FAVOR_MODE:


(from Windows.h):
wFavorMode1 = BLACKONWHITE
wFavorMode2 = WHITEONBLACK
wFavorMode3 = COLORONCOLOR
(from scl2gray.h):
wFavorMode4 = SCALETOGRAY

See Also
“DISPLIB_init_handle()” on page 730

“DISPLIB_register_object()” on page 737

“DISPLIB_set_attr()” on page 741

“DISPLIB_set_retrieval()” on page 743

The sample application in the directory C:\FILENET\SAMPLE\IMAGE\ and


“DISPLIB Constants” on page 227

742 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_set_retrieval()

DISPLIB_set_retrieval()
DISPLIB_set_retrieval() sets the retrieval callback function for all subsequent
DISPLIB_paint_object() calls using the current DISPLIB handle (disp_h) until
another DISPLIB_set_retrieval() function sends a new or a NULL callback
function.

The retrieve_p parameter points to the retrieval callback function and


“DISPLIB_retrieve_typ()” on page 739 describes it in detail. It is used to
retrieve the FileNet PCODE page (e.g., COLD page) that references a
committed document page as a background image.

The DISPLIB_retrieve_typ can also be set from DISPLIB_set_attr() using the


DISPLIB_retrieve_cb structure, which is the recommended method to call the
DISPLIB_retrieve_typ() callback.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_set_retrieval(disp_h, retrieve_p, retrieve_h);

Parameters
disp_h HANDLE input. A DISPLIB context handle obtained from a
prior call to DISPLIB_init_handle().

retrieve_p DISPLIB_retrieve_typ input. A pointer to a callback function


to retrieve documents. This is a function type (not a data
structure).

retrieve_h HANDLE input. A private client handle passed back in the


retrieval callback. When NULL, a NULL handle is used.

See Also
“DISPLIB_init_handle()” on page 730

“DISPLIB_paint_object()” on page 733

“DISPLIB_retrieve_typ()” on page 739

“DISPLIB_set_attr()” on page 741

“DISPLIB_retrieve_cb” on page 231

December 1996 WAL for Windows Programmer’s Reference Manual 743


7 WAL Function Reference
DISPLIB_stretch_bitmap()

DISPLIB_stretch_bitmap()
DISPLIB_stretch_bitmap() paints a bitmap (must be less than 64K) into the
output device context using a specified location. It can also stretch and rotate
the bitmap.

Syntax
#include <displib.i>

error_typ CALLBACK DISPLIB_stretch_bitmap(hdc, x, y, angle, bitmap_h, xa,


xb, ya, yb, rop, alg, lines_out);

Parameters
hdc HDC input. Output device context.

x int input. x and y coordinates set the focal point of the bitmap
in the output device context. The function stretches from this
point. The function rotates the bitmap using this point as the
axis. The unit is a pixel.

y int input. See description of x above.

angle WORD input. Amount of rotation. Values are DISPLIB_0_


DEGREES
DISPLIB_90_DEGREES
DISPLIB_180_DEGREES
DISPLIB_270_DEGREES

bitmap_h HBITMAP input. Bitmap to stretch or rotate. Bitmap must be


less than 64K.

xa int input. Horizontal scaling factor xa/xb. xa and xb are the


factors in the fraction used to scale the original image. The
numerator must be less than or equal to the denominator and
the denominator must be less than or equal to 32.

xb int input. See description of xa above.

ya int input. Vertical scaling factor ya/yb. ya and yb are the


factors in the fraction used to scale the original image. The
numerator must be less than or equal to the denominator and
the denominator must be less than or equal to 32.

744 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DISPLIB_stretch_bitmap()

yb int input. See description of ya above.

rop DWORD input. Raster operation to use when transferring


bitmap. It is defined in WINDOWS.H (e.g., SRCCOPY).

alg WORD input. Currently not used. Set this to zero.

lines_out PWORD output. Number of lines (height) of the new bitmap.

Note This function does not use the Windows StretchBlt function. The color of the
bitmap is not retained in this operation.

December 1996 WAL for Windows Programmer’s Reference Manual 745


7 WAL Function Reference
DISPLIB_yield_typ()

DISPLIB_yield_typ()
DISPLIB_yield_typ() operates when called by DISPLIB_paint_object(), just
before each band is painted. If it returns success, DISPLIB_paint_object()
paints the band. If it returns an error, DISPLIB_paint_object() aborts the paint
and returns its error as the DISPLIB_paint_object() return value.

Callback functions use the CALLBACK calling convention. A callback function


must be exported by including it in an EXPORTS statement in the
application’s module-definition file.

Syntax
#include <displib.i>

typedef error_typ (CALLBACK *DISPLIB_yield_typ) (yield_h);

Parameters
yield_h HANDLE input. A client-supplied private handle passed into
DISPLIB_paint_object(). When NULL, a NULL handle is
used.

See Also
“DISPLIB_paint_object()” on page 733

746 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_addtime()

DTM_addtime()
DTM_addtime() adds the period to which period_p points to the period to
which source_p points, returning the result in the date/time structure to which
answer_p points.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_addtime(answer_p, source_p, period_p);

Parameters
answer_p DTM_tm * output. Pointer to the date/time structure holding
the result date or time.

source_p DTM_tm * input. Pointer to a date/time structure to which the


value indicated by period_p is added.

period_p DTM_tm * input. Pointer to a date/time structure containing


the period to add to source_p.

Note The three date/time structures must be distinct. The calculation cannot be
done in place; answer_p cannot be the same structure as either period_p or
source_p.

See Also
“DTM_tm” on page 254

December 1996 WAL for Windows Programmer’s Reference Manual 747


7 WAL Function Reference
DTM_asctime()

DTM_asctime()
DTM_asctime() converts a date/time structure into a date or time string using
a given mask. It formats the date/time structure to which time_p points into the
string time_string, using the mask provided by mask.

DTM_StructToString() is an alternate name for DTM_asctime().

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_asctime(time_string, time_p, mask);

Parameters
time_string char * output. The time string.

time_p DTM_tm * input. Pointer to a date/time structure.

mask char * input. The mask. See “DTM Masks” on page 251.

See Also
“DTM_tm” on page 254

748 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_ctime()

DTM_ctime()
DTM_ctime() converts a date or time number to a date or time string using a
given mask. It formats the date or time to which time_num_p points into the
string time_string, using the mask provided by mask. Type specifies whether
time_num_p is a pointer to a date or a time. A date number is the number of
days from January 1, 1970. A time number is the number of seconds since
midnight January 1, 1970 Coordinated Universal Time (UCT, formerly called
Greenwich mean time).

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_ctime(time_string, time_num_p, mask, type);

Parameters
time_string char * output. The date or time string.

time_num_p DTMdate_typ * input. Pointer to the date or time number.

mask char * input. The mask. See “DTM Masks” on page 251.

type char input. Specifies date or time type: DTM_DATE or DTM_


TIME.

Notes
The buffer pointed to by time_string must be large enough to hold the output.

err = DTM_TimeToString(time_string, time_num_p, mask);

is the same as

err = DTM_ctime(time_string, time_num_p, mask, (char)DTM_TIME);

err = DTM_DateToString(time_string, time_num_p, mask);

is the same as

err = DTM_ctime(time_string, time_num_p, mask, (char)DTM_DATE);

December 1996 WAL for Windows Programmer’s Reference Manual 749


7 WAL Function Reference
DTM_ctime()

See Also
“DTMdate_typ” on page 253

The sample applications in the directories C:\FILENET\SAMPLE\DTM\ and


C:\FILENET\SAMPLE\FOLD2

750 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_date()

DTM_date()
DTM_date() converts the current system time to a date or time string. The
string is formatted using the mask provided by mask and put in the string
time_string.

DTM_date() gets the current time from the operating system.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_date(time_string, mask);

Parameters
time_string char * output. The date or time string. time_string must be
large enough to hold the output.

mask char * input. The mask. See “DTM Masks” on page 251.

December 1996 WAL for Windows Programmer’s Reference Manual 751


7 WAL Function Reference
DTM_ftime()

DTM_ftime()
DTM_ftime() converts the current system time to a date/time structure. It
returns the current date or time in time_p.

DTM_ftime() gets the current time from the operating system.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_ftime(time_p, type);

Parameters
time_p DTM_tm * output. Pointer to the date/time structure.

type char input. Specifies date or time type: DTM_DATE or DTM_


TIME.

See Also
“DTM_tm” on page 254

752 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_getdate()

DTM_getdate()
DTM_getdate() converts a date or time string to a date/time structure. Any
part of the structure that is not specifically provided by the string receives data
from the current system time. For example, unless the string provides the day
of the year, the tm_yday part of the structure contains the number for the
current day of the year.

DTM_StringToStruct() is an alternate name for DTM_getdate().

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_getdate(time_p, time_string, mask);

Parameters
time_p DTM_tm * output. Pointer to the date/time structure.

time_string char * input. The date or time string.

mask char * input. The mask. See “DTM Masks” on page 251.

See Also
“DTM_tm” on page 254

December 1996 WAL for Windows Programmer’s Reference Manual 753


7 WAL Function Reference
DTM_getmask()

DTM_getmask()
DTM_getmask() returns the system date or time mask.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_getmask(mask, type);

Parameters
mask char * output. The mask. See “DTM Masks” on page 251.
mask must be large enough to hold the output.

type char input. Specifies date or time: DTM_DATE or DTM_TIME.

754 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_getmasklength()

DTM_getmasklength()
DTM_getmasklength() returns the maximum length (including the terminating
NULL) of a string formatted with the given mask.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_getmasklength(length_p, mask);

Parameters
length_p int * output. Pointer to the maximum allowable length of the
given mask.

mask char * input. The mask. See “DTM Masks” on page 251.

December 1996 WAL for Windows Programmer’s Reference Manual 755


7 WAL Function Reference
DTM_gmtime()

DTM_gmtime()
DTM_gmtime() converts the date or time number to which tnum_p points into
a date/time structure to which time_p points, representing the equivalent
Coordinated Universal Time. Type specifies whether time_num_p is a pointer
to a date or to a time.

A date number is the number of days from January 1, 1970. A time number is
the number of seconds since midnight January 1, 1970 Coordinated Universal
Time.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_gmtime(time_p, time_num_p, type);

Parameters
time_p DTM_tm * output. Pointer to the date/time structure.

time_num_p DTMdate_typ * input. Pointer to the date or time number.

type char input. Specifies date or time type: DTM_DATE or DTM_


TIME.

If type == DTM_DATE, DTM_NumToStruct() is the same as


DTM_gmtime().

See Also
“DTMdate_typ” on page 253

“DTM_tm” on page 254

756 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_gp()

DTM_gp()
DTM_gp() converts a date/time structure (containing local time) to a date or
time number.

A date number is the number of days from January 1, 1970. A time number is
the number of seconds since midnight January 1, 1970 Coordinated Universal
Time.

DTM_StructToNum() is an alternate name for DTM_gp().

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_gp(time_num_p, time_p, type);

Parameters
time_num_p DTMdate_typ * output. Pointer to the date or time number.

time_p DTM_tm * input. Pointer to the date/time structure.

type char input. The date or time type: DTM_DATE or DTM_TIME.

See Also
“DTMdate_typ” on page 253

“DTM_tm” on page 254

December 1996 WAL for Windows Programmer’s Reference Manual 757


7 WAL Function Reference
DTM_gtime()

DTM_gtime()
DTM_gtime() converts the date or time string time_string into the date or time
number to which time_num_p points, using the mask provided by mask. Type
specifies whether time_string is a date or a time string.

A date number is the number of days from January 1, 1970. A time number is
the number of seconds since midnight January 1, 1970 Coordinated Universal
Time.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_gtime(time_num_p, time_string, mask, type);

Parameters
time_num_p DTMdate_typ * output. Pointer to the date or time number.

time_string char * input. The date string.

mask char * input. The mask. See “DTM Masks” on page 251.

type char input. Specifies date or time type: DTM_DATE or DTM_


TIME.

Notes
The following function calls are equivalent:

This call is the same as


err = DTM_StringToTime(time_num_p, time_ err = DTM_gtime(time_num_p, time_string,
string, mask); mask, (char)DTM_TIME);
err = DTM_StringToDate(time_num_p, time_ err = DTM_gtime(time_num_p, time_string,
string, mask); mask, (char)DTM_DATE);
err = DTM_strtonum(time_num_p, time_string, err = DTM_gtime(time_num_p, time_string,
type); NULL, type);

See Also
“DTMdate_typ” on page 253

758 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_localtime()

DTM_localtime()
DTM_localtime() converts a date or time number to a date/time structure
representing the equivalent local time. type specifies whether time_num_p is
a pointer to a date or a time.

A date number is the number of days from January 1, 1970. A time number is
the number of seconds since midnight January 1, 1970 Coordinated Universal
Time.

DTM_NumToStruct() is an alternate name for DTM_localtime().

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_localtime(time_p, time_num_p, type);

Parameters
time_p DTM_tm * output. Pointer to the date/time structure.

time_num_p DTMdate_typ * input. Pointer to the date or time number.

type char input. Specifies the date or time type: DTM_DATE or


DTM_TIME.

See Also
“DTMdate_typ” on page 253

“DTM_tm” on page 254

December 1996 WAL for Windows Programmer’s Reference Manual 759


7 WAL Function Reference
DTM_stime()

DTM_stime()
DTM_stime() sets the system time to the specified date number. A date
number is the number of days from January 1, 1970.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_stime(tnum_p);

Parameters
tnum_p DTMdate_typ input. Pointer to the date number.

See Also
“DTMdate_typ” on page 253

760 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_subdate()

DTM_subdate()
DTM_subdate() subtracts the time in period_p from the time in source_p,
returning the difference. answer_p is a pointer to the resulting date or time
number. type specifies whether answer_p is a pointer to a date or time.

A date number is the number of days from January 1, 1970. A time number is
the number of seconds since midnight January 1, 1970 Coordinated Universal
Time.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_subdate(answer_p, source_p, period_p, type);

Parameters
answer_p DTMdate_typ * output. Pointer to the date or time number.

source_p DTM_tm * input. Pointer to the input date/time structure which


contains the date or time to be subtracted from.

period_p DTM_tm * input. Pointer to the input date/time structure date,


time, or amount of time to be subtracted.

type char input. Specifies date or time type: DTM_DATE or DTM_


TIME.

See Also
“DTMdate_typ” on page 253

“DTM_tm” on page 254

December 1996 WAL for Windows Programmer’s Reference Manual 761


7 WAL Function Reference
DTM_subtime()

DTM_subtime()
DTM_subtime() subtracts the time in the structure to which period_p points
from the time in the structure to which source_p points, returning the result in
the structure to which answer_p points.

This can be used to determine the difference between two times or to obtain a
period that is a given amount of time earlier than a particular time. For
example, you can find the time that is 30 days earlier than today or find the
time difference between when a transaction was requested and when that
transaction was completed.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_subtime(answer_p, source_p, period_p);

Parameters
answer_p DTM_tm * output. Pointer to the date/time structure
containing the result.

source_p DTM_tm * input. Pointer to the input date/time structure which


contains the time from which to subtract.

period_p DTM_tm * input. Pointer to the input date/time structure that


contains the amount of time to subtract.

Note The three structure parameters must be distinct.

See Also
“DTM_tm” on page 254

762 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
DTM_time()

DTM_time()
DTM_time() converts the current system time to a date or time number. It
returns the number to which tnum_p points. type specifies date or time.

A date number is the number of days from January 1, 1970. A time number is
the number of seconds since midnight January 1, 1970 Coordinated Universal
Time.

DTM_time() gets the current time from the operating system.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_time(tnum_p, type);

Parameters
tnum_p DTMdate_typ * (long) output. Pointer to the date or time
number.

type char input. Specifies date or time type: DTM_DATE or DTM_


TIME.

Notes
err = DTM_CurrentTime(tnum_p);

is the same as

err = DTM_time(tnum_p, (char)DTM_TIME);

err = DTM_CurrentDate(tnum_p);

is the same as

err = DTM_time(tnum_p, (char)DTM_DATE);

See Also
“DTMdate_typ” on page 253

The sample applications in the directories C:\FILENET\SAMPLE\DTM\ and


C:\FILENET\SAMPLE\FOLD2

December 1996 WAL for Windows Programmer’s Reference Manual 763


7 WAL Function Reference
DTM_verifymask()

DTM_verifymask()
DTM_verifymask() sets the character to which status_p points to DTM_YES if
mask is a valid input mask. Otherwise, it sets it to DTM_NO.

Syntax
#include <DTM.i>

error_typ CALLBACK DTM_verifymask(status_p, mask);

Parameters
status_p char * output. Pointer to the one-character return status.

mask char * input. The mask. See “DTM Masks” on page 251.

764 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ERM_display_error()

ERM_display_error()
ERM_display_error() displays a message box containing the caption app_
name, the error tuple, the error text (if found), a hand icon, and an OK button.

Syntax
#include <erm.i>

void CALLBACK ERM_display_error(parent_h, err, server_flag, app_name);

Parameters
parent_h HWND input. Window handle that is the parent of the
message box; can be NULL.

err error_typ input. The error tuple.

server_flag BOOL input. TRUE indicates an error returned from the


remote server, FALSE means an error was detected locally
on the PCWS.

app_name PSTR input. The null-terminated string to be used as the


caption for the message box.

See Also
The sample code in most of the sample applications

December 1996 WAL for Windows Programmer’s Reference Manual 765


7 WAL Function Reference
ERM_get_error()

ERM_get_error()
ERM_get_error() returns a text string corresponding to the specified error
tuple.

Syntax
#include <erm.i>

void CALLBACK ERM_get_error(err, server_flag, text);

Parameters
err error_typ input. The error tuple.

server_flag BOOL input. TRUE indicates an error returned from the


remote server, FALSE means an error was detected locally
on the PCWS.

text PSTR output. String containing error text. text must be large
enough to contain the error text;144 characters maximum.

766 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ERM_log_error()

ERM_log_error()
ERM_log_error() searches the erm index file for a matching error tuple. It logs
the error message in a log file and displays it as well, if you’ve specified this.
The error log file is specified in the logon.cfg file.

Syntax
#include <erm.i>

void CALLBACK ERM_log_error(parent_h, err, server_flag, app_name, disp);

Parameters
parent_h HWND input. Window handle for the parent of the message
box.

err error_typ input. The error tuple.

server_flag BOOL input. FALSE for all uses.

app_name PSTR input. The null-terminated string to be used as the


caption for the message box. If disp is set to FALSE, you
must set app_name to NULL or empty string.

disp BOOL input. If TRUE, display the error message. If FALSE,


nothing is displayed.

December 1996 WAL for Windows Programmer’s Reference Manual 767


7 WAL Function Reference
ERM_log_event()

ERM_log_event()
ERM_log_event() is the primary entry point for logging messages. It logs the
current time and the formatted string in a temporary file. It can also show it in
a window if LogWindow is set to 1 in the LOGON.CFG file. To use this
function, you must have the following setup in your LOGON.CFG file.

Note The syntax is unusual. In contrast to the usual syntax convention, use a
semicolon to mark the end of LogLevel, LogFile, and LogPermFile.

If LogLevel is set to 0, ERM_log_event() returns success, but no message is


logged.

[Log]
LogLevel=1; ;1 is On; 0 is Off
LogFile=c:\filenet\temp.log; ;Temporary file
LogPermFile=c:\filenet\perm.log; ;Permanent file
LogFileSize=16 ;Temporary file size in Kbytes
LogWindow=1 ;1 means show window
LogWindowRows=16 ;Number of rows in the log window
LogPerm=1 ;1 means when temporary file is full,
;all data will be transferred (appended)
; to the permanent file

The string fmt is a null-terminated format control string. It supports all


conversions that wsprintf supports.

Syntax
#include <erm.i>

error_typ cdecl ERM_log_event(err, ord, card, remotely, fmt, ...);

Parameters
err error_typ input. The error tuple.

ord unsigned short input. Ordinal number; currently 1.

card unsigned short input. Cardinal number; currently 1.

remotely BOOL input. If TRUE, error is from the remote FileNet UNIX
server. If FALSE, error is from the PC.

768 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ERM_log_event()

fmt PSTR output. Formatted string.

... Input. The parameters that become fmt.

December 1996 WAL for Windows Programmer’s Reference Manual 769


7 WAL Function Reference
FILLIN_bkg_commit()

FILLIN_bkg_commit()
FILLIN_bkg_commit() enqueues a fill-in request in the background process
queue (if background processing is enabled in the configuration file). To
enable the background processing, set the keyword BkgAllowed to 1 in the
[Fill-In Document] section of the configuration file (LOGON.CFG).

The form is committed as a FileNet PC Form type image. When you retrieve
the form image, the image retains its original color. You can use FORM_load_
file() to load the form image.

For performance reasons, we recommend that you use FILLIN_bkg_commit_


image() to commit the form as a Group III banded image type.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_bkg_commit(formlib_h, batch_service_p,


file_service_p, form_name, class_name, num_indices, index_values_h);

Parameters
formlib_h HANDLE input. Session handle obtained from FORM_init().

batch_service_p
ASE_service_name_typ * input. Pointer to the NCH name
structure for the Batch Entry Service to use when committing
the filled-in form. If NULL, the system’s default batch service
is used.

file_service_p ASE_service_name_typ * input. Name of the remote File


Service to use when retrieving forms. If NULL, the system’s
default remote File Service is used.

form_name PSTR input. The name of the form that was filled in.

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

num_indices WORD input. Number of indices referenced by the handle


index_values_h.

index_values_h
HANDLE input. Handle for an array of indices of type BES_

770 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_bkg_commit()

ixval_desc_typ. The indices are defined by the document


class.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errNoBkgAllowed
FILLIN error: Background committal disabled.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

FILLIN_errFileCreate
FILLIN error: Create file failed.

FILLIN_errWriteFailed
FILLIN error: Write file failed.

See Also
“FILLIN_bkg_commit_image()” on page 772

“FORM_init()” on page 892

“FORM_load_file()” on page 894

“ASE_service_name_typ” on page 178

“BES_ixval_desc_typ” on page 210

December 1996 WAL for Windows Programmer’s Reference Manual 771


7 WAL Function Reference
FILLIN_bkg_commit_image()

FILLIN_bkg_commit_image()
FILLIN_bkg_commit() enqueues a fill-in request in the background process
queue (if background processing is enabled in the configuration file). To
enable the background processing, set the keyword BkgAllowed to 1 in the
[Fill-In Document] section of the configuration file (LOGON.CFG).

The form is committed in the Group III banded image format. When you
retrieve the image, the color of the image is black and white only. For
performance reasons, we recommend that you use FILLIN_bkg_commit_
image().

To access the form field values, you must commit the form as a FileNet PC
Form type image.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_bkg_commit_image(formlib_h,


batch_service_p, file_service_p, form_name, class_name, num_indices,
index_values_h);

Parameters
formlib_h HANDLE input. Session handle obtained from FORM_init().

batch_service_p
ASE_service_name_typ * input. Pointer to the NCH name
structure for the Batch Entry Service to use when committing
the filled-in form. If NULL, the system’s default batch service
is used.

file_service_p ASE_service_name_typ * input. Name of the remote File


Service to use when retrieving forms. If NULL, the system’s
default remote File Service is used.

form_name PSTR input. The name of the form that was filled in.

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

num_indices WORD input. Number of indices referenced by the handle


index_values_h.

772 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_bkg_commit_image()

index_values_h
HANDLE input. Handle for an array of indices of type BES_
ixval_desc_typ. The indices are defined by the document
class.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errNoBkgAllowed
FILLIN error: Background committal disabled.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

FILLIN_errFileCreate
FILLIN error: Create file failed.

FILLIN_errWriteFailed
FILLIN error: Write file failed.

See Also
“FILLIN_bkg_commit()” on page 770

“FILLIN_commit()” on page 774

“FORM_init()” on page 892

“ASE_service_name_typ” on page 178

“BES_ixval_desc_typ” on page 210

December 1996 WAL for Windows Programmer’s Reference Manual 773


7 WAL Function Reference
FILLIN_commit()

FILLIN_commit()
FILLIN_commit() generates and commits the fill-in page for the form. The
form_h parameter must be a valid FormLib form handle. The fill-in page is
committed using the specified document class, Batch Service, and user
indices. If the BATCHLIB call succeeds, the document ID allocated is returned
in the doc_id parameter.

The form is committed as a FileNet PC Form type image. When you retrieve
the form image, the image retains its original colors. Use FORM_load_file() to
load the form image.

For performance reasons, we recommend that you use FILLIN_bkg_commit()


instead of FILLIN_commit().

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_commit(client_h, form_h, batch_service_p,


class_name, num_indices, index_values_h, doc_id_p, dialog_h, dialog_id,
concurrency, async_committal);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle(). If NULL, IAFLIB_get_client_handle() is called.

form_h HANDLE input. Form handle.

batch_service_p
ASE_service_name_typ * input. Pointer to structure
containing NCH name of Batch Entry Service. Can be NULL
for default.

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

num_indices WORD input. Number of indices.

index_values_h
HANDLE input. Handle for an array of BES_ixval_desc_typ
structures.

doc_id_p ASE_doc_id_typ * output. Pointer to a document ID.

774 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_commit()

dialog_h HWND input. Dialog window handle. Use this to show the
status message.

dialog_id WORD input. Dialog ID of the text field to which the message
will be sent.

concurrency BOOL input. If TRUE, does not return the error FILLIN_
errBkgInProgress if foreground and background committals
can be processed concurrently.

async_committal
BOOL input. If TRUE, the committal process is enqueued. If
FALSE, the committal process is immediate.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errBkgInProgress
FILLIN error: Foreground committals not allowed while background in
progress.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

See Also
“FILLIN_bkg_commit()” on page 770

“IAFLIB_get_client_handle()” on page 994

“ASE_doc_id_typ” on page 164

“ASE_service_name_typ” on page 178

“BES_ixval_desc_typ” on page 210

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 775


7 WAL Function Reference
FILLIN_commit_image()

FILLIN_commit_image()
FILLIN_commit() generates and commits the fill-in page for the form. The
form_h parameter must be a valid FormLib form handle. The fill-in page is
committed using the specified document class, Batch Service, and user
indices. If the BATCHLIB call succeeds, the document ID allocated is returned
in the doc_id parameter.

The form will be committed in the Group III banded image format. When you
retrieve the image, the color of the image is in black and white only. For
performance reasons, we recommend that you use FILLIN_bkg_commit_
image() instead of FILLIN_commit_image().

If you need to access the form field values, commit the form as a FileNet PC
Form type image. For more information, see “FILLIN_bkg_commit()” on
page 770 and “FILLIN_commit()” on page 774.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_commit_image(client_h, form_h,


batch_service_p, class_name, num_indices, index_values_h, doc_id_p,
dialog_h, dialog_id, concurrency, async_committal);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle(). If NULL, IAFLIB_get_client_handle() is called.

form_h HANDLE input. Form handle.

batch_service_p
ASE_service_name_typ * input. Pointer to structure
containing NCH name of Batch Entry Service. Can be NULL
for default.

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

num_indices WORD input. Number of indices.

index_values_h
HANDLE input. Handle for an array of BES_ixval_desc_type
structures.

776 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_commit_image()

doc_id_p ASE_doc_id_typ * output. Pointer to a document ID.

dialog_h HWND input. Dialog window handle. It can be used to show


the status message.

dialog_id WORD input. Dialog ID of the text field to which the message
will be sent.

concurrency BOOL input. If TRUE and if foreground and background


committals can be processed concurrently, this does not
return the error FILLIN_errBkgInProgress.

async_committal
BOOL input. If TRUE, the committal process is enqueued. If
FALSE, the committal process is immediate.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errBkgInProgress
FILLIN error: Foreground committals not allowed while background in
progress.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

See Also
“FILLIN_bkg_commit()” on page 770

“FILLIN_bkg_commit_image()” on page 772.

“FILLIN_commit()” on page 774

“IAFLIB_get_client_handle()” on page 994

“ASE_doc_id_typ” on page 164

December 1996 WAL for Windows Programmer’s Reference Manual 777


7 WAL Function Reference
FILLIN_commit_image()

“ASE_service_name_typ” on page 178

“BES_ixval_desc_typ” on page 210

The sample application in the directory C:\FILENET\SAMPLE\FORM

778 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_do_form()

FILLIN_do_form()
FILLIN_do_form() synchronously executes a form. Softkeys for the form are
removed and Fill-in softkeys are installed.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_do_form(form_h, style, timeout, terminator_p);

Parameters
form_h HANDLE input. Form handle.

style WORD input. If FILLIN_ALLOW_PRINT is specified, both


Commit and Print appear on the menubar. Otherwise, only
the Commit key appears on the menubar.

timeout WORD input. Number of seconds before continuation. Must


be a valid FORMLIB value.

terminator_p FORM_Terminator_typ * input. Pointer to the terminator key


for the form.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

See Also
“FORM_Terminator_typ” on page 343

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 779


7 WAL Function Reference
FILLIN_get_doc_class()

FILLIN_get_doc_class()
FILLIN_get_doc_class() gets the name of a document class from the user.
The selected document class is returned in the class_name parameter.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_get_doc_class(ims_p, parent_h, rdd_h,


class_name);

Parameters
ims_p ASE_service_name_typ * input. Pointer to the NCH name
structure for the IMS storing the folder. If NULL, the default
IMS specified in IAFLIB_logon_user() is used.

parent_h HWND input. Handle for parent window.

rdd_h HANDLE input. Handle for client data structure containing


handles to RDD lists and other data. It can be obtained from
RDD_init() if NULL, RDD_init() is called.

class_name PSTR output. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

See Also
“IAFLIB_logon_user()” on page 1033

“RDD_init()” on page 1113

780 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_get_doc_class()

“ASE_service_name_typ” on page 178

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 781


7 WAL Function Reference
FILLIN_get_form_name()

FILLIN_get_form_name()
FILLIN_get_form_name() gets a file name and form name from the end user.

The file_name and the form_name parameters are required; an error is


returned if they are NULL.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_get_form_name (file_service_p, parent_h,


help_h, default_ext, file_name, form_name);

Parameters
file_service_p ASE_service_name_typ * input. Pointer to the structure
containing the NCH name of the remote File Service to use
when retrieving forms. If NULL, the system’s default remote
File Service is used.

parent_h HWND input. Handle for the parent window.

help_h HANDLE input. Handle for Help data. If NULL, a handle is


allocated for the duration of the call.

default_ext PSTR input. File extension. If it is NULL or an empty string,


“\\*.frm” is used.

file_name PSTR output. Name of the file (without extension) that


contains the form that was input by the end user.

form_name PSTR output. Name of the form that was input by the end
user.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

782 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_get_form_name()

See Also
“ASE_service_name_typ” on page 178

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 783


7 WAL Function Reference
FILLIN_index()

FILLIN_index()
FILLIN_index() indexes the document using the document class specified by
the class_name parameter. The sys_index_values_p parameter is a pointer to
the default indices and the num_sys_indices parameter is the number of
default indices.

A handle for the values the user enters is returned in the user_index_values_
h_p pointer parameter and a pointer to the count of those indices is returned
in the num_user_indices_p parameter. The title parameter is the title
displayed in the caption of the indexing window.

If file_name and form_name parameters are specified, they are the custom
forms to use for indexing. If not specified, the logon configuration file is
checked to see whether a custom form is defined for the document class. If
one is defined, it is used; otherwise, a default form is used.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_index(index_form_h, ims_p, class_name,


num_sys_indices, sys_index_values_p, title, file_name, form_name,
num_user_indices, user_index_values_h_p);

Parameters
index_form_h HANDLE input. If NULL, default index form is used.

ims_p ASE_service_name_typ * input. Pointer to the NCH name


structure for the IMS storing the folder. If NULL, the default
IMS specified in IAFLIB_logon_user() is used.

class_name PSTR input. Document class name; maximum length FN_


MAX_DCNAMESIZE + 1.

num_sys_indices
WORD input. Number of system indices.

sys_index_values_p
void * input. Pointer to system indices of type BES_ixval_
desc_typ.

title PSTR input. Window title in caption bar.

784 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_index()

file_name PSTR input. File name of the custom form. It can be NULL
when using default index form.

form_name PSTR input. Form name of the custom form. It can be NULL
when using default index form.

num_user_indices_p
WORD * output. Pointer to the number of indices from the
user.

user_index_values_h_p
HANDLE * output. Handle for a structure of type BES_ixval_
desc_type.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

See Also
“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“BES_ixval_desc_typ” on page 210

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 785


7 WAL Function Reference
FILLIN_local_print()

FILLIN_local_print()
FILLIN_local_print() prints an uncommitted fill-in form locally.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_local_print(form_h, dialog_h);

Parameters
form_h HANDLE input. Form handle for the form to be printed locally.

dialog_h HWND input. Window handle for the client application.

786 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FILLIN_server_print()

FILLIN_server_print()
FILLIN_server_print() prints an uncommitted fill-in form through Print
Services. If dialog_h and dialog_id are valid, a message is displayed.

This function attempts to spawn the PC Print Server (PRINTSRV) application.


For clients who do not have the FileNet WorkForce Desktop applications
installed, this function returns an error code.

Syntax
#include <fillin.i>

error_typ CALLBACK FILLIN_server_print(form_h, dialog_h, dialog_id);

Parameters
form_h HANDLE input. Form handle for the form to be printed.

dialog_h HWND input. Dialog box where status message is displayed.


Can be NULL.

dialog_id WORD input. Static control ID within the dialog box where
status messages are displayed. Can be NULL.

Errors Returned
FILLIN_errBadParam
FILLIN error: Empty parameters passed.

FILLIN_errNoMemory
FILLIN error: Not enough memory.

FILLIN_errLockFailed
FILLIN error: Memory Lock failed.

FILLIN_errStartPrtSrv
FILLIN error: Unable to start Print Server.

December 1996 WAL for Windows Programmer’s Reference Manual 787


7 WAL Function Reference
FN_clear_index_form()

FN_clear_index_form()
Clears indexing values.

Syntax
#include <indxform.i>

error_typ CALLBACK FN_clear_index_form(form_h);

Parameters
form_h HANDLE input. The form handle. Obtained from FN_index_
form_init().

Errors Returned
INDXFORM_lock_err
Unable to lock memory block (low memory?)

See Also
“FN_index_form_init()” on page 798

788 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_copy_file()

FN_copy_file()
FN_copy_file() copies the source file to the destination file.

Syntax
#include <appinfo.i>

error_typ CALLBACK FN_copy_file(source_file_name, dest_file_name);

Parameters
source_file_name
PSTR input. Source file name.

dest_file_name
PSTR input. Destination file name.

Errors Returned
APPINFO_open_err
Document class not given in call to IAFLIB_index_form().

APPINFO_read_error
Document class has no user indices.

December 1996 WAL for Windows Programmer’s Reference Manual 789


7 WAL Function Reference
FN_custom_index_form()

FN_custom_index_form()
Collects and validates indexing information for a document to be created. FN_
custom_index_form() is similar to FN_show_index_form(), but allows the use
of a pre-defined FormLib form.

Syntax
#include <indxform.i>
#include <BES.def>

error_typ CALLBACK FN_custom_index_form(form_h, form_file, form_name,


class_name, title, num_indices1, index_values1_p, show_init,
num_indices2_p, index_values2_h_p);

Parameters
form_h HANDLE input. The form handle. Obtained from FN_index_
form_init().

form_file PSTR input. File in which the custom form resides.

form_name PSTR input. Name of custom form.

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

title PSTR input. Title that appears in the caption area of the form
window. If title is NULL, the form title is used.

num_indices1 WORD input. Number of items in the array to which index_


values1_p points.

index_values1_p
void * input. Pointer to an array of initial values of type BES_
ixval_desc_typ.

show_init FN_BOOL input. TRUE to show initial values. FALSE to save


them for “Last Value” softkey processing.

num_indices2_p
WORD * output. Pointer to the number of items in index_
values2_h_p.

790 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_custom_index_form()

index_values2_h_p
HANDLE * output. Pointer to a handle for the array of values
of type BES_ixval_desc_typ.

Note The information from RDD about indices for the document class is assumed
to be consistent with the slightly more recent information obtained from the
batch header. This could be a problem if the database were to change while
the PC is logged on.

Errors Returned
INDXFORM_Bad_Dclass
Document class is not specified (or does not exist).

INDXFORM_lock_err
Unable to lock memory block (low memory?)

INDXFORM_no_memory
Not enough memory.

INDXFORM_no_indices
Document class has no user indices.

INDXFORM_user_cancel
User cancelled.

See Also
“FN_index_form_init()” on page 798

“FN_show_index_form()” on page 811

“BES_ixval_desc_typ” on page 210

December 1996 WAL for Windows Programmer’s Reference Manual 791


7 WAL Function Reference
FN_get_app_info_int()

FN_get_app_info_int()
FN_get_app_info_int() returns an integer from the PCWS preferences file,
named in WIN.INI. This function is similar to the Windows function
GetProfileInt().

Syntax
#include <appinfo.i>

int CALLBACK FN_get_app_info_int(app_name, key_name, default);

Parameters
app_name PSTR input. The preference file name.

key_name PSTR input. The key word.

default int output. The constant number.

792 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_get_app_info_string()

FN_get_app_info_string()
FN_get_app_info_string() copies a character string (from the LOGON.CFG
file named in the [FileNet PCIS] section in the Windows WIN.INI file) into the
string value. This function is similar to the Windows GetProfileString()
function; FN_get_app_info_string()’s return value is an error tuple, as
contrasted with GetProfileString(), which returns the count of copied
characters. If key_name is NULL, the function fills value with the list of key
names (but not the values) associated with app_name. Each key name in the
list is null-terminated.

Syntax
#include <appinfo.i>

error_typ CALLBACK FN_get_app_info_string(app_name, key_name,


default, value, size);

Parameters
app_name PSTR input. The preferences app name.

key_name PSTR input. The key word.

default PSTR input. A value for the key word. When the key_name
specified is not in the preferences file, default is returned as
value.

value PSTR output. The value of the key word.

size short input. The number of characters (including the last null
character) copied to value.

December 1996 WAL for Windows Programmer’s Reference Manual 793


7 WAL Function Reference
FN_get_window_pos()

FN_get_window_pos()
FN_get_window_pos() gets the window position and style from the PCWS
preferences file named in the WIN.INI file.

The expected format of the window position and style in the PCWS
preferences file is:

[<app_name>]
<key_name> = 207,149,373,299,0,0

The first four numbers specify the window position and the last two indicate
whether the window is minimized or maximized. Call FN_set_window_pos() to
save the window position in this format.

Syntax
#include <appinfo.i>

error_typ CALLBACK FN_get_window_pos(app_name, key_name, rect,


show_style_p);

Parameters
app_name PSTR input. The preferences file name.

key_name PSTR input. The key word.

rect PRECT output. The window position. rect->left is the X-


coordinate of the window’s upper left corner, rect->top is the
Y-coordinate of the window’s upper left corner, rect->right is
the width of the window, and rect->top is the height.

show_style_p WORD * output. Pointer to the show style. Can be one of the
following:
SW_SHOWNORMAL
SW_SHOWMINIMIZED
SW_SHOWMAXIMIZED

794 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_index_form()

FN_index_form()
FN_index_form() collects and validates indexing information for a document to
be created by displaying an indexing form window.

On return, index_values_h_p is a pointer to a handle for a structure of


indexing data of type BES_ixval_desc_typ. Usually, it can be used in the
BATCHLIB_DocDesc structure passed to BATCHLIB_BatchEntry(). num_
indices_p is a pointer to the number of indices provided by the user.

parent_h is the parent window of the indexing form. title is the text to appear in
the caption bar of the indexing form window.

Syntax
#include <indxform.i>
#include <bes.def>

error_typ CALLBACK FN_index_form(parent_h, ims_p, class_name, title,


num_indices_p, index_values_h);

Parameters
parent_h HWND input. Window handle for the parent of the indexing
form.

ims_p ASE_service_name_typ * input. The three-part NCH object


name. If NULL, the default IMS specified in IAFLIB_logon_
user() is used.

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

title PSTR input. The text that appears in the caption bar of the
indexing form window (the form name).

num_indices_p
WORD * output. Number of indices in index_values_h_p.

index_values_h_p
HANDLE * output. Pointer to a handle for the indices values
(structure of type BES_ixval_desc_typ).

December 1996 WAL for Windows Programmer’s Reference Manual 795


7 WAL Function Reference
FN_index_form()

Note The information from RDD about indices for the document class is assumed
to be consistent with the slightly more recent information obtained from the
batch header. This could be a problem if the database were to change while
the PC is logged on.

Errors Returned
INDXFORM_Bad_Dclass
Document class is not specified (or does not exist).

INDXFORM_lock_err
Unable to lock memory block (low memory?)

INDXFORM_no_memory
Not enough memory.

INDXFORM_no_indices
Document class has no user indices.

INDXFORM_user_cancel
User cancelled.

See Also
“BATCHLIB_BatchEntry()” on page 604

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“BES_ixval_desc_typ” on page 210

The sample application in the directory C:\FILENET\SAMPLE\COMMIT\

796 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_index_form_exit()

FN_index_form_exit()
FN_index_form_exit() frees all the resources allocated to the index form. The
handle is invalid on return from this.

Syntax
#include <indxform.i>

Parameters
error_typ CALLBACK FN_index_form_exit(form_h);

form_h HANDLE input. Form handle; obtained from FN_index_form_


init().

Errors Returned
INDXFORM_lock_err
Unable to lock memory block (low memory?)

See Also
“FN_index_form_init()” on page 798

December 1996 WAL for Windows Programmer’s Reference Manual 797


7 WAL Function Reference
FN_index_form_init()

FN_index_form_init()
Allocates and initializes data for the index form. parent_h is the window
handle for the parent window. The returned form handle is used by:

FN_clear_index_form()
FN_custom_index_form()
FN_index_form_exit()
FN_index_verify()
FN_show_index_form()

Syntax
#include <indxform.i>

Parameters
error_typ CALLBACK FN_index_form_init(parent_h, ims_p, form_h_p);

parent_h HWND input. Window handle from parent window.

ims_p ASE_service_name_typ * input. The three-part NCH object


name. If NULL, the default IMS specified in IAFLIB_logon_
user() is used.

form_h_p PHANDLE output. Pointer to the form handle for the index
form.

Errors Returned
INDXFORM_no_memory
Not enough memory.

INDXFORM_lock_err
Unable to lock memory block (low memory?)

See Also
“FN_clear_index_form()” on page 788

“FN_custom_index_form()” on page 790

“FN_index_form_exit()” on page 797

“FN_index_verify()” on page 804

798 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_index_form_init()

“FN_show_index_form()” on page 811

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 799


7 WAL Function Reference
FN_index_handle_to_text()

FN_index_handle_to_text()
Converts form handle returned from FN_show_index_form() or FN_custom_
index_form() to a text-formatted string of index descriptions. This function
makes it possible to call index form from external programs such as Microsoft
Word for Windows.

Syntax
#include <indxform.i>
#include <bes.def>

error_typ CALLBACK FN_index_handle_to_text(form_h, num_indices,


index_values_h, values_string);

Parameters
form_h HANDLE input. The form handle returned by FN_index_
form_init().

num_indices WORD input. Number of indices in string to which values_


string points.

index_values_h
HANDLE input. Handle for an array of values of type BES_
ixval_desc_typ.

values_string PSTR output. String containing ASCII text representations of


index name and index value, in that order, delimited by TAB
characters, for each index in the form. The caller must pass a
pointer to a buffer of sufficient size.

Note The information from RDD about indices for the document class is assumed
to be consistent with the slightly more recent information obtained from the
batch header. This could be a problem if the database were to change while
the PC is logged on.

Errors Returned
INDXFORM_bad_client_handle
Invalid client handle.

INDXFORM_no_memory
Not enough memory.

800 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_index_handle_to_text()

INDXFORM_lock_err
Unable to lock memory block (low memory?)

INDXFORM_no_indices
Document class has no user indices.

INDXFORM_bad_index_data
Invalid index data.

See Also
“FN_custom_index_form()” on page 790

“FN_index_form_init()” on page 798

“FN_show_index_form()” on page 811

“BES_ixval_desc_typ” on page 210

December 1996 WAL for Windows Programmer’s Reference Manual 801


7 WAL Function Reference
FN_index_text_to_handle()

FN_index_text_to_handle()
Converts a text-formatted string of index descriptions into a form suitable for
input to FN_show_index_form() or FN_custom_index_form(). This function
makes it possible to call index form from external programs such as Microsoft
Word for Windows.

Syntax
#include <indxform.i>
#include <bes.def>

error_typ CALLBACK FN_index_text_to_handle(form_h, num_indices,


values_string, index_values_h_p);

Parameters
form_h HANDLE input. The form handle returned by FN_index_
form_init().

num_indices WORD input. Number of indices in string pointed to by


values_string.

values_string PSTR input. String containing ASCII text representations of


index name and index value, in that order, delimited by TAB
characters, for each index to be initialized in the form. The
index name/index value pairs can be listed in any order.

index_values_h_p
PHANDLE output. Pointer to handle to an array of values of
type BES_ixval_desc_typ.

Note The information from RDD about indices for the document class is assumed
to be consistent with the slightly more recent information obtained from the
batch header. This could be a problem if the database changes while the PC
is logged on.

Errors Returned
INDXFORM_bad_client_handle
Invalid client handle.

INDXFORM_no_memory
Not enough memory.

802 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_index_text_to_handle()

INDXFORM_lock_err
Unable to lock memory block (low memory?)

INDXFORM_no_indices
Document class has no user indices.

INDXFORM_bad_index_data
Invalid index data.

See Also
“FN_custom_index_form()” on page 790

“FN_index_form_init()” on page 798

“FN_show_index_form()” on page 811

“BES_ixval_desc_typ” on page 210

December 1996 WAL for Windows Programmer’s Reference Manual 803


7 WAL Function Reference
FN_index_verify()

FN_index_verify()
FN_index_verify() displays a form that enables the user to compare the
original index values to those just entered in index verification. The form
shows values from index_values1_p and index_values2_p, and returns the
user’s final choices in index_values3_h_p.

Syntax
#include <indxform.i>
#include <bes.def>

error_typ CALLBACK FN_index_verify(form_h, class_name, title,


num_indices1, index_values1_p, num_indices2, index_values2_p,
num_indices_p, index_values3_h_p);

Parameters
form_h HANDLE input. The form handle returned by FN_index_
form_init().

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

title PSTR input. Displayed in the caption area of the form


window.

num_indices1 WORD input. Number of items in array pointed to by index_


values1_p.

index_values1_p
BES_ixval_desc_typ * input. Pointer to an array of initial
values of type BES_ixval_desc_typ.

num_indices2 WORD input. Number of items in array pointed to by index_


values2_p.

index_values2_p
BES_ixval_desc_typ * input. Pointer to an array of second-try
values of type BES_ixval_desc_typ.

num_indices_p
WORD * output. Number of items in index_values3_h_p.

804 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_index_verify()

index_values3_h_p
PHANDLE output. Handle for an array of values of type BES_
ixval_desc_typ.

Errors Returned
INDXFORM_Bad_Dclass
Document class is not specified (or does not exist).

INDXFORM_lock_err
Unable to lock memory block (low memory?)

INDXFORM_no_memory
Not enough memory.

INDXFORM_no_indices
Document class has no user indices.

See Also
“FN_index_form_init()” on page 798

“BES_ixval_desc_typ” on page 210

December 1996 WAL for Windows Programmer’s Reference Manual 805


7 WAL Function Reference
FN_save_index_form()

FN_save_index_form()
FN_save_index_form() saves an index form. If hFormSess is NULL, the
created form is saved to the file specified by file_name. When a valid form_
session_h is provided, the form is generated using this handle. It is also saved
to a file if a file name is provided. If ObjectName is NULL, class_name is used
as the object name.

Syntax
#include <indxform.i>

error_typ CALLBACK FN_save_index_form(form_session_h, ims_p,


class_name, file_name, form_name);

Parameters
form_session_h
HANDLE input. The FORMLIB session handle. Can be
obtained from FORM_init(). If NULL, FORM_init() is called to
get the session handle.

ims_p ASE_service_name_typ * input. The three-part IMS name.


Can be NULL for default IMS.

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

file_name PSTR input. Name of the file.

form_name PSTR input. Name of the index form. If NULL, the class_
name name is used as the form name.

Note The information from RDD about indices for the document class is assumed
to be consistent with the slightly more recent information obtained from the
batch header. This could be a problem were the database to change while the
PC is logged on.

Errors Returned
INDXFORM_Bad_Dclass
Document class is not specified (or does not exist).

INDXFORM_lock_err
Unable to lock memory block (low memory?)

806 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_save_index_form()

INDXFORM_no_memory
Not enough memory.

INDXFORM_no_indices
Document class has no user indices.

See Also
“FORM_init()” on page 892

“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 807


7 WAL Function Reference
FN_set_app_file()

FN_set_app_file()
FN_set_app_file() sets the appinfo file name, allowing alternate files to be
used. A file_name of NULL sets the file name back to the default
(LOGON.CFG, specified in WIN.INI).

Syntax
#include <appinfo.i>

error_typ CALLBACK FN_set_app_file(file_name);

Parameters
file_name PSTR input. The full path name of the PCWS preferences
file.

Errors Returned
APPINFO_no_logon_cfg
Log on configuration file not found.

808 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_set_app_info()

FN_set_app_info()
FN_set_app_info() copies a string into the PCWS preferences file specified in
WIN.INI. It searches for the value of key_name under the application heading
specified by app_name. When there is no match, it adds a new string entry to
the user profile. If there is a matching key, the function replaces that key’s
value with key_value.

This function is similar to the Windows function WriteProfileString(), except


that the return value is an error tuple rather than a boolean, and the file is
created, if necessary.

Syntax
#include <appinfo.i>

error_typ CALLBACK FN_set_app_info(app_name, key_name, key_value);

Parameters
app_name PSTR input. The name of PCWS preferences file. If NULL,
the default file specified in WIN.INI is used.

key_name PSTR input. The key word.

key_value PSTR input. The value of the key word.

December 1996 WAL for Windows Programmer’s Reference Manual 809


7 WAL Function Reference
FN_set_window_pos()

FN_set_window_pos()
FN_set_window_pos() saves the position and style of the window to the
PCWS preferences file specified in WIN.INI. The position and style are saved
only if wnd_h is a handle for a valid window.

Syntax
#include <appinfo.i>

error_typ CALLBACK FN_set_window_pos(app_name, key_name, wnd_h);

Parameters
app_name PSTR input. The preferences file name.

key_name PSTR input. The key word.

wnd_h HWND input. Window handle of the of the application.

810 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_show_index_form()

FN_show_index_form()
Collects and validates indexing information for a document to be created.

Syntax
#include <indxform.i>

error_typ CALLBACK FN_show_index_form(form_h, class_name, title,


num_indices1, index_values_p, show_indices1, num_indices2_p,
index_values2_h_p);

Parameters
form_h HANDLE input. The form handle returned by FN_index_
form_init().

class_name PSTR input. Document class name of maximum length FN_


MAX_DCNAMESIZE + 1.

title PSTR input. Displayed in the caption area of the form


window.

num_indices1 WORD input. Number of items in array pointed to by index_


values_p.

index_values_p
void * input. Pointer to an array of initial index values of type
BES_ixval_desc_typ.

show_indices1
FN_BOOL input. TRUE to show initial values. FALSE to save
them for “Last Value” softkey processing.

num_indices2_p
WORD * output. Pointer to a number of items in index_
values2_h_p.

index_values2_h_p
HANDLE * output. Pointer to a handle for an array of index
values of type BES_ixval_desc_typ.

December 1996 WAL for Windows Programmer’s Reference Manual 811


7 WAL Function Reference
FN_show_index_form()

Note The information from RDD about indices for the document class is assumed to
be consistent with the slightly more recent information obtained from the
batch header. This could be a problem were the database to change while the
PC is logged on.

Errors Returned
INDXFORM_Bad_Dclass
Document class is not specified (or does not exist).

INDXFORM_lock_err
Unable to lock memory block (low memory?)

INDXFORM_no_memory
Not enough memory.

INDXFORM_no_indices
Document class has no user indices.

See Also
“FN_index_form_init()” on page 798

“BES_ixval_desc_typ” on page 210

812 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FN_show_new_values_in_form()

FN_show_new_values_in_form()
FN_show_new_values_in_form() dynamically updates the index values with
the new values in the executing indexing form. You must call FN_show_index_
form() or FN_custom_index_form() to display the form prior to calling this
function.

This function is usually used to display the index values for variouis
documents without closing and reopening the same index form. For each new
document, get the new index value descriptor and pass it to FN_show_new_
values_in_form(). The new values will be shown in the previously shown form.

Syntax
#include <indxform.i>

error_typ CALLBACK FN_show_new_values_in_form(form_h, title,


num_indices, new_values_p);

Parameters
form_h HANDLE input. The form handle returned by FN_index_
form_init().

title PSTR input. Displayed in the caption area of the form


window.

num_indices WORD input. Number of items in array pointed to by new_


values_p.

new_values_p BES_ixval_desc_typ * input. Pointer to an array of new index


values.

Errors Returned
INDXFORM_lock_err
Unable to lock memory block (low memory?).

See Also
“FN_custom_index_form()” on page 790

“FN_index_form_init()” on page 798

“FN_show_index_form()” on page 811

December 1996 WAL for Windows Programmer’s Reference Manual 813


7 WAL Function Reference
FN_show_new_values_in_form()

“FN_show_new_values_in_form()” on page 813

“BES_ixval_desc_typ” on page 210

814 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FNP_exit()

FNP_exit()
FNP_exit() frees all resources requested by FNPRINT. Call it once before the
client application terminates.

Syntax
#include <fnprint.i>

error_typ CALLBACK FNP_exit (print_data_h);

Parameters
print_data_h HANDLE input. Data handle obtained from FNP_init().

Error Returned
FNP_BAD_HANDLE
FNP error: Invalid data handle.

See Also
“FNP_init()” on page 816

The sample application in the directory C:\FILENET\SAMPLE\LPRINT\

December 1996 WAL for Windows Programmer’s Reference Manual 815


7 WAL Function Reference
FNP_init()

FNP_init()
FNP_init() allocates enough memory for an FNP_data data structure and fills
it with the corresponding information. Call it once for each client application.

The returned HANDLE is a handle to a memory location for that structure.


The return value will be NULL if an error occurs. This is used as print_data_h
in other FNP functions.

Syntax
#include <fnprint.i>

HANDLE CALLBACK FNP_init(client_h);

Parameters
client_h HWND input. Window handle of the client application.

See Also
“FNP_data” on page 265

The sample application in the directory C:\FILENET\SAMPLE\LPRINT\

816 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FNP_print()

FNP_print()
FNP_print() prints a list of documents.

Syntax
#include <fnprint.i>

error_typ CALLBACK FNP_print(doc_list_p, doc_count, err_mode, ui_mode,


print_data_h);

Parameters
doc_list_p FNP_request_typ * input. Pointer to the array of FNP_
request_typ data structures.

doc_count unsigned input. Document count in the list.

err_mode unsigned input. Valid values are ASYNC, SYNC, or (SYNC |


AUTOCLOSE)

ASYNC Asynchronous. When FNP_print() is


called, program control returns
immediately to the calling
application.

SYNC Synchronous. The calling application


gains program control when
FNP_print() completes its execution.

(SYNC | AUTOCLOSE) The function performs synchronous


printing. After the document is
printed, the user interface window is
closed.

If AUTOCLOSE is used with ASYNC, AUTOCLOSE is


ignored.

ui_mode unsigned input. User interface mode. NOUI = no user


interface; UI = user interface.

print_data_h HANDLE input. Handle of structure of type FNP_data.


Obtained from a call to FNP_init().

December 1996 WAL for Windows Programmer’s Reference Manual 817


7 WAL Function Reference
FNP_print()

Errors Returned
FNP_BAD_HANDLE
FNP error: Invalid date handle.

FNP_LOCK
FNP error: Unable to lock memory.

See Also
“FNP_init()” on page 816

“FNP_data” on page 265

“FNP_request_typ” on page 266

The sample application in the directory C:\FILENET\SAMPLE\LPRINT\

818 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FNP_print_form_page()

FNP_print_form_page()
FNP_print_form_page() prints a form page.

Syntax
#include <fnprint.i>

error_typ CALLBACK FNP_print_form_page(form_h, print_data_h);

Parameters
form_h HANDLE input. Handle to the form.

print_data_h HANDLE input. Handle of structure of type FNP_data.


Obtained from a call to FNP_init().

Errors Returned
FNP_BAD_FORM
FNP error: Invalid form handle.

FNP_CANNOT_START_DOC
FNP error: Unable to print document.

FNP_LOCK
FNP error: Unable to lock memory.

See Also
“FNP_init()” on page 816

“FNP_data” on page 265

December 1996 WAL for Windows Programmer’s Reference Manual 819


7 WAL Function Reference
FNP_print_from_file()

FNP_print_from_file()
FNP_print_from_file() prints a FileNet formatted image by specifying the DOS
file name. This function is designed to be interactive; therefore, it is
implemented only in synchronous mode.

Syntax
#include <fnprint.i>

error_typ CALLBACK FNP_print_from_file(file_name, print_data_h);

Parameters
file_name PSTR input. File name of a FileNet formatted image.

print_data_h HANDLE input. Handle of structure of type FNP_data. This


handle should be obtained from a call to FNP_init().

Errors Returned
FNP_OPEN_FILE
FNP error: Unable to open file.

FNP_CANNOT_START_DOC
FNP error: Unable to print document.

FNP_LOCK
FNP error: Unable to lock memory.

See Also
“FNP_init()” on page 816

“FNP_data” on page 265

820 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_add_named_rule()

FORM_add_named_rule()
FORM_add_named_rule() adds a rule to a form. The rule is associated with
the field field_name. If field_name is NULL, the rule is associated with the
form.

To replace or delete all rules for a field or form, use FORM_set_field_attr().

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_add_named_rule(form_h, field_name,


rule_name, rule);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

rule_name PSTR input. Name of the rule.

rule PSTR input. Form rule for form or field.

Errors Returned
FORM_errCannotLockMem
Cannot lock memory handle.

FORM_errObjNotFound
Object not found.

FORM_errBadObject
Invalid object.

FORM_errFieldNotFound
Field not found.

FORM_errBadAttrForFieldType
Invalid attribute for field type.

FORM_errInvalidFieldType
Invalid field type.

December 1996 WAL for Windows Programmer’s Reference Manual 821


7 WAL Function Reference
FORM_add_named_rule()

FORM_errNoMemory
Not enough memory.

See Also
“FORM_add_rule()” on page 823

“FORM_create_object()” on page 853

“FORM_set_field_attr()” on page 905

“FORM_load_form_from_page()” on page 895

822 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_add_rule()

FORM_add_rule()
FORM_add_rule() adds a rule to a form. The rule is associated with the field
field_name. If field_name is NULL, the rule is associated with the form.

To replace or delete all rules for a field or form, use FORM_set_field_attr().

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_add_rule(form_h, field_name, rule);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

rule PSTR input. Rule for form or field.

Errors Returned
FORM_errCannotLockMem
Cannot lock memory handle.

FORM_errObjNotFound
Object not found.

FORM_errBadObject
Invalid object.

FORM_errFieldNotFound
Field not found.

FORM_errBadAttrForFieldType
Invalid attribute for field type.

FORM_errInvalidFieldType
Invalid field type.

FORM_errNoMemory
Not enough memory.

December 1996 WAL for Windows Programmer’s Reference Manual 823


7 WAL Function Reference
FORM_add_rule()

See Also
“FORM_add_named_rule()” on page 821

“FORM_create_object()” on page 853

“FORM_set_field_attr()” on page 905

“FORM_load_form_from_page()” on page 895

824 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_append_item()

FORM_append_item()
FORM_append_item() appends a NULL-terminated string to a list. This call is
used to accumulate list items; you must use FORM_install_list() to associate
the item list with the created listbox or combobox.

The first time this call is made for a given list, num_item_p, next_offset_p, and
max_line_p should all point to zero and items_h_p and itemlist_h should point
to NULL. The return values of these parameters should be passed in on
subsequent calls.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_append_item(item, index, sort, ignore_case,


num_item_p, next_offset_p, items_h_p, itemlist_h, max_line_p,
new_index_p);

Parameters
item PSTR input. A null-terminated string containing the value of
the item.

index WORD input. The position of the item to insert, zero being
first. If 0xFFFF, item is added to the end.

sort BOOL input. If TRUE, the list is kept in sort order.

ignore_case BOOL input. If TRUE, the sort order of upper case and lower
case letters is treated equally.

num_item_p WORD * input/output. The count of items in the list.

next_offset_p DWORD * input/output. Offset to the next item data.

items_h_p PHANDLE input/output. The items data in list.

itemlist_h PHANDLE input/output. Array of DWORD type offsets of the


item list.

max_line_p WORD * input/output. Maximum number of lines in one item


in the list.

new_index_p WORD * output. The index to the new item in the box. Can be
NULL if the caller does not need the new index number.

December 1996 WAL for Windows Programmer’s Reference Manual 825


7 WAL Function Reference
FORM_append_item()

See Also
“FORM_install_list()” on page 893

826 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_bind_val_func()

FORM_bind_val_func()
FORM_bind_val_func() binds a function to a validation function name for the
form associated with form_h. This is necessary only if the address of the
function was not bound previously by another method. FORMLIB uses the last
binding made.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_bind_val_func(form_h, func_name, val_func_p,


parameter);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

func_name PSTR input. Name of the function.

val_func_p ERRFARPROC input. Address of the callback function. The


callback function uses the CALLBACK calling convention.
The callback function must be exported by including it in an
EXPORTS statement in the application’s module-definition
file.

parameter DWORD input. The extra parameter that you want to pass to
the validation function.

Errors Returned
FORM_errNullPointer
Null pointer.

FORM_errFuncNameRequired
Function name required.

FORM_errCannotLockMem
Cannot lock memory handle.

FORM_errBadObject
Invalid object.

December 1996 WAL for Windows Programmer’s Reference Manual 827


7 WAL Function Reference
FORM_bind_val_func()

FORM_errInvalidFieldType
Invalid field type.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

828 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_box_add_item()

FORM_box_add_item()
FORM_box_add_item() adds an item to a listbox or combobox field. If the box
is sorted, index is ignored and the item is added to the box in sort order. If the
box is not sorted, index is the position at which to insert the item, zero being
first. index of 0xFFFF adds the item to the end of an unsorted box.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_add_item(form_h, field_name, index, item,


new_index);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the listbox or combobox.

index WORD input. The position of the item to insert, zero being
first. If 0xFFFF, item is added to the end.

item PSTR input. A null-terminated string containing the value of


the items.

new_index WORD * output. Returns the index to the new item in the box.
Can be NULL if the caller doesn’t need the new index.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 829


7 WAL Function Reference
FORM_box_delete()

FORM_box_delete()
FORM_box_delete() deletes an item (or all items) from a listbox or combobox
field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_delete(form_h, field_name, index,


num_items_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. The name of the listbox or combobox.

index WORD input. The position of the item to delete, zero being
first. If 0xFFFF, delete all items.

num_items_p WORD * output. Returns the count of items remaining in the


list. Can be NULL if the caller doesn’t need the count.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

830 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_box_directory()

FORM_box_directory()
FORM_box_directory() adds a list of files from the current directory to a
listbox or combobox field. Only files with attributes specified by file_attr and
matching file_spec are added.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_directory(form_h, field_name, file_attr,


file_spec, num_items_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. The name of the listbox or combobox.

file_attr WORD input. A DOS file attribute mask, as described under


DlgDirList in the Windows SDK.

file_spec PSTR input. A file specification; can contain wildcards.

num_items_p WORD * output. Returns the count of items in the list. Can be
NULL if the caller doesn’t need the count.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 831


7 WAL Function Reference
FORM_box_find_item()

FORM_box_find_item()
FORM_box_find_item() finds the first item that matches the specified string.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_find_item(form_h, field_name,


ignore_case, item, index);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. The name of the listbox or combobox.

ignore_case FN_BOOL input. If TRUE, upper and lower case characters


are treated the same.

item PSTR input. A null-terminated string containing the value of


the item.

index WORD * output. If found, returns the index of the item. If not
found, returns 0xFFFF.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_box_match_item()” on page 838

832 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_box_get_count()

FORM_box_get_count()
FORM_box_get_count() returns the count of items in a listbox or combobox
field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_get_count(form_h, field_name,


num_items_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. The name of the listbox or combobox.

num_items_p WORD * output. Returns the count of items in the list.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 833


7 WAL Function Reference
FORM_box_get_sel()

FORM_box_get_sel()
FORM_box_get_sel() returns the current selection in a single-selection listbox
or combobox field. It returns the selection state of an item in a multiple-
selection listbox.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_get_sel(form_h, field_name, index,


selection_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. The name of the listbox or combobox.

index WORD input. If it is a single-selection box, index is ignored. If


it is a multiple-selection box, index specifies the index of the
item to be selected.

selection_p WORD * output. If it is a single-selection box, selection_p


returns the index of the selected entry, or 0xFFFF if no entry
is selected. If it is a multiple-selection box, selection_p
returns non-zero if the item specified by index is selected,
zero if it is not selected.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

834 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_box_get_sel_count()

FORM_box_get_sel_count()
FORM_box_get_sel_count() returns the number of selected items in a listbox
or combobox field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_get_sel_count(form_h, field_name, count);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the listbox or combobox.

count_p WORD * output. If the box is a single-selection listbox or


combobox, count_p points to 1 if an item is selected, zero if
none is. If the box is a multiple-selection listbox, count_p
returns the number of selected items.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 835


7 WAL Function Reference
FORM_box_get_text()

FORM_box_get_text()
FORM_box_get_text() returns in text the NULL-terminated string data for the
item specified by index in a listbox or combobox field. text must point to a
buffer big enough to hold the string and the NULL-terminator.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_get_text(form_h, field_name, index, text);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the listbox or combobox.

index WORD input. Position of the item.

text PSTR output. The string value of the item.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

836 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_box_get_text_len()

FORM_box_get_text_len()
FORM_box_get_text_len() returns in length_p a pointer to the length of the
NULL-terminated string data for the item specified by index in a listbox or
combobox field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_get_text_len(form_h, field_name, index,


length_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the listbox or combobox.

index WORD input. Position of the item.

length_p WORD * output. Pointer to the length of the string value of the
item (does not include the NULL-terminator).

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 837


7 WAL Function Reference
FORM_box_match_item()

FORM_box_match_item()
FORM_box_match_item() finds the first item that matches the supplied prefix
string.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_match_item(form_h, field_name,


ignore_case, prefix, start_index, index);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. The name of the listbox or combobox.

ignore_case FN_BOOL input. If TRUE, upper and lower case characters


are treated the same.

prefix PSTR input. The prefix string of the item to be matched.

start_index WORD input. If 0 or -1 is specified, searches the list from the


beginning.

index WORD * output. If found, returns the index of the item. If not
found, returns 0xFFFF.

See Also
“FORM_box_find_item()” on page 832

“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

838 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_box_select_list()

FORM_box_select_list()
FORM_box_select_list() sets or clears a list of items in a multi-selection
listbox.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_select_list(form_h, field_name,


num_items, item_list, select);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. The name of the listbox or combobox.

num_items WORD input. The number of items in the list.

item_list WORD * input. Pointer to an array of item indices that are to


be set or cleared.

select WORD input. Input non-zero to select the items. Input zero to
deselect the items.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 839


7 WAL Function Reference
FORM_box_set_default()

FORM_box_set_default()
FORM_box_set_default() adds an item (or all items) to or removes an item (or
all items) from the default value of a multiple-selection listbox.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_set_default(form_h, field_name, index,


selection);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of a multiple-selection listbox.

index WORD input. Specifies the item to be added or removed or


0xFFFF if all items are to be added or removed.

selection WORD input. Set to non-zero if the item(s) are to be added,


zero if they are to be removed.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

840 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_box_set_sel()

FORM_box_set_sel()
FORM_box_set_sel() sets the current selection in a single-selection listbox or
combobox field. It sets the selection state of an item (or all items) in a
multiple-selection listbox. If the box is a single-selection listbox or combobox,
index specifies the item to be selected, or 0xFFFF if the box is to have no
selection. If the box is a multiple-selection listbox, index specifies the item to
have its selection state changed, or 0xFFFF if all items are to be changed.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_box_set_sel(form_h, field_name, index,


selection);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the listbox or combobox.

index WORD input. Position of the item.

selection WORD input. Set to non-zero if the item(s) are to be selected,


zero if they are to be not selected.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 841


7 WAL Function Reference
FORM_change_menu_item()

FORM_change_menu_item()
FORM_change_menu_item() changes an existing item in a menu. The menu
handle and code identify the item to change. desc and style are set to the new
values. code is the character that is returned when the menu item has been
selected. It cannot be changed with this function.

desc is the text that is displayed in the menu when the form is executed. If
NULL, desc is left unchanged. Both desc and code must be unique within a
menu.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_change_menu_item(menu_h, code, desc,


style);

Parameters
menu_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

code char input. Menu item identifier.

desc PSTR input. Menu contents.

style WORD input. Menu style. Can be MF_ENABLED, MF_


GRAYED, MF_CHECKED, or MF_UNCHECKED. Zero
indicates enabled and not checked.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

842 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_check_syntax()

FORM_check_syntax()
FORM_check_syntax() checks syntax for a rule expression. It returns the data
type of the expression’s value if it has valid syntax.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_check_syntax(form_h, rule_text, type_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

rule_text PSTR input. The string value of the rule.

type_p FORM_data_type * output. Specifies the data type. Can be


one of the following:
FORM_NULL_TYPE
FORM_NUMBER_TYPE
FORM_STRING_TYPE
FORM_BOOLEAN_TYPE
FORM_DATE_TYPE
FORM_TIME_TYPE
FORM_DOCUMENT_TYPE
FORM_FOLDER_TYPE
FORM_SELECTION_TYPE

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_data_type” on page 281

December 1996 WAL for Windows Programmer’s Reference Manual 843


7 WAL Function Reference
FORM_clear()

FORM_clear()
FORM_clear() clears the rectangular area specified on the character map for
the form associated with form_h. If to_x or to_y exceeds the number of
columns or rows respectively, it is assumed to be that number. All row and
column values are in 1/100ths of a unit. For example, to clear from row 3,
column 4 through row 9, column 10, use from_x = 400, from_y = 300, to_x =
1000, to_y = 900.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_clear(form_h, from_x, from_y, to_x, to_y);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

from_x int input. 1/100ths of a column.

from_y int input. 1/100ths of a row.

to_x int input. 1/100ths of a column.

to_y int input. 1/100ths of a row.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

844 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_clear_field_value()

FORM_clear_field_value()
FORM_clear_field_value() resets a field to the appropriate undefined state. If
ignore_style is TRUE, the field style is ignored; otherwise, the field is cleared
only if input is allowed.

allow_ui only applies to signature fields. If allow_ui is TRUE and the field to be
cleared is a signature field, the user (through the UI) can clear the field.
Otherwise, the user cannot clear the field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_clear_field_value(form_h, field_name,


ignore_style, allow_ui);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

ignore_style FN_BOOL input. If TRUE, the field style is ignored.

allow_ui FN_BOOL input. If TRUE, user can clear through user


interface.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 845


7 WAL Function Reference
FORM_clear_form_values()

FORM_clear_form_values()
FORM_clear_form_values() resets all input fields in the form to their
appropriate undefined state. If ignore_style is TRUE, all fields are cleared;
otherwise, only fields that can accept input are cleared.

allow_ui applies only to signature fields. If allow_ui is TRUE and the field to be
cleared is a signature field, the user (through the UI) can clear the field.
Otherwise, the user cannot clear the field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_clear_form_values(form_h, ignore_style,


allow_ui);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

ignore_style FN_BOOL input. If TRUE, all fields are cleared.

allow_ui FN_BOOL input. If TRUE, user can clear through the user
interface.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

846 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_clone_form()

FORM_clone_form()
FORM_clone_form() adds an exact copy of a form to the same session as the
original. The clone form is flagged and will not be found by name. The original
is unchanged. The clone form does not appear in the object list returned by
FORM_get_object_list().

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_clone_form(original_h, clone_h);

Parameters
original_h HANDLE input. The original form handle.

clone_h PHANDLE output. Pointer to the handle to the exact copy of


the original form.

See Also
“FORM_get_object_list()” on page 887

December 1996 WAL for Windows Programmer’s Reference Manual 847


7 WAL Function Reference
FORM_close_object()

FORM_close_object()
FORM_close_object() frees the resources associated with an object of type
form, menu, menu bar, or validation table. For object type form, it recursively
frees the resources associated with its fields.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_close_object(object_h);

Parameters
object_h HANDLE input. Handle for the object obtained from FORM_
create_object() or FORM_load_form_from_page().

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

848 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_close_volatile_objects()

FORM_close_volatile_objects()
FORM_close_volatile_objects() closes all objects in the session that are
marked as volatile. A volatile object is defined as one that has been loaded
internally.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_close_volatile_objects(session_h);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

See Also
“FORM_init()” on page 892

December 1996 WAL for Windows Programmer’s Reference Manual 849


7 WAL Function Reference
FORM_create_field()

FORM_create_field()
FORM_create_field() adds a field with type specified by the type parameter to
the form accessed through form_h.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_create_field(form_h, type, field_name, num_p,


struct_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

type FORM_FieldType_typ input. Type of field to add. Valid field


types are:
FORM_FT_CHECKBOX
FORM_FT_COMBOBOX
FORM_FT_DATE
FORM_FT_DOCUMENT
FORM_FT_FOLDER
FORM_FT_INTEGER
FORM_FT_LISTBOX
FORM_FT_MENU
FORM_FT_NUMBER
FORM_FT_PUSHBUTTON
FORM_FT_RADIOBUTTON
FORM_FT_SCROLLBAR
FORM_FT_SIGNATURE
FORM_FT_STRING
FORM_FT_TIME

Valid display field types are:


FORM_FT_BITMAP
FORM_FT_ELLIPSE
FORM_FT_GROUPBOX
FORM_FT_LINE
FORM_FT_PATTERN
FORM_FT_RECT
FORM_FT_ROUNDRECT
FORM_FT_TEXT

field_name PSTR input. The name of the new field.

850 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_create_field()

num_p WORD * input. Pointer to a field number. If num_p points to


zero, the lowest available ordinal is assigned and returned in
num_p. Otherwise, num_p must be in the range from 1 to
n+1, where n is the number of fields already in the form.

struct_p void * input. A pointer to the field structure that contains all
the attributes necessary to create the field. The actual
structure to which it points is determined by the value of type.
There is a field structure for each field type.

If struct_p is NULL, then the various field attributes are set to


default values and can be changed with FORM_set_field_
attr().

struct_p can be one of the following:


FORM_BitmapField_typ
FORM_ButtonField_typ
FORM_CheckboxField_typ
FORM_ComboboxField_typ
FORM_DateField_typ (for time and date fields)
FORM_DocField_typ (for folders, document,
and integer fields)
FORM_GroupboxField_typ
FORM_LineField_typ
FORM_ListboxField_typ
FORM_MenuField_typ
FORM_NumberField_typ
FORM_PatternField_typ
FORM_RadioField_typ
FORM_RectField_typ (for ellipses and rectangles)
FORM_RoundRectField_typ
FORM_ScrollbarField_typ
FORM_SignatureField_typ
FORM_StringField_typ
FORM_TextField_typ

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 851


7 WAL Function Reference
FORM_create_field()

“FORM_set_field_attr()” on page 905

“FORM_FieldType_typ” on page 298

The sample application in the directory C:\FILENET\SAMPLE\FORM

852 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_create_object()

FORM_create_object()
FORM_create_object() creates an object of the type specified by the type
parameter and returns a handle for the object. The object is identified by its
name and type. session_h is a handle obtained from FORM_init(). The object
handle returned is required by other FORMLIB functions.

An error is returned if you try to create an object that already exists.

When the object is created, it is has all default attributes. Use FORM_set_
object_attr() to change the attributes.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_create_object(session_h, type, object_name,


object_h);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

type FORM_ObjectType_typ input. Object type. Can be one of the


following:

FORM_OT_FORM Create a form


FORM_OT_MENU Create a menu
FORM_OT_MENUBAR Create a menubar
FORM_OT_VALTABLE Create a validation table

object_name PSTR input. Name of the object.

object_h PHANDLE output. Object handle.

See Also
“FORM_init()” on page 892

“FORM_set_object_attr()” on page 912

“FORM_ObjectType_typ” on page 319

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 853


7 WAL Function Reference
FORM_default_field_value()

FORM_default_field_value()
FORM_default_field_value() sets the value of the specified input field in the
form accessed through form_h to its default value. For date and time fields, if
the default value is the undefined value, this function sets the value to the
current date or time, respectively.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_default_field_value(form_h, field_name,


ignore_style);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

ignore_style FN_BOOL input. If FALSE, only those fields that can accept
input are changed to the appropriate default values.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

854 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_default_form_values()

FORM_default_form_values()
FORM_default_form_values() sets the value of all input fields in the form
accessed through form_h to their default values. If ignore_style is FALSE,
only those fields that can accept input are changed to the default value;
otherwise, all fields, regardless of style, are changed to the default. For date
and time fields, if the default value is the undefined value, this function sets
the value to the current date or time, respectively.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_default_form_values(form_h, ignore_style);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

ignore_style FN_BOOL input. If TRUE, all fields are set to default values. If
FALSE, only those fields that can accept input are set to
default values.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 855


7 WAL Function Reference
FORM_delete_field()

FORM_delete_field()
FORM_delete_field() deletes a field from a form. field_name identifies the
field to be deleted. When the field is deleted, the ordinals of the other fields in
the form are adjusted to close the gap.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_delete_field(form_h, field_name);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

856 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_do_form()

FORM_do_form()
FORM_do_form() executes the form associated with form_h, displaying all the
visible features in a window, accepting user input in the input fields, and
calling any validation functions as appropriate. If the form is hidden, it is made
visible before execution.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_do_form(form_h, wait, next_field, style,


terminator_field, terminator_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

wait WORD input. Number of seconds before continue.

next_field PSTR input. The current field at the start of the execution. If
NULL or empty, the first field in the form is used.

style WORD input. Valid values are:


FORM_DO_MODAL
FORM_DO_VALID

terminator_field
PSTR input. The name of the terminator field.

terminator_p FORM_Terminator_typ * output. Pointer to user-input


terminator.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_Terminator_typ” on page 343

December 1996 WAL for Windows Programmer’s Reference Manual 857


7 WAL Function Reference
FORM_enable_fields()

FORM_enable_fields()
FORM_enable_fields() enables or disables input fields.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_enable_fields(form_h, field_name, enable);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. If NULL, enabling and disabling is performed on


all input fields; otherwise, the field indicated by field_name is
enabled or disabled.

enable FN_BOOL input. If TRUE, input fields are enabled; otherwise,


they are disabled.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

858 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_enable_form_window()

FORM_enable_form_window()
FORM_enable_form_window() enables or disables the form window. If the
form window does not exist, it has no effect.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_enable_form_window(form_h, enable);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

enable FN_BOOL input. If TRUE, the form window is enabled;


otherwise, it is disabled.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 859


7 WAL Function Reference
FORM_escape_form()

FORM_escape_form()
FORM_escape_form() escapes form execution. It is the same as a user
pressing the escape key. If the form window does not exist or if the form is not
being executed, it has no effect.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_escape_form(form_h);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

860 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_evaluate()

FORM_evaluate()
FORM_evaluate() evaluates a rule expression. It returns the data type of the
expression’s value, as well as the value itself. The following table shows the
possible values for the data type parameter and the corresponding data type
of the returned value.

data_type Data Type of Value


FORM_NUMBER_TYPE FP_number
FORM_STRING_TYPE HANDLE to null-terminated string
FORM_BOOLEAN_TYPE bool
FORM_DATE_TYPE FN_date_typ
FORM_TIME_TYPE FN_time_typ
FORM_DOCUMENT_TYPE ASE_doc_id_typ
FORM_FOLDER_TYPE FN_folnum_typ
FORM_SELECTION_TYPE FN_selection_typ

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_evaluate(form_h, rule_text, data_type, value);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

rule_text PSTR input. NULL-terminated string that is the rule


expression to be evaluated.

data_type FORM_data_type * output. The data type of the expression’s


value.

value void * output. The value of the rule expression.

December 1996 WAL for Windows Programmer’s Reference Manual 861


7 WAL Function Reference
FORM_evaluate()

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_data_type” on page 281

862 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_execute_form()

FORM_execute_form()
FORM_execute_form() executes the form associated with form_h, displays all
the visible features in a window, accepts user input in the input fields, and
calls validation functions, as appropriate. If the form is hidden, it is made
visible before execution.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_execute_form(form_h, wait, style,


terminator_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

wait WORD input. Number of seconds before continue.

style WORD input. Valid inputs are:


FORM_DO_MODAL
FORM_DO_VALID

terminator_p FORM_Terminator_typ * output. The terminator input by end


user.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_Terminator_typ” on page 343

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 863


7 WAL Function Reference
FORM_exit()

FORM_exit()
FORM_exit() frees all the resources allocated to the session. session_h is
invalid on return from FORM_exit().

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_exit(session_h);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

See Also
“FORM_init()” on page 892

The sample application in the directory C:\FILENET\SAMPLE\FORM

864 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_find_file()

FORM_find_file()
FORM_find_file() finds the specified file using the path specified in
LOGON.CFG. If the file is not found, it returns the error FORM_
errFileNotFound.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_find_file(session_h, file_name,


def_module_dir, where_found, is_server_file_p);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_name PSTR input. The file to find.

def_module_dir
PSTR input. The first place to look for the file.

where_found PSTR output. Full path name of the file if it was found.

is_server_file_p
FN_BOOL * output. Pointer to TRUE if the file is on the
server, FALSE otherwise.

See Also
“FORM_init()” on page 892

“FORM_find_file_in_path()” on page 866

December 1996 WAL for Windows Programmer’s Reference Manual 865


7 WAL Function Reference
FORM_find_file_in_path()

FORM_find_file_in_path()
FORM_find_file_in_path() finds the specified file using the path specified in
the path parameter. If the file is not found, it returns the error FORM_
errFileNotFound.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_find_file_in_path(session_h, file_name, path,


def_module_dir, where_found, is_server_file_p);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_name PSTR input. The file to find.

path PSTR input. Path to search. The directories to search are


delimited by the plus sign “+”.

def_module_dir
PSTR input. The first place to look for file.

where_found PSTR output. Full path name of the file if it was found.

is_server_file_p
FN_BOOL * output. Pointer to TRUE if the file is on the server
file; FALSE otherwise.

See Also
“FORM_init()” on page 892

“FORM_find_file()” on page 865

866 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_find_file_in_path2()

FORM_find_file_in_path2()
FORM_find_file_in_path2() finds the specified file using the path specified in
the path parameter and saves it in the location specified by where_save. If the
file is not found, it returns the error FORM_errFileNotFound defined in
FORMLIB.I.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_find_file_in_path2(session_h, file_name, path,


def_module_dir, where_found, is_server_file_p, where_save);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_name PSTR input. The file to find.

path PSTR input. Path to search. Multiple directories to search are


delimited by the plus sign “+”, servers or domains by “;”.
Example: C:\filenet\docs+ temporary\docs; FN
The usual code conditional operators apply.

def_module_dir
PSTR input. The first place to look for file.

where_found PSTR output. Full path name of file if it was found.

is_server_file_p
FN_BOOL * output. Pointer to TRUE if it is a server file;
FALSE if it isn’t a server file.

where_save PSTR input. Full path name of save location.

Errors Returned
FORM_errFileNotFound
File not found.

December 1996 WAL for Windows Programmer’s Reference Manual 867


7 WAL Function Reference
FORM_find_file_in_path2()

See Also
“FORM_find_file()” on page 865

“FORM_find_file_in_path()” on page 866

“FORM_init()” on page 892

868 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_generate_fill_in_page()

FORM_generate_fill_in_page()
FORM_generate_fill_in_page() writes to file_name a FileNet FORM page
representation of the form (presumably filled in by a call to FORM_execute_
form()). This representation is in the format suitable for committing as a
FORM type document.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_generate_fill_in_page(form_h, file_name);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

file_name PSTR input. Name of the file that contains the form ready for
committal.

See Also
“FORM_create_object()” on page 853

“FORM_execute_form()” on page 863

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 869


7 WAL Function Reference
FORM_generate_form_file()

FORM_generate_form_file()
FORM_generate_form_file() writes to new_file_name the Forms Language
specification of all objects in the session which belong to file_name. This file
can be saved via FORM_server_save_file() to centralized storage for general
use.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_generate_form_file(session_h, file_name,


new_file_name, Values);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_name PSTR input. Name of the file to be generated. If NULL, all


objects are written to (saved as) new_file_name.

new_file_name
PSTR input. Name of the file to be written (saved as).

Values bool input. If TRUE, all end user input values are saved to the
file.

Error Returned
FORM_errLoadLibrary
Load library failed.

See Also
“FORM_init()” on page 892

“FORM_server_save_file()” on page 904

The sample application in the directory C:\FILENET\SAMPLE\FORM

870 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_generate_image_page()

FORM_generate_image_page()
FORM_generate_image_page() writes to file_name a FileNet IMAGE page
representation of the form (presumably filled in by a call to FORM_execute_
form()). This representation is in the compressed, banded image format
suitable for committing as an IMAGE type document.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_generate_image_page(form_h, file_name);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

file_name PSTR input. Name of the file to write.

See Also
“FORM_create_object()” on page 853

“FORM_execute_form()” on page 863

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 871


7 WAL Function Reference
FORM_generate_one_form_file()

FORM_generate_one_form_file()
FORM_generate_one_form_file() writes the Forms Language specification of
all objects in the session that belong to file_name and form_name to new_
file_name.

For performance reasons, we recommend that you store one form per form
file. You can use FORM_generate_one_form_file() to generate one form file
per form instead of using FORM_generate_form_file() to generate one form
file for all the forms in the session.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_generate_one_form_file(session_h, file_name,


form_name, new_file_name, Values);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_name PSTR input. Name of the file to be generated. If NULL, all


objects that match form_name are written to new_file_name.

form_name PSTR input. Name of the form to be generated. If NULL, all


forms in the session are written to new_file_name.

new_file_name
PSTR input. Name of the file to write.

Values FN_BOOL input. If TRUE, all end user input values are saved
to the file.

See Also
“FORM_generate_form_file()” on page 870

“FORM_init()” on page 892

872 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_generate_pcode_file()

FORM_generate_pcode_file()
FORM_generate_pcode_file() writes to file_name a FileNet P-code stream,
including an IMAGE page representation of the form (presumably filled-in by a
call to FORM_execute_form()). This representation is in the compressed,
banded image format suitable for printing with IAFLIB_print_files(). It has a P-
code page header.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_generate_pcode_file(form_h, file_name);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

file_name PSTR input. Name of the file to write.

See Also
“FORM_create_object()” on page 853

“FORM_execute_form()” on page 863

“FORM_load_form_from_page()” on page 895

“IAFLIB_print_files()” on page 1055

December 1996 WAL for Windows Programmer’s Reference Manual 873


7 WAL Function Reference
FORM_get_bitmap_handle()

FORM_get_bitmap_handle()
FORM_get_bitmap_handle() gets a handle for the bitmap when a bitmap field
is created or modified.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_field_attr(session_h, field_data_p);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

field_data_p FORM_BitmapField_typ * output. Pointer to the bitmap field’s


attribute structure.

See Also
“FORM_init()” on page 892

“FORM_BitmapField_typ” on page 268

874 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_field_attr()

FORM_get_field_attr()
FORM_get_field_attr() returns in attr_p the field attribute specified by index,
for the field named field_name.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_field_attr(form_h, field_name, index,


attr_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

index FORM_FieldAttr_typ input. Field attribute type. Can be one of


the following:
FORM_FA_ALL
FORM_FA_ACTUALSIZE
FORM_FA_BACKCOLOR
FORM_FA_BRUSH
FORM_FA_CHARLIST
FORM_FA_DEFAULT
FORM_FA_DESCRIPTION
FORM_FA_DISPLAYAREA
FORM_FA_FIELDPROC
FORM_FA_FILENAME
FORM_FA_FONT
FORM_FA_FORECOLOR
FORM_FA_GROUP
FORM_FA_HELP
FORM_FA_MAPMODE
FORM_FA_MASK
FORM_FA_OBJNAME
FORM_FA_ORDINAL
FORM_FA_PEN
FORM_FA_PROMPT
FORM_FA_RANGE
FORM_FA_RASTEROP
FORM_FA_RESOURCE

December 1996 WAL for Windows Programmer’s Reference Manual 875


7 WAL Function Reference
FORM_get_field_attr()

FORM_FA_ROUNDNESS
FORM_FA_RULELIST
FORM_FA_SECURITY
FORM_FA_SIZE
FORM_FA_STRETCHMODE
FORM_FA_STYLE
FORM_FA_TABLE
FORM_FA_TERMCODE
FORM_FA_TEXT
FORM_FA_TEXTFORMAT
FORM_FA_TYPE
FORM_FA_USER
FORM_FA_VALFUNC
FORM_FA_VALUE

attr_p void * output. Pointer to the field attribute specified by index.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_FieldAttr_typ” on page 289

876 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_field_attr_using_ord()

FORM_get_field_attr_using_ord()
FORM_get_field_attr_using_ord() returns in attr_p the field attribute specified
by index, for the field whose ordinal value is ordinal. This function should be
used with caution because ordinal values change when fields are deleted and
re-ordered.

In addition, when a form is executed, radio button ordinal values are made
contiguous for radio buttons that belong to the same group. Use FORM_get_
field_attr() if in doubt about the ordinal value of a field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_field_attr_using_ord(form_h, ordinal, index,


attr_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

ordinal WORD input. The ordinal number of the field.

index FORM_FieldAttr_typ input. Field attribute type (FORM_FA_


VALUE, etc.).

attr_p void * output. Field attribute specified by index.

See Also
“FORM_create_object()” on page 853

“FORM_get_field_attr()” on page 875

“FORM_load_form_from_page()” on page 895

“FORM_FieldAttr_typ” on page 289

December 1996 WAL for Windows Programmer’s Reference Manual 877


7 WAL Function Reference
FORM_get_field_count()

FORM_get_field_count()
FORM_get_field_count() returns the count of input fields, display fields, and
form fields in the specified form.

Input fields can be one of the following types: FORM_FT_CHECKBOX, FORM_


FT_COMBOBOX, FORM_FT_DATE, FORM_FT_DOCUMENT, FORM_FT_FOLDER,
FORM_FT_INTEGER, FORM_FT_LISTBOX, FORM_FT_MENU, FORM_FT_
NUMBER, FORM_FT_PUSHBUTTON, FORM_FT_RADIOBUTTON, FORM_FT_
SCROLLBAR, FORM_FT_SIGNATURE, FORM_FT_STRING, or FORM_FT_TIME.

Display fields can be one of the following types: FORM_FT_BITMAP, FORM_FT_


ELLIPSE, FORM_FT_GROUPBOX, FORM_FT_LINE, FORM_FT_PATTERN,
FORM_FT_RECT, FORM_FT_ROUNDRECT, or FORM_FT_TEXT.

Form fields are of type FORM_FT_FORM.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_field_count(form_h, input_fields_p,


display_fields_p, form_fields_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

input_fields_p WORD * output. Pointer to the number of input fields.

display_fields_p
WORD * output. Pointer to the number of display fields.

form_fields_p WORD * output. Pointer to the number of form fields.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

878 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_field_info()

FORM_get_field_info()
FORM_get_field_info() returns information about the field named field_name
in the structure pointed to by field_struct. Each field type has an associated
structure.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_field_info(form_h, field_name,


field_struct_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

field_struct_p void * output. Pointer to a field structure; type depends on its


field type. (e.g. FORM_FT_MENU, etc.)

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 879


7 WAL Function Reference
FORM_get_field_name()

FORM_get_field_name()
FORM_get_field_name() returns the name of the field specified by the ordinal
that is of the type specified by the type parameter. field_name must point to a
buffer of at least FORM_LEN_FIELD_NAME + 1 bytes.

If type is FORM_FT_NULL, this function can be used to loop through all fields
in the form. Use FORM_get_field_count() to get the number of fields in the
form.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_field_name(form_h, ordinal, type,


field_name);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

ordinal WORD input. Specifies the ordinal number of a field.

type FORM_FieldType_typ input. Form field type. If FORM_FT_


NULL, you can loop through all fields.

field_name PSTR output. Name of the field.

See Also
“FORM_create_object()” on page 853

“FORM_get_field_count()” on page 878

“FORM_load_form_from_page()” on page 895

“FORM_FieldType_typ” on page 298

880 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_file_list()

FORM_get_file_list()
FORM_get_file_list() returns the number of files opened and a handle for the
list of file names. The client frees this memory when it is no longer needed.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_file_list(session_h, count_p, list_h);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

count_p WORD * output. Pointer to the number of files.

list_h PHANDLE output. Handle for a list of file names, separated


by a null character.

See Also
“FORM_init()” on page 892

December 1996 WAL for Windows Programmer’s Reference Manual 881


7 WAL Function Reference
FORM_get_file_service()

FORM_get_file_service()
FORM_get_file_service() returns the current file service name that is
associated with the session. FORMLIB uses the File Service name specified
by file_service_p to locate form files.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_file_service(session_h, file_service_p);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_service_p ASE_service_name_typ * output. Pointer to the structure


containing the NCH name for the current remote File Service
name.

See Also
“FORM_init()” on page 892

“ASE_service_name_typ” on page 178

882 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_last_field()

FORM_get_last_field()
FORM_get_last_field() returns the name of the last field (if any) visited on the
most recent execution of the form accessed through form_h. The return value
can be an empty string if the form has not been executed.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_last_field(form_h, last_field);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

last_field PSTR output. The name of the last field visited. It returns an
empty string, if the form has not been executed. Else, it
returns a string of length FORM_LEN_FIELD_NAME + 1.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 883


7 WAL Function Reference
FORM_get_menu_items()

FORM_get_menu_items()
FORM_get_menu_items() returns the number of menu items in the menu and
a handle for the list of menu items. The client is to free this memory when it is
no longer needed.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_menu_items(menu_h, count_p,


items_h_p);

Parameters
menu_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

count_p WORD * output. Number of menu items.

items_h_p PHANDLE output. Pointer to the handle for an array of menu


items of type FORM_MenuItem_typ.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_MenuItem_typ” on page 315

884 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_menubar_items()

FORM_get_menubar_items()
FORM_get_menubar_items() returns the number of menubar items in the
menubar and a handle for the list of menubar items. The client should free this
memory when it is no longer needed. The menubar items array referenced by
items_h_p is an array of *count structures of type FORM_Softkey_typ.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_menubar_items(menubar_h, count_p,


items_h_p);

Parameters
menubar_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

count_p WORD * output. Number of menubar items.

items_h_p PHANDLE output. Pointer to the handle for an array of


menubar items of type FORM_Softkey_typ.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_Softkey_typ” on page 337

December 1996 WAL for Windows Programmer’s Reference Manual 885


7 WAL Function Reference
FORM_get_object_attr()

FORM_get_object_attr()
FORM_get_object_attr() returns in attr_p the form attribute specified by index.

If index is attr_p is a pointer to a structure of type


FORM_ATTR_HELP FORM_HelpAttr_typ
FORM_ATTR_VALFUNC FORM_ValFuncAttr_typ
FORM_ATTR_ICON FORM_IconAttr_typ
FORM_ATTR_MENUBAR FORM_MenubarAttr_typ
FORM_ATTR_COLOR FORM_ColorAttr_typ (char map colors)
FORM_ATTR_DESC char[FORM_LEN_OBJ_DESC + 1]

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_object_attr(object_h, index, attr_p);

Parameters
object_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

index FORM_FormAttr_typ input. The form attribute type.

attr_p void * output. Pointer to attribute of type specified by index.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_FormAttr_typ” on page 300

886 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_object_list()

FORM_get_object_list()
FORM_get_object_list() searches for all objects of the type specified by the
type parameter found in the file file_name. FORM_get_object_list() returns
the number of objects found and a handle for a list of object names. The client
is to free this memory when it is no longer needed.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_object_list(session_h, type, file_name,


count, objects_h_p);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

type FORM_ObjectType_typ input. Object type. Can be one of the


following:
FORM_OT_ALL
FORM_OT_FORM
FORM_OT_MENU
FORM_OT_MENUBAR
FORM_OT_VALTABLE
FORM_OT_REPORT
FORM_OT_PAMPHLET

If FORM_OT_ALL is specified, all objects in the file or


session are returned.

file_name PSTR input. Name of file. If NULL, all objects associated with
session_h are searched

count WORD * output. Number of objects found.

objects_h_p PHANDLE output. Pointer to a handle for an array of object


names of each in FORM_LEN_OBJ_NAME + 1 length.

See Also
“FORM_init()” on page 892

“FORM_ObjectType_typ” on page 319

December 1996 WAL for Windows Programmer’s Reference Manual 887


7 WAL Function Reference
FORM_get_one_valtable_item()

FORM_get_one_valtable_item()
FORM_get_one_valtable_item() returns a pointer to a single item in a
validation table. Use this entry point to get items in tables of more than 404
items, that is, if count is greater than 404. (This means that the table size
exceeds the 64KB segment boundary.)

If you want more than a single item, iterate this function. Index should be
greater than or equal to zero and less than the number of items in the
validation table. If count is less than or equal to 404, FORM_get_valtable_
items() is more convenient, because it returns a pointer to the whole table and
needs no iteration.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_one_valtable_item (valtable_p, item_p,


index, count);

Parameters
valtable_p FORM_ValItem_typ * input. Pointer to validation table.

item_p FORM_ValItem_typ * output. Pointer to single table item.

index WORD input. The items’ unique index. Should be greater


than or equal to zero and less than the number of items in the
validation table.

count WORD input. Number of table items in the validation table


from FORM_get_valtable_items().

See Also
“FORM_get_valtable_items()” on page 891

“FORM_ValItem_typ” on page 348

888 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_row_text()

FORM_get_row_text()
FORM_get_row_text() copies the specified row (div 100) into row_string. If
length is zero, the entire row is copied and it is the caller’s responsibility to
ensure that row_string is large enough to hold the entire row plus a NULL
terminator. If length is non-zero, no more than (length div 100) bytes are
copied.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_row_text(form_h, row, length, row_string);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

row WORD input. The (row/100) row number position.

length WORD input. The (length/100) number of characters. If zero,


the whole row of text is returned to the buffer.

row_string PSTR output. String containing the retrieved row.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 889


7 WAL Function Reference
FORM_get_terminator()

FORM_get_terminator()
FORM_get_terminator() returns the terminator (if any) from the most recent
execution of the form accessed through form_h. The return value can be
FORM_errNoExecution, FORM_errInProgress, or FORM_errTimeOut,
indicating, respectively, that the form has not been executed, the form is
currently executing, or the form timed out without a terminator key having
been struck. In the first and last of these cases, the value returned in
terminator_p is undefined.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_terminator(form_h, terminator_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

terminator_p FORM_Terminator_typ * output. Pointer to the terminator


from the most recent execution.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_Terminator_typ” on page 343

890 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_get_valtable_items()

FORM_get_valtable_items()
FORM_get_valtable_items() returns the number of table items in the
validation table and a handle for an array of structures of type FORM_
ValItem_typ, representing the items. The client is to free this memory when it
is no longer needed.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_get_valtable_items(table_h, count_p, items_h);

Parameters
table_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

count_p WORD * output. Number of validation table items.

items_h PHANDLE output. Handle for an array of validation table


items of type FORM_ValItem_typ.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_ValItem_typ” on page 348

December 1996 WAL for Windows Programmer’s Reference Manual 891


7 WAL Function Reference
FORM_init()

FORM_init()
FORM_init() allocates and initializes data for the session and returns the
session handle. This must be the first FORMLIB function called. file service p
indicates which File Service to use to find form files. If file_service_p is NULL,
the default File Service for the current domain is used.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_init(session_h, file_service_p);

Parameters
session_h PHANDLE output. The FORMLIB session handle.

file_service_p ASE_service_name_typ * input. Pointer to the structure


containing the NCH name for the remote File Service to be
used. Can be NULL for default File Service.

See Also
“ASE_service_name_typ” on page 178

The sample application in the directory C:\FILENET\SAMPLE\FORM

892 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_install_list()

FORM_install_list()
FORM_install_list() associates a list of items with a newly-created field. You
usually call this function right after calling FORM_append_item().

Be careful that this function does not delete any pre-existing handles in the
internal data structure. It does not update the field window since it assumes
the window does not yet exist.

Never delete or modify the handles input to this call.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_install_list(form_h, field_name, num_item,


next_offset, items_h, itemlist_h, max_line);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the listbox or combobox.

num_item WORD input. The number of items in the list.

next_offset DWORD input. Offset to the next data item.

items_h HANDLE input. The list of data items.

itemlist_h HANDLE input. Array of DWORD type offsets of the item list.

max_line WORD input. Maximum number of lines in one item of the list.

See Also
“FORM_append_item()” on page 825

“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 893


7 WAL Function Reference
FORM_load_file()

FORM_load_file()
FORM_load_file() loads the file specified by file_name into the session by
parsing its contents and storing the data in the session. Any object associated
with the file already in the session is closed prior to loading the file.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_load_file(session_h, file_name, ErrCount,


err_text_h);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_name PSTR input. Name of the file to be loaded.

ErrCount PINT output. Number of errors encountered. (Warning


messages are not included.)

err_text_h PHANDLE output. Handle for a NULL terminated string of


error and warning messages. Each message is separated by
a newline ‘\n’ character. If NULL, no handle is returned.

See Also
“FORM_init()” on page 892

894 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_load_form_from_page()

FORM_load_form_from_page()
FORM_load_form_from_page() reads the FORM language from file_name,
parses it, and returns a form handle. file_name can be generated by FORM_
generate_fill_in_page().

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_load_form_from_page(session_h, file_name,


form_h);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_name PSTR input. Name of the Form file. Can be generated by


FORM_generate_fill_in_page().

form_h PHANDLE output. Form handle.

See Also
“FORM_generate_fill_in_page()” on page 869

“FORM_init()” on page 892

December 1996 WAL for Windows Programmer’s Reference Manual 895


7 WAL Function Reference
FORM_load_object()

FORM_load_object()
FORM_load_object() loads an object defined in a file and returns a handle for
the object. The object is identified by its name (object_name), the file in which
it resides (file_name), and its type. The object handle returned is required by
other FORMLIB functions. If the object is already present in the session, a
handle for it is returned without the file being read. To create new objects, use
FORM_create_object().

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_load_object(session_h, type, file_name,


object_name, object_h, err_count_p, err_text_p);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

type FORM_ObjectType_typ input. Object type. Can be one of the


following:
FORM_OT_ALL
FORM_OT_FORM
FORM_OT_MENU
FORM_OT_MENUBAR
FORM_OT_VALTABLE
FORM_OT_REPORT
FORM_OT_PAMPHLET

If type is FORM_OT_ALL, the first object found in file_name


named object_name is loaded.

file_name PSTR input. Name of the file that contains the object.

object_name PSTR input. Object name.

object_h PHANDLE output. Object handle.

err_count_p PINT output. Number of errors encountered. (Warning


messages are not included.)

err_text_p PHANDLE output. Handle for a NULL terminated string of


error and warning messages. Each message is separated by
a newline ‘\n’ character. If NULL, no handle is returned.

896 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_load_object()

See Also
“FORM_create_object()” on page 853

“FORM_init()” on page 892

“FORM_ObjectType_typ” on page 319

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 897


7 WAL Function Reference
FORM_make_groups_contiguous()

FORM_make_groups_contiguous()
FORM_make_groups_contiguous() reorders the fields such that all radio
buttons within a group are contiguous.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_make_groups_contiguous(form_h);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

898 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_paint_in_DC()

FORM_paint_in_DC()
FORM_paint_in_DC() paints a form in the display context. It uses text metrics
from the current font. Scroll coordinates are in whole characters of the
character map.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_paint_in_DC(form_h, dc_h, scroll_x, scroll_y);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

dc_h HDC input. Handle for display context. Can be obtained from
GetDC (Windows SDK function).

scroll_x int input. Number of columns to go right.

scroll_ y int input. Number of rows to go down.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

December 1996 WAL for Windows Programmer’s Reference Manual 899


7 WAL Function Reference
FORM_server_copy_file()

FORM_server_copy_file()
FORM_server_copy_file() copies the specified file on centralized storage. If
file_service_p is NULL, the default file service for the current domain is used.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_server_copy_file(file_service_p, old_file_name,


old_version_p, new_file_name, new_version_p, overwrite);

Parameters
file_service_p ASE_service_name_typ * input. Can be NULL for default File
Service.

old_file_name PSTR input. Name of the source file.

old_version_p DWORD *. Not used.

new_file_name
PSTR input. Name of the destination file.

new_version_p
DWORD *. Not used.

overwrite BOOL input. If TRUE, it overwrites the existing new_file_


name.

See Also
“ASE_service_name_typ” on page 178

900 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_server_delete_file()

FORM_server_delete_file()
FORM_server_delete_file() deletes the specified file from the centralized
storage where it resides. If file_service_p is NULL, the default file service for
the current domain is used.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_server_delete_file (file_service_p, name,


version_p);

Parameters
file_service_p ASE_service_name_typ * input. Can be NULL for default.

name PSTR input. Name of the file.

version_p DWORD *. Not used.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 901


7 WAL Function Reference
FORM_server_rename_file()

FORM_server_rename_file()
FORM_server_rename_file() renames the file on centralized storage. If file_
service_p is NULL, the default file service for the current domain is used.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_server_rename_file(file_service_p,


old_file_name, old_version_p, new_file_name, new_version_p, overwrite);

Parameters
file_service_p ASE_service_name_typ * input. Can be NULL for default.

old_file_name PSTR input. Name of the source file.

old_version_p DWORD *. Not used.

new_file_name
PSTR input. Name of the destination file.

new_version_p
DWORD *. Not used.

overwrite BOOL input. If TRUE, it overwrites the existing new_file_


name.

See Also
“ASE_service_name_typ” on page 178

902 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_server_retrieve_file()

FORM_server_retrieve_file()
FORM_server_retrieve_file() retrieves the file from centralized storage into a
file named by local_file. If the local file exists and overwrite is TRUE; the local
file is overwritten, otherwise an error is returned. If file_service_p is NULL, the
default file service for the current domain is used.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_server_retrieve_file(file_service_p, server_file,


version_p, local_file, overwrite);

Parameters
file_service_p ASE_service_name_typ * input. Can be NULL for default.

server_file PSTR input. Name of the source file from server.

version_p DWORD *. Not used.

local_file PSTR input. Name of the destination file on PC.

overwrite BOOL input. If TRUE, it overwrites the existing file with name
specified by local_file.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 903


7 WAL Function Reference
FORM_server_save_file()

FORM_server_save_file()
FORM_server_save_file() saves the file on centralized storage. If the file
already exists and overwrite is TRUE, the file is overwritten. Otherwise, an
error is returned. If file_service_p is NULL, the default file service for the
current domain is used.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_server_save_file(file_service_p, local_name,


server_name, version_p, overwrite);

Parameters
file_service_p ASE_service_name_typ * input. Pointer to the name of the
File Service. If NULL, the default service is used.

local_name PSTR input. Name of the source file on PC.

server_name PSTR input. Name of the destination file on server.

version_p DWORD *. Not used.

overwrite BOOL input. If TRUE, it overwrites the existing server_name


file.

See Also
“ASE_service_name_typ” on page 178

904 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_set_field_attr()

FORM_set_field_attr()
FORM_set_field_attr() sets the field attribute specified by index for the field
named field_name. See “FORM_get_field_attr()” on page 875 for the possible
values of index and the data structures to which attr_p points for each one.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_field_attr(form_h, field_name, index,


attr_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

index FORM_FieldAttr_typ input. Field attribute type (FORM_FA_


VALUE, etc.).

attr_p void * input. Attributes of type specified by index.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_FieldAttr_typ” on page 289

December 1996 WAL for Windows Programmer’s Reference Manual 905


7 WAL Function Reference
FORM_set_field_attr_using_ord()

FORM_set_field_attr_using_ord()
FORM_set_field_attr_using_ord() sets the field attribute specified by index for
the field whose ordinal value is ordinal. Use this function with caution because
ordinal values change when fields are deleted and re-ordered. In addition,
when a form is executed, radio button ordinal values are made contiguous for
radio buttons that belong to the same group. Use FORM_set_field_attr() if in
doubt about the ordinal value of a field.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_field_attr_using_ord(form_h, ordinal, index,


attr_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

ordinal WORD input. The ordinal number of the field.

index FORM_FieldAttr_typ input. Field attribute type. Can be one of


the following:
FORM_FA_ALL
FORM_FA_ACTUALSIZE
FORM_FA_BACKCOLOR
FORM_FA_BRUSH
FORM_FA_CHARLIST
FORM_FA_DEFAULT
FORM_FA_DESCRIPTION
FORM_FA_DISPLAYAREA
FORM_FA_FIELDPROC
FORM_FA_FILENAME
FORM_FA_FONT
FORM_FA_FORECOLOR
FORM_FA_GROUP
FORM_FA_HELP
FORM_FA_MAPMODE
FORM_FA_MASK
FORM_FA_OBJNAME
FORM_FA_ORDINAL
FORM_FA_PEN
FORM_FA_PROMPT
FORM_FA_RANGE

906 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_set_field_attr_using_ord()

FORM_FA_RASTEROP
FORM_FA_RESOURCE
FORM_FA_ROUNDNESS
FORM_FA_RULELIST
FORM_FA_SECURITY
FORM_FA_SIZE
FORM_FA_STRETCHMODE
FORM_FA_STYLE
FORM_FA_TABLE
FORM_FA_TERMCODE
FORM_FA_TEXT
FORM_FA_TEXTFORMAT
FORM_FA_TYPE
FORM_FA_USER
FORM_FA_VALFUNC
FORM_FA_VALUE

attr_p void * input. Field attribute specified by index.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_set_field_attr()” on page 905

“FORM_FieldAttr_typ” on page 289

December 1996 WAL for Windows Programmer’s Reference Manual 907


7 WAL Function Reference
FORM_set_field_focus()

FORM_set_field_focus()
FORM_set_field_focus() sets the focus to the field specified by field_name. If
you already had focused fields, they retain valid instance handles, although
not exceeding the number of open instances that can be set.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_field_focus(form_h, field_name),

Parameters
form_h HANDLE input. Form handle obtained from FORM_create_
object() or FORM_load_form_from_page().

field_name PSTR input. Name of the field.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

908 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_set_file_service()

FORM_set_file_service()
FORM_set_file_service() sets the current file service name. FORMLIB uses
the File Service specified by file_service_p to locate form files.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_file_service(session_h, file_service_p);

Parameters
session_h HANDLE input. The FORMLIB session handle obtained from
FORM_init().

file_service_p ASE_service_name_typ * input. Name of the File Service.

See Also
“FORM_init()” on page 892

“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 909


7 WAL Function Reference
FORM_set_menu_items()

FORM_set_menu_items()
FORM_set_menu_items() replaces the contents of the specified menu. The
menu items specified by items_p replace any prior contents of the menu
referenced by menu_h.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_menu_items(menu_h, count, items_p);

Parameters
menu_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

count WORD input. Number of menu items.

items_p FORM_MenuItem_typ * input. Pointer to an array of menu


items of type FORM_MenuItem_typ.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_MenuItem_typ” on page 315

910 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_set_menubar_items()

FORM_set_menubar_items()
FORM_set_menubar_items() replaces the contents of the specified menubar.
The menubar items specified by items_p replace any prior contents of the
menubar referenced by menubar_h.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_menubar_items(menubar_h, count,


items_p);

Parameters
menubar_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

count WORD input. Number of menubar items.

items_p FORM_Softkey_typ * input. Pointer to an array of menubar


items of type FORM_Softkey_typ.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_Softkey_typ” on page 337

December 1996 WAL for Windows Programmer’s Reference Manual 911


7 WAL Function Reference
FORM_set_object_attr()

FORM_set_object_attr()
FORM_set_object_attr() sets the form attribute specified by index. See
FORM_get_object_attr() for the possible values of index and the data
structures to which attr_p points for each.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_object_attr(object_h, index, attr_p);

Parameters
object_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

index FORM_FormAttr_typ input. Form attribute type. Can be one


of the following:
FORM_FA_ALL
FORM_FA_ACTUALSIZE
FORM_FA_BACKCOLOR
FORM_FA_BRUSH
FORM_FA_CHARLIST
FORM_FA_DEFAULT
FORM_FA_DESCRIPTION
FORM_FA_DISPLAYAREA
FORM_FA_FIELDPROC
FORM_FA_FILENAME
FORM_FA_FONT
FORM_FA_FORECOLOR
FORM_FA_GROUP
FORM_FA_HELP
FORM_FA_MAPMODE
FORM_FA_MASK
FORM_FA_OBJNAME
FORM_FA_ORDINAL
FORM_FA_PEN
FORM_FA_PROMPT
FORM_FA_RANGE
FORM_FA_RASTEROP
FORM_FA_RESOURCE
FORM_FA_ROUNDNESS
FORM_FA_RULELIST
FORM_FA_SECURITY
FORM_FA_SIZE
FORM_FA_STRETCHMODE

912 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_set_object_attr()

FORM_FA_STYLE
FORM_FA_TABLE
FORM_FA_TERMCODE
FORM_FA_TEXT
FORM_FA_TEXTFORMAT
FORM_FA_TYPE
FORM_FA_USER
FORM_FA_VALFUNC
FORM_FA_VALUE

attr_p void * input. Attribute of type specified by index. (e.g., FORM_


HelpAttr_typ, etc.)

See Also
“FORM_create_object()” on page 853

“FORM_get_object_attr()” on page 886

“FORM_load_form_from_page()” on page 895

“FORM_FormAttr_typ” on page 300

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 913


7 WAL Function Reference
FORM_set_one_valtable_item()

FORM_set_one_valtable_item()
FORM_set_one_valtable_item() sets a single item in the validation table. Use
this entry point to set items in tables with more than 404 items, that is, if count
is greater than 404. If the number of table items exceeds 404, the table size
exceeds 65536L, the Intel 64KB segment boundary.

If you want more than a single item, iterate this procedure. Index should be
greater than or equal to zero and less than the number of items in the
validation table. If count is less than or equal to 404, FORM_set_valtable_
items() might be more convenient, because it uses a pointer to the whole table
and needs no iteration.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_one_valtable_item(valtable_p, item_p,


index, count);

Parameters
valtable_p FORM_ValItem_typ * input. Pointer to validation table.

item_p FORM_ValItem_typ * input. Pointer to item crossing or


beyond segment boundary.

index WORD input. The items’ unique index. Should be greater


than or equal to zero and less than the number of items in the
validation table.

count WORD input. Number of table items in the validation table


from FORM_get_valtable_items().

See Also
“FORM_get_valtable_items()” on page 891

“FORM_set_valtable_items()” on page 915

“FORM_ValItem_typ” on page 348

914 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_set_valtable_items()

FORM_set_valtable_items()
FORM_set_valtable_items() replaces the contents of a validation table. The
validation table items specified by items_p replace any prior contents of the
table referenced by table_h.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_set_valtable_items(table_h, count, items_p);

Parameters
table_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

count WORD input. Number of validation table items.

items_p FORM_ValItem_typ * input. Pointer to an array of validation


table items of type FORM_ValItem_typ.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_ValItem_typ” on page 348

December 1996 WAL for Windows Programmer’s Reference Manual 915


7 WAL Function Reference
FORM_show_form()

FORM_show_form()
FORM_show_form() displays or updates a form without executing it. FORM_
execute_form() does this implicitly.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_show_form(form_h, show_style);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

show_style int input. Window show style. Can be one of the following:
SW_HIDE
SW_MINIMIZE
SW_RESTORE
SW_SHOW
SW_SHOWMAXIMIZED
SW_SHOWMINIMIZED
SW_SHOWMINNOACTIVATE
SW_SHOWNA
SW_SHOWNOACTIVATE
SW_SHOWNORMAL

See ShowWindow in the Windows SDK Programmers


Reference for more information.

See Also
“FORM_create_object()” on page 853

“FORM_execute_form()” on page 863

“FORM_load_form_from_page()” on page 895

The sample application in the directory C:\FILENET\SAMPLE\FORM

916 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_step_form()

FORM_step_form()
FORM_step_form() executes the form associated with form_h, displays all the
visible features in a window, accepts user input in the input field specified by
next_field, and calls any validation functions, as appropriate. If the form is
hidden, it is made visible before execution.

next_field specifies the name of the field in which to allow input. If next_field is
empty, the first input field is used, according to the internal ordering of the
fields (see “FORM_FA_ORDINAL” on page 292). next_field must point to a
buffer at least FORM_LEN_FIELD_NAME + 1 bytes in size.

If any user action changes the current field (e.g., hitting the TAB key), the
execution ends successfully, next_field names the field that would become the
current field in a normal execution, and terminator_p is undefined.

If a terminator key is pressed, next_field returns an empty string and


terminator_p contains the terminator that ended the execution. The error code
returned contains the termination reason if execution ended for a reason other
than a terminator key being pressed.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_step_form(form_h, wait, next_field,


terminator_p);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

wait WORD input. Number of seconds before continue.

next_field PSTR input. Name of the next field that would become the
current field.

terminator_p FORM_Terminator_typ * output. Pointer to most recent


terminator that ended execution of the form.

December 1996 WAL for Windows Programmer’s Reference Manual 917


7 WAL Function Reference
FORM_step_form()

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

“FORM_Terminator_typ” on page 343

918 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FORM_text_out()

FORM_text_out()
FORM_text_out() displays the data in text on the character map at (x div 100,
y div 100). Characters that would go off the character map are clipped and
lost.

If count is zero, text must point to a NULL-terminated string of characters.


Otherwise, count is the maximum number of characters to display from text.
Display is terminated when count characters have been processed or when a
NULL character is encountered.

Tabs are expanded, with tabstops at every 8 character positions. Newline


characters move the output to the next line. There is no autowrap or
autoscroll.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_text_out(form_h, x, y, text, count);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

x WORD input. Number of (x/100) rows from the top.

y WORD input. Number of (y/100) columns from the left.

text PSTR input. String of characters to be displayed.

count WORD input. Maximum number of characters to display.

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

The sample application in the directory C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 919


7 WAL Function Reference
FORM_validate_form()

FORM_validate_form()
FORM_validate_form() performs field and form validation given the handle for
a form that has values.

Syntax
#include <formlib.i>

error_typ CALLBACK FORM_validate_form(form_h);

Parameters
form_h HANDLE input. Handle obtained from FORM_create_object()
or FORM_load_form_from_page().

See Also
“FORM_create_object()” on page 853

“FORM_load_form_from_page()” on page 895

920 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_abs()

FP_abs()
FP_abs() returns the absolute value of y in x.

Syntax
#include <FP.i>

error_typ CALLBACK FP_abs(x, y);

Parameters
x FP_number output. The absolute value of y.

y FP_number input. The number whose absolute value is


returned.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

December 1996 WAL for Windows Programmer’s Reference Manual 921


7 WAL Function Reference
FP_add()

FP_add()
FP_add() returns the sum of a and b in c.

Syntax
#include <FP.i>

error_typ CALLBACK FP_add(c, a, b);

Parameters
c FP_number output. The sum of a and b.

a FP_number input. One of the addends.

b FP_number input. One of the addends.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

922 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_assign()

FP_assign()
FP_assign() assigns the value of y to x (x := y).

Syntax
#include <FP.i>

void CALLBACK FP_assign(x, y);

Parameters
x FP_number output. The variable receiving the value of y.

y FP_number input. The number to be assigned to x.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

December 1996 WAL for Windows Programmer’s Reference Manual 923


7 WAL Function Reference
FP_dbl2num()

FP_dbl2num()
FP_dbl2num() converts a double precision number to which dblnum_p points
to a single precision (floating point) number.

Syntax
#include <FP.i>

error_typ CALLBACK FP_dbl2num(num, dblnum_p);

Parameters
num FP_number output. The single precision number created
from the number pointed to by dblnum_p.

dblnum_p double * input. Pointer to a double precision number to be


converted to single precision.

See Also
“FP_number” on page 349

924 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_divide()

FP_divide()
FP_divide() divides a by b and returns the result in c.

Syntax
#include <FP.i>

error_typ CALLBACK FP_divide(c, a, b);

Parameters
c FP_number output. The quotient.

a FP_number input. The dividend.

b FP_number input. The divisor.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

December 1996 WAL for Windows Programmer’s Reference Manual 925


7 WAL Function Reference
FP_eql()

FP_eql()
FP_eql() returns TRUE if x is equal to y, FALSE otherwise.

Syntax
#include <FP.i>

BOOL CALLBACK FP_eql(x, y);

Parameters
x FP_number input. The first operand.

y FP_number input. The second operand.

See Also
“FP_number” on page 349

926 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_geq()

FP_geq()
FP_geq() returns TRUE if x is greater than or equal to y, FALSE otherwise.

Syntax
#include <FP.i>

BOOL CALLBACK FP_geq(x, y);

Parameters
x FP_number input. The first operand.

y FP_number input. The second operand.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 927


7 WAL Function Reference
FP_getmode()

FP_getmode()
FP_getmode() returns the value of the European mode flag. Returns TRUE if
European mode is turned on (with comma separating whole number and
fraction). Returns FALSE if a decimal point (period) is the separator.

Syntax
#include <FP.i>

BOOL CALLBACK FP_getmode(void);

928 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_gtr()

FP_gtr()
FP_gtr() returns TRUE if x is greater than y, FALSE otherwise.

Syntax
#include <FP.i>

BOOL CALLBACK FP_gtr(x, y);

Parameters
x FP_number input. The first operand.

y FP_number input. The second operand.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 929


7 WAL Function Reference
FP_isundef()

FP_isundef()
FP_isundef() returns TRUE if x is undefined.

Syntax
#include <FP.i>

BOOL CALLBACK FP_isundef(x);

Parameters
x FP_number input. The variable to check.

See Also
“FP_number” on page 349

930 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_leq()

FP_leq()
FP_leq() returns TRUE if x is less than or equal to y, FALSE otherwise.

Syntax
#include <FP.i>

BOOL CALLBACK FP_leq(x, y);

Parameters
x FP_number input. The first operand.

y FP_number input. The second operand.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 931


7 WAL Function Reference
FP_long2num()

FP_long2num()
FP_long2num() converts an unsigned long (y) to a single precision (floating
point) number (x).

Syntax
#include <FP.i>

void CALLBACK FP_long2num(x, y);

Parameters
x FP_number output. The variable assigned the value of y.

y long input. Value to be converted to single precision and


assigned to x.

See Also
“FP_number” on page 349

932 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_lss()

FP_lss()
FP_lss() returns TRUE if x is less than y, FALSE otherwise.

Syntax
#include <FP.i>

BOOL CALLBACK FP_lss(x, y);

Parameters
x FP_number input. The first operand.

y FP_number input. The second operand.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 933


7 WAL Function Reference
FP_multiply()

FP_multiply()
FP_multiply() multiplies a by b and returns the result in c.

Syntax
#include <FP.i>

error_typ CALLBACK FP_multiply(c, a, b);

Parameters
c FP_number output. The product.

a FP_number input. The multiplicand.

b FP_number input. The multiplier.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

934 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_neg()

FP_neg()
FP_neg() sets x to the additive inverse of y.

Syntax
#include <FP.i>

error_typ CALLBACK FP_neg(x, y);

Parameters
x FP_number output. The variable assigned -y.

y FP_number input. The value whose additive inverse is


assigned to x.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

December 1996 WAL for Windows Programmer’s Reference Manual 935


7 WAL Function Reference
FP_neq()

FP_neq()
FP_neq() returns TRUE if x is not equal to y, FALSE otherwise.

Syntax
#include <FP.i>

BOOL CALLBACK FP_neq(x, y);

Parameters
x FP_number input. The first operand.

y FP_number input. The second operand.

See Also
“FP_number” on page 349

936 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_num2dbl()

FP_num2dbl()
FP_num2dbl() converts the single precision number num to a double
precision number to which dblnum_p points.

Syntax
#include <FP.i>

error_typ CALLBACK FP_num2dbl(dblnum_p, num);

Parameters
dblnum_p double * output. Pointer to the converted number.

num FP_number input. The number to be converted to double


precision.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 937


7 WAL Function Reference
FP_num2long()

FP_num2long()
FP_num2long() converts a single precision (floating point) number (y) to a
long (x).

Syntax
#include <FP.i>

error_typ CALLBACK FP_num2long(x_p, y);

Parameters
x_p long * output. Pointer to the converted number.

y FP_number input. The number to be converted.

See Also
“FP_number” on page 349

938 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_num2mask()

FP_num2mask()
FP_num2mask() formats the number in num into result using mask.

Syntax
#include <FP.i>

error_typ CALLBACK FP_num2mask(result, num, mask);

Parameters
result PSTR output. The formatted number string. result must be
large enough to hold the output.

num FP_number input. The number to be formatted as result.

mask PSTR input. The numeric mask.

Examples
FP_number ssn_num;

FP_long2num(ssn_num, 123456789);

err = FP_num2mask(result, ssn_num, "000-00-0000");

The result is "123-45-6789".

Numeric Mask
When converting an FP_number type number to a string, format the number
by calling the function FP_num2mask() using numeric masking.

The following table shows all the components of a numeric mask.

Component Meaning
+ (plus) When the first or last character in the mask, displays the
sign of the number. NOTE: + can also be used as a
separator between other mask characters.
– (minus) When the first or last character in the mask, displays a
negative sign if the number is negative or displays a
space if the number is positive. NOTE: – can also be
used as a separator.

December 1996 WAL for Windows Programmer’s Reference Manual 939


7 WAL Function Reference
FP_num2mask()

Component Meaning
# (number sign) Displays a digit if it is significant; when you use more #s
than there are significant digits, the right-most #s receive
digits first. Excess #s are filled with blanks.
0 (zero) Displays a digit whether it is significant or not. This can
result in leading and trailing zeros.
. (decimal) Determines where the decimal point goes. If not used,
the decimal point is assumed to be at the right end of the
mask. The number is rounded off to fit into the mask. Only
one decimal point is allowed in a mask.

Note If the mask is too small for the number, an error occurs. The mask is too small
if there are too few #s or 0s to the left of the decimal point. For example, 300
cannot fit into ##.

The following table shows the resulting output string when FP_num2mask()
converts the following numbers: 0, +29, –3344, and 77.88369. (This assumes
that the current cursor starts at the left side of each table entry.)

Mask Numeric String Displayed


0000 0000 0029 3344 0078
#### 29 3344 78
$#,### $ $29 $3,344 $78
+#### + +29 +3344 +78
-#### 29 3344 78
####+ + 29+ 3344+ 78+
####- 29 3344 78
##.## . 29. Runtime 77.88
error

Note result must be large enough to hold the output.

See Also
“FP_num2mask()” on page 939

“FP_number” on page 349

940 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_num2ora()

FP_num2ora()
FP_num2ora() formats the number in num in Oracle format.

Syntax
#include <FP.i>

error_typ CALLBACK FP_num2ora(ora, num);

Parameters
ora FP_number output. The Oracle-formatted number.

num FP_number input. The number to be formatted.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 941


7 WAL Function Reference
FP_num2sci()

FP_num2sci()
FP_num2sci() formats the number in num into scientific notation.

Syntax
#include <FP.i>

error_typ CALLBACK FP_num2sci(sci, num);

Parameters
sci PSTR output. Scientific notation of the number.

num FP_number input. The number to be formatted.

See Also
“FP_number” on page 349

942 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_num2str()

FP_num2str()
FP_num2str() formats the number in num into an ASCII string returned in
result.

Syntax
#include <FP.i>

error_typ CALLBACK FP_num2str(result, num);

Parameters
result PSTR output. ASCII string containing num. result must be
large enough to hold the output.

num FP_number input. The number to be converted.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

December 1996 WAL for Windows Programmer’s Reference Manual 943


7 WAL Function Reference
FP_num2unslong()

FP_num2unslong()
FP_num2unslong() converts a single precision (floating point) number (y) to
an unsigned long (x).

Syntax
#include <FP.i>

error_typ CALLBACK FP_num2unslong(x_p, y);

Parameters
x_p unsigned long * output. Pointer to the variable assigned value
of y.

y FP_number input. The value to be assigned to x.

See Also
“FP_number” on page 349

944 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_ora2num()

FP_ora2num()
FP_ora2num() converts the number (in Oracle format) specified by ora into a
number.

Syntax
#include <FP.i>

error_typ CALLBACK FP_ora2num(num, ora);

Parameters
num FP_number output. Pointer to the number to be converted.

ora FP_number input. Pointer to the Oracle-formatted number.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 945


7 WAL Function Reference
FP_retsign()

FP_retsign()
FP_retsign() returns 1, 0, or -1, indicating whether x is positive, zero, or
negative, respectively.

Syntax
#include <FP.i>

short CALLBACK FP_retsign(x);

Parameters
x FP_number input. The variable whose sign is returned.

See Also
“FP_number” on page 349

946 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_round()

FP_round()
FP_round() sets x to the rounded value of y. N is the power of ten to which y is
to be rounded.

Syntax
#include <FP.i>

error_typ CALLBACK FP_round(x, y, n);

Parameters
x FP_number output. The rounded number.

y FP_number input. The number to be rounded.

n short input. The power of ten to which y is to be rounded.

Example
If y == 12,345,678.8765:

n == -2 gives x = 12,345,678.88
n == -1 gives x = 12,345,678.9
n == 0 gives x = 12,345,679
n == 1 gives x = 12,345,680
n == 2 gives x = 12,345,700
n == 3 gives x = 12,346,000
n == 4 gives x = 12,350,000

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

December 1996 WAL for Windows Programmer’s Reference Manual 947


7 WAL Function Reference
FP_rounddisp()

FP_rounddisp()
FP_rounddisp() rounds an internal number to coincide with its displayable
representation. It is primarily used with scientific notation. Because floating
point numbers are stored in base 10,000 instead of base 10, the number as
displayed by FP_num2sci() might differ slightly from its internal
representation. (It might vary by 0 to 3 of the least significant digits in the
mantissa. If it is important to your calculations that the displayed number and
the internal number be identical, use FP_rounddisp() to round the internal
number to coincide with its displayable representation.

Syntax
#include <FP.i>

error_typ CALLBACK FP_rounddisp(x, y);

Parameters
x FP_number output. The rounded number.

y FP_number input. The number to be rounded.

See Also
“FP_number” on page 349

948 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_setmode()

FP_setmode()
FP_setmode() sets or clears European mode, according to the value of m.
When set, commas in masks separate the whole part of a number from the
fractional part. When clear, a period is the decimal point.

Syntax
#include <FP.i>

error_typ CALLBACK FP_setmode(m);

Parameters
m BOOL input. When TRUE, comma separates whole number
and fraction. When FALSE, decimal point separates whole
number and fraction.

December 1996 WAL for Windows Programmer’s Reference Manual 949


7 WAL Function Reference
FP_setundef()

FP_setundef()
FP_setundef() sets x to the undefined value.

Syntax
#include <FP.i>

void CALLBACK FP_setundef(x);

Parameters
x FP_number input. The variable to receive undefined value.

See Also
“FP_number” on page 349

950 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_str2num()

FP_str2num()
FP_str2num() converts a string to a number.

Syntax
#include <FP.i>

error_typ CALLBACK FP_str2num(num, string);

Parameters
num FP_number output. The number converted from the string.

string PSTR input. String to be converted.

See Also
The sample application in the directory C:\FILENET\SAMPLE\FP\.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 951


7 WAL Function Reference
FP_subtract()

FP_subtract()
FP_subtract() subtracts b from a and returns the result in c.

Syntax
#include <FP.i>

error_typ CALLBACK FP_subtract(c, a, b);

Parameters
c FP_number output. The difference.

a FP_number input. The subtrahend.

b FP_number input. The minuend.

See Also
“FP_number” on page 349

The sample application in the directory C:\FILENET\SAMPLE\FP\

952 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
FP_trunc()

FP_trunc()
FP_trunc() sets x to the whole part of y.

Syntax
#include <FP.i>

error_typ CALLBACK FP_trunc(x, y);

Parameters
x FP_number output. The truncated number.

y FP_number input. The number to be truncated.

Examples
For y == 12,345,678.9012, x is 12,345,678.

For y == -12,345,678.9012, x is -12,345,678.

See Also
“FP_number” on page 349

December 1996 WAL for Windows Programmer’s Reference Manual 953


7 WAL Function Reference
FP_unslong2num()

FP_unslong2num()
FP_unslong2num() converts an unsigned long (y) to an FP_number (x). The
function returns VOID, rather than error_typ.

Syntax
#include <FP.i>

VOID CALLBACK FP_unslong2num(x, y);

Parameters
x FP_number output. The variable receiving value of y.

y unsigned long input. Value to be assigned to x.

See Also
“FP_number” on page 349

954 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_add_notation()

IAFLIB_add_notation()
IAFLIB_add_notation() adds a notation to a document list that is to be printed.
The notation is created as another document and added to the print cache. It
is printed as an overlay on the existing document(s). When the function
returns, it increments the number of short print options and the number of
documents by 1.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_add_notation(client_h, print_service_p,


print_options_p, num_docs_p, doclist_h_p, notation, x, y, units, style);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name
structure for the desired Print Service. If NULL, the default
Print Service specified in IAFLIB_logon_user() is used.

print_options_p
void * input/output. Pointer to an array of PS_options_rec_
type print options. When the function returns success, the
number of short options is increased by 1.

num_docs_p WORD * input/output. Pointer to the number of documents in


the document list. If the notation is added to the print service
successfully, the number of documents is increased by 1.

doclist_h_p HANDLE * input/output. Pointer to the handle of the


document list of type PRI_doc_specifier_typ. If the notation is
added to the print service successfully, the number of
documents is increased by 1.

notation PSTR input. Pointer to a null-terminated string containing the


notation. It has a maximum length of 1000 characters.

x double input. Specifies the x-coordinate for the beginning of


the notation.

December 1996 WAL for Windows Programmer’s Reference Manual 955


7 WAL Function Reference
IAFLIB_add_notation()

y double input. Specifies the y-coordinate for the beginning of


the notation.

units unsigned short input. Specifies the unit of measure for the x
and y coordinates. Valid values are INCH and
CENTIMENTER. The default is INCH.

style unsigned short input. Specifies how the notation will be


printed. Valid inputs are:
PRI_ONE_OVERLAY prints the notation on the first page.
PRI_MULTI_OVERLAY prints the notation on all pages.

See Also
“IAFLIB_add_notation1()” on page 957

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PRI_doc_specifier_typ” on page 404

“PS_options_rec_type” on page 462

956 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_add_notation1()

IAFLIB_add_notation1()
IAFLIB_add_notation1() adds a notation to a document list that is to be
printed. The notation is created as another document and added to the print
cache. It is printed as an overlay on the existing document(s). When the
function returns, it increments the number of short print options and the
number of documents by 1.

IAFLIB_add_notation1() provides similar functionality to IAFLIB_add_


notation(), but uses the PRI_print_option_typ2 structure instead of PS_
options_rec_type.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_add_notation1(client_h, print_service_p,


num_options, print_options_p, num_docs_p, doclist_h_p, notation, x, y, units,
style);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name
structure for the desired Print Service. If NULL, the default
Print Service specified in IAFLIB_logon_user() is used.

num_options WORD * input. Number of print options in print_options_p.

print_options_p
PRI_print_option_typ2 * input/output. Pointer to an array of
print options. When the function returns success, the number
of short options is increased by 1.

num_docs_p WORD * input/output. Pointer to the number of documents in


the document list. If the notation is added to the print service
successfully, the number of documents is increased by 1.

doclist_h_p HANDLE * input/output. Pointer to the handle of the


document list of type PRI_doc_specifier_typ. If the notation is
added to the print service successfully, the number of
documents is increased by 1.

December 1996 WAL for Windows Programmer’s Reference Manual 957


7 WAL Function Reference
IAFLIB_add_notation1()

notation PSTR input. Pointer to a null-terminated string containing the


notation. It has a maximum length of 1000 characters.

x double input. Specifies the x-coordinate for the beginning of


the notation.

y double input. Specifies the y-coordinate for the beginning of


the notation.

units unsigned short input. Specifies the unit of measure for the x
and y coordinates. Valid values are INCH and
CENTIMENTER. The default is INCH.

style unsigned short input. Specifies how the notation will be


printed. Valid inputs are:
PRI_ONE_OVERLAY prints the notation on the first page.
This is the default.

PRI_MULTI_OVERLAY prints the notation on all pages.

See Also
“IAFLIB_add_notation()” on page 955

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PRI_doc_specifier_typ” on page 404

“PRI_print_option_typ2” on page 423

958 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_cancel_print()

IAFLIB_cancel_print()
IAFLIB_cancel_print() cancels print requests. It checks the security of the
print request (specified at the time the request was initiated) against the
credentials of the user requesting the cancellation. (All users can cancel their
own print requests, but cannot cancel another user’s print request without
SysAdmin privileges.) Print requests with any status other than unknown,
cancelled, or complete are cancelled.

Syntax
#include <pri.def>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_cancel_print(client_h, print_service_p, job_id,


status_p);

Parameters
client_h HANDLE input. Obtained from IAFLIB_get_client_handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name
structure for desired Print Service. If NULL, the default Print
Service specified in IAFLIB_logon_user() is used.

job_id DWORD input. Print job to cancel. Obtained from IAFLIB_


print_docs() or IAFLIB_print_files() (request_id parameter).

status_p PRI_request_status_typ * output. Pointer to the status of the


request at the time of the cancellation request. Can be one of
the following:
PRI_RS_UNKNOWN
PRI_RS_QUEUED
PRI_RS_PRINTING
PRI_RS_COMPLETE
PRI_RS_FAILED
PRI_RS_CANCELLED
PRI_RS_WAITING
PRI_RS_FETCHING
PRI_RS_SUSPENDED

December 1996 WAL for Windows Programmer’s Reference Manual 959


7 WAL Function Reference
IAFLIB_cancel_print()

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

PRI_err_no_permission
The client does not have valid access for the document or request.

PRI_err_no_such_request
The specified request ID could not be found.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_print_docs()” on page 1051

“IAFLIB_print_docs1()” on page 1053

“IAFLIB_print_files()” on page 1055

“IAFLIB_print_files1()” on page 1057

“ASE_service_name_typ” on page 178

“PRI_request_status_typ” on page 452

960 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_check_membership()

IAFLIB_check_membership()
IAFLIB_check_membership() returns a boolean that indicates whether the
current user is a member of the specified group. It returns TRUE if the user is
a member and FALSE otherwise.

Syntax
#include <iaflib.i>

bool CALLBACK IAFLIB_check_membership(group_p);

Parameters
group_p ASE_service_name_typ * input. Pointer to the NCH name
structure for the group.

See Also
“ASE_service_name_typ” on page 178

December 1996 WAL for Windows Programmer’s Reference Manual 961


7 WAL Function Reference
IAFLIB_check_password()

IAFLIB_check_password()
IAFLIB_check_password() indicates whether the password is correct. It
returns TRUE if the password is correct and FALSE otherwise.

Syntax
#include <iaflib.i>

FN_BOOL CALLBACK IAFLIB_check_password(passwd);

Parameters
passwd PSTR input. NULL terminated string containing the
password.

962 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_continue_query()

IAFLIB_continue_query()
IAFLIB_continue_query() continues a query started with IAFLIB_query_db()
and gets more matches.

If IAFLIB_query_db() or IAFLIB_continue_query() does not complete the


query (the more_p parameter returns TRUE), call IAFLIB_terminate_query()
to terminate the connection and free the resources.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_continue_query(client_h, max_matches,


more_p, num_matches_p, dir_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

max_matches WORD input. Maximum number of matches to return.

more_p FN_BOOL * output. Pointer to a boolean value that is TRUE


when there are more database entries to search and FALSE
if there are no more entries.

num_matches_p
WORD * output. Pointer to the number of matches being
returned in dir_h_p.

dir_h_p HANDLE * output. Pointer to a handle for an array of INX_


query_match_typ structures.

Error Returned
INX_err_no_query
The INX connection was terminated before it is done.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_query_db()” on page 1066

December 1996 WAL for Windows Programmer’s Reference Manual 963


7 WAL Function Reference
IAFLIB_continue_query()

“IAFLIB_terminate_query()” on page 1076

“INX_query_match_typ” on page 374

The sample application in the directory C:\FILENET\SAMPLE\GEN\

964 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_create_cache_object()

IAFLIB_create_cache_object()
IAFLIB_create_cache_object() creates a cache object with the specified
attributes.

If doc_id is set to ASE_INVALID_DOC_ID, the service generates a temporary


object descriptor for the object, which is returned in object_desc.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_create_cache_object(client_h, doc_id, page,


cache_service_p, object_desc_p, attr_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. The document number.

page ASE_page_number_typ input. Page number in the


document.

cache_service_p
ASE_service_name_typ * (NCH_ObjectName) input. Pointer
to the NCH name structure for the desired Cache Service.

object_desc_p
CSM_object_desc_typ * output. Pointer to a CSM_object_
desc_typ structure, which uniquely identifies an instance of
an object in a cache.

attr_p CSM_object_attr_typ * input. Pointer to a CSM_object_attr_


typ structure, which describes the client-accessible attributes
of an object.

The client must supply the max_length, security, duration,


and client_attr fields. Cache Service automatically sets the
following object attributes: cur_length to zero, created to the
current time, and last_read to FN_UNDEF_TIME.

December 1996 WAL for Windows Programmer’s Reference Manual 965


7 WAL Function Reference
IAFLIB_create_cache_object()

Errors Returned
CSM_invalid_session_handle
CSM was given an invalid session handle; the session probably timed
out.

CSM_already_exists
An attempt was made to create a CSM object that already exists. This
error is returned if the object already exists and the cache does not
support reference counts.

CSM_no_resources
CSM_create: Lack of disk or data base space for the desired
operation.

CSM_refcnt_incremented
The reference count was incremented due to an attempt to create a
duplicate. If the cache supports reference counts, the ref count
incremented error is returned, and the object’s reference count is
incremented as a side effect.

CSM_no_ageable_docs
An attempt was made to put an ageable document into a cache, but
this cache is not configured to allow ageable documents.

CSM_other_error
CSM error: Catchall for other errors encountered inside CSM.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“CSM_object_attr_typ” on page 222

“CSM_object_desc_typ” on page 224

“FN_docnum_typ” on page 260

966 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_create_folder()

IAFLIB_create_folder()
IAFLIB_create_folder() creates a new folder.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_create_folder(client_h, ims_p, folder_desc_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name


structure for the IMS storing the folder. If NULL, the default
IMS specified in IAFLIB_logon_user() is used.

folder_desc_p
INX_folder_desc_typ * input. Pointer to a linked list of type
INX_folder_desc_typ, which describes the folder to be
created.

The client fills in the following fields: name, archive_date


(depending on retention fields), delete_date (depending on
retention fields), auto_del_period, security, retent_disp,
retent_base, and retent_offset.

The service fills in the following fields: id and create_date.

This function does not use the following fields: next_p, leaf,
non_leaf, and closed.

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_folder
The specified folder does not exist.

INX_err_no_permission
Permission denied.

December 1996 WAL for Windows Programmer’s Reference Manual 967


7 WAL Function Reference
IAFLIB_create_folder()

INX_err_other
The real error tuple is a parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“INX_folder_desc_typ” on page 367

The sample application in the directory C:\FILENET\SAMPLE\FOLD2\

968 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_delete_annotation()

IAFLIB_delete_annotation()
IAFLIB_delete_annotation() deletes an annotation. The deletion fails if
another client has the annotation locked for update. The client must have both
write and append/execute permission on the document to delete any of its
annotations.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_delete_annotation(client_h, ims_p, doc_id,


page, annot_id);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. The document number from which


you want to delete the annotation.

page ASE_page_number_typ input. The page number within the


document for this annotation.

annot_id DOC_annotation_id_typ input. The annotation ID of the


annotation you want to delete.

Errors Returned
DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_document_not_found
The document was not found by DOC.

DOC_err_annotation_not_found
The annotation was not found by DOC.

December 1996 WAL for Windows Programmer’s Reference Manual 969


7 WAL Function Reference
IAFLIB_delete_annotation()

DOC_err_annotation_busy
The DOC annotation is busy; another client is updating it.

DOC_err_no_permission
No permission to perform the specified DOC function.

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“DOC_annotation_id_typ” on page 234

“FN_docnum_typ” on page 260

970 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_delete_cache_object()

IAFLIB_delete_cache_object()
IAFLIB_delete_cache_object() deletes an object from the cache. The object
must not be opened by any other client. This function requires delete
permission on the cache and write permission on the object.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_delete_cache_object(client_h, doc_id, page,


cache_service_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. The document number.

page ASE_page_number_typ input. The page number within the


document.

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Cache Service.

Errors Returned
CSM_invalid_session_handle
CSM was given an invalid session handle; the session probably timed
out.

CSM_no_such_object
CSM error: The specified object does not exist in the current cache.

CSM_object_busy
CSM error: The operation specified cannot get necessary access.

CSM_no_permission
The client does not have permission for the requested operation.

CSM_other_error
CSM error: Catchall for other errors encountered inside CSM.

December 1996 WAL for Windows Programmer’s Reference Manual 971


7 WAL Function Reference
IAFLIB_delete_cache_object()

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

972 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_delete_docs()

IAFLIB_delete_docs()
IAFLIB_delete_docs() deletes each document in the array to which doc_ids_p
points from both the Index Service database (if it is present there) and the
Document Service database of the logged on IMS. The Index Service is
updated first, so all entries in its database refer to valid entries in the
Document Service database. All annotations for the documents are deleted
as well. The client must have both write and append/execute permission on
the document to delete it.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_delete_docs(client_h, ims_p num_docs,


doc_ids_p, unfile, num_deleted_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the documents. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

num_docs unsigned short input. Count of documents in the list to delete.

doc_ids_p FN_docnum_typ * input. Pointer to an array of document IDs.

unfile FN_BOOL input. Specifies whether or not to delete


documents that are currently filed in folders. If FALSE, an
error is returned if a document is filed; if TRUE, the
documents are unfiled and deleted.

num_deleted_p
WORD * output. Pointer to the count of successful deletions.

December 1996 WAL for Windows Programmer’s Reference Manual 973


7 WAL Function Reference
IAFLIB_delete_docs()

Errors Returned
From Document Service: If the document is not found and there is no
permission error, the error is on at least one document. If any document in the
list cannot be deleted, no documents are deleted.

DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_document_not_found
The document was not found by DOC.

DOC_err_no_permission
No permission to perform the specified DOC function.

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

From Index Service:

INX_err_invalid_handle
Invalid session handle.

INX_err_no_record
The requested record was not found.

INX_err_record_busy
The record was already locked. The record is locked for update by
another client, in which case you cannot delete the index record.

INX_err_doc_is_filed
You cannot delete the document; it is filed in one or more folders. This
error is returned if unfile is FALSE and the document is filed.

INX_err_no_permission
Permission denied.

INX_err_other
The real error tuple is a parameter to this protocol error.

974 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_delete_docs()

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

The sample application in the directory C:\FILENET\SAMPLE\DOCUMENT\

December 1996 WAL for Windows Programmer’s Reference Manual 975


7 WAL Function Reference
IAFLIB_delete_folders()

IAFLIB_delete_folders()
IAFLIB_delete_folders() removes folders from the database.

When specifying folder_spec, use wildcards to specify more than one folder.
For example, suppose you have the following folders:

/acct713
/acct713/charges
/acct713/payments
/acct45
/acct45/charges

With a wildcard in the specification of a folder, any matching folder that


appears to be at the same level is deleted. (Remember these are pseudo-
levels indicated by slashes in the folder name since all folders are really at the
same level.) For example, with folder_spec set to “/acct*”, the function deletes
/acct713 and /acct45 – but not /acct713/charges, /acct713/payments, and
/acct45/charges, which are at a different level.

With folder_spec set to /acct713/*, both /acct713/charges and


/acct713/payments would be deleted.

A slash at the end of folder_spec indicates that all matching folders and their
subtrees are to be deleted. For example, to delete all of the above folders,
use “/acct*/”.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_delete_folders(client_h, ims_p, folder_spec,


unfile_docs);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the folder. If NULL, the default IMS specified
in IAFLIB_logon_user() is used.

folder_spec INX_folder_spec_typ input. Name of the folder to delete. You


can specify multiple folders by using wildcards.

976 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_delete_folders()

unfile_docs FN_BOOL input. Specifies whether documents in a folder (or


any sub-folder) should be unfiled first. If FALSE, returns an
error if the folder contains documents; if TRUE, unfiles the
documents and deletes the folder.

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_folder
The specified folder does not exist.

INX_err_no_permission
Permission denied.

INX_err_other
The real error tuple is a parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“INX_folder_spec_typ” on page 370

The sample application in the directory C:\FILENET\SAMPLE\FOLD2\

December 1996 WAL for Windows Programmer’s Reference Manual 977


7 WAL Function Reference
IAFLIB_file_doc()

IAFLIB_file_doc()
IAFLIB_file_doc() files a document into or unfiles (removes) a document from
a folder, depending on file_flag. If folder_id is zero, folder_name is used. Note
that unfiling a document does not delete the document index record itself; it
only deletes the reference to it in the specified folder.

Use IAFLIB_file_doc_after() to file documents after a specific doc ID.

With FDOS 2.6e or later, we recommend that you use IAFLIB_unfile_docs()


instead of IAFLIB_file_doc() with file_flag set to FALSE.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_file_doc(client_h, ims_p, folder_name,


folder_id, doc_id, file_flag);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS where the document is stored. If NULL, the default
IMS specified in IAFLIB_logon_user() is used.

folder_name PSTR input. Folder name. If folder_id is zero, folder_name is


used.

folder_id FN_folnum_typ input. Folder ID to use or zero. If zero, folder_


name is used.

doc_id FN_docnum_typ input. Document ID of the document to file/


unfile. Only one document can be processed at a time.

file_flag FN_BOOL input. TRUE to file, FALSE to unfile.

Errors Returned
For either filing or unfiling a document:

INX_err_invalid_handle
Invalid session handle.

978 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_file_doc()

INX_err_no_folder
The specified folder does not exist.

INX_err_no_record
The requested record was not found.

INX_err_other
The real error tuple is a parameter to this protocol error.

For filing a document:

INX_err_already_in_folder
The document is already filed in the specified folder.

For unfiling a document:

INX_err_not_in_folder
The document is not filed in the specified folder.

See Also
“IAFLIB_file_doc_after()” on page 980

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_unfile_docs()” on page 1077

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

“FN_folnum_typ” on page 261

The sample application in the directory C:\FILENET\SAMPLE\DOCUMENT\

December 1996 WAL for Windows Programmer’s Reference Manual 979


7 WAL Function Reference
IAFLIB_file_doc_after()

IAFLIB_file_doc_after()
IAFLIB_file_doc_after() files an array of documents into a folder following a
specified document ID. IAFLIB_file_doc_after() enables you to insert the
documents in a folder in a specific order. IAFLIB_file_doc() only allows you to
file documents at the end of the folder.

If you have FileNet system software release FDOS 2.6e or Series 6000 3.0 or
later, we recommend that you use IAFLIB_file_doc_after() instead of IAFLIB_
file_doc().

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_file_doc_after(client_h, ims_p, folder_name,


folder_id, num_docs, doclist, after_doc);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS where the folder is stored. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

folder_name PSTR input. Folder name. If folder_id is zero, folder_name is


used.

folder_id FN_folnum_typ input. Folder ID to use or zero. If zero, folder_


name is used.

num_docs WORD input. Number of documents in the doclist.

doclist FN_docnum_typ * input. An array of document IDs to be filed.

after_doc FN_docnum_typ input. Document ID after which doclist will


be filed. To put the doclist at the beginning of the folder,
specify FN_UNDEF_FOLDER. To put the doclist at the end of
the folder, specify FN_MAX_FOLDER.

Note This function requires the Series 6000 software version 3.0 or FDOS 2.6e or
later.

980 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_file_doc_after()

Errors Returned
Note that this function does not return the error

INX_err_already_in_folder

if you try to file a duplicate document into a folder already containing that
document. The call is ignored and no duplicate is filed.

INX_err_invalid_handle
Invalid session handle.

INX_err_no_folder
The specified folder does not exist.

INX_err_other
The real error tuple is a parameter to this protocol error.

INX_err_not_in_folder
The document is not filed in the specified folder.

See Also
“IAFLIB_file_doc()” on page 978

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

“FN_folnum_typ” on page 261

December 1996 WAL for Windows Programmer’s Reference Manual 981


7 WAL Function Reference
IAFLIB_find_folders()

IAFLIB_find_folders()
IAFLIB_find_folders() returns folder descriptors for folders that match folder_
spec. It has two variations: original and continuation. On the original call,
continuation is FALSE. Folder descriptions are returned until last_folder is
TRUE. Index Service reserves the right to return fewer than max_folders,
even if more are in the subtree.

In a continuation call, the continuation argument is TRUE, and old_left_off


indicates the point where the previous search left off (i.e., the previous call’s
return argument new_left_off). The connection must remain open for the
duration of the original and continuation calls (i.e., you cannot continue an
IAFLIB_find_folders() call on another connection).

See IAFLIB_delete_folders() for a description of how to use wildcards with


folder_spec.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_find_folders(client_h, ims_p, folder_spec,


continuation, old_left_off, folder_state, max_folders, num_folders_p, last_
folder_p, new_left_off, folders_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the folders. If NULL, the default IMS specified
in IAFLIB_logon_user() is used.

folder_spec PSTR input. Name of folder in which to look. End this


specification with a slash or an asterisk (or both) to specify
more than one folder.

continuation BOOL input. TRUE if this is a continuation of an earlier


IAFLIB_find_folders() call. FALSE otherwise.

old_left_off PSTR input. Used if continuation is TRUE.

982 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_find_folders()

folder_state INX_closed_typ input. Specifies the states of folders that can


be searched. Possible values are INX_CL_ACTIVE, INX_CL_
CLOSED, and INX_CL_ALL.

max_folders short input. Maximum number of folders to return.

num_folders_p
short * output. Pointer to the number of descriptors returned
in folder_h_p.

last_folder_p BOOL * output. Pointer to a boolean which is TRUE if there


are no more matches, FALSE if there are more folders.

new_left_off PSTR output. Location in database where function stopped


the search. Use this value as old_left_off in the next
continuation call.

folders_h_p HANDLE * output. Pointer to the handle for the array of INX_
folder_desc_typ structures.

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_folder
The specified folder does not exist.

INX_err_other
The real error tuple is a parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“INX_closed_typ” on page 357

“INX_folder_desc_typ” on page 367

The sample application in the directory C:\FILENET\SAMPLE\FOLD2\

December 1996 WAL for Windows Programmer’s Reference Manual 983


7 WAL Function Reference
IAFLIB_find_index_in_DIR()

IAFLIB_find_index_in_DIR()
Given a Document Index Record (DIR) pointer and an index ID, IAFLIB_find_
index_in_DIR() returns a pointer to the value of the index in the DIR if the
index is present. If dir_val_p is NULL on return, the index is not in the DIR.
This function allows you to interpret the DIR.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_find_index_in_DIR(dir_p, index_id,


dir_val_p_p);

Parameters
dir_p INX_dir_typ * input. Pointer to an INX_dir_typ structure.

index_id WORD input. Index ID of index to find.

dir_val_p_p INX_index_value_typ * * output. Pointer to a pointer to a


structure.

Note This function does not require an IAFLIB client handle.

See Also
“INX_dir_typ” on page 362

“INX_index_value_typ” on page 373

984 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_find_system_defaults()

IAFLIB_find_system_defaults()
IAFLIB_find_system_defaults() returns a SEC_system_desc_typ structure
that contains security configuration settings for IMS 3.1 security services. The
general calling order is IAFLIB_logon_user(), IAFLIB_get_server_version() to
check for IMS 3.1, and IAFLIB_find_system_defaults(). See the example code
in “Appendix A–IMS Security Services and WAL” on page 1251.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_find_system_defaults(client_h,


service_name_p, system_defaults);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

service_name_p
ASE_service_name_typ * input. Pointer to the NCH name for
the IMS service. If NULL, the default IMS specified in IAFLIB_
logon_user() is used.

system_defaults
SEC_system_desc_typ * output. Password and account
activity data.

See Also
“Appendix A–IMS Security Services and WAL” on page 1251

“IAFLIB_logon_user()” on page 1033

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_server_version()” on page 1024

“IAFLIB_get_default_restrictions()” on page 996

“ASE_service_name_typ” on page 178

“SEC_system_desc_typ” on page 517

December 1996 WAL for Windows Programmer’s Reference Manual 985


7 WAL Function Reference
IAFLIB_FreeAttr2Memory()

IAFLIB_FreeAttr2Memory()
IAFLIB_FreeAttr2Memory() unlocks and frees the memory used by the PRI_
printer_attr_typ2 structure.

The PRI_printer_attr_typ2 structure is used by IAFLIB_get_printer_info2().

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_FreeAttr2Memory(client_h, hPrinterAttrs);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

hPrinterAttrs HANDLE * input/output. Pointer to the handle of the structure


to be freed.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_printer_info2()” on page 1021

986 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_free_client_handle()

IAFLIB_free_client_handle()
IAFLIB_free_client_handle() logs off all service sessions established for the
client and frees all resources allocated for the client. On return, the client
handle is no longer valid.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_free_client_handle(client_h);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

See Also
“IAFLIB_get_client_handle()” on page 994

The sample applications in most of the samples

December 1996 WAL for Windows Programmer’s Reference Manual 987


7 WAL Function Reference
IAFLIB_FreeRequest2Memory()

IAFLIB_FreeRequest2Memory()
IAFLIB_FreeRequest2Memory() unlocks and frees the memory used by the
PRI_request_desc_typ2 structure.

The PRI_request_desc_typ2 structure is used by IAFLIB_get_print_


queues2().

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_FreeRequest2Memory(client_h,


hPrinterRequests);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

hPrinterRequests
HANDLE * input/output. Pointer to the handle of the structure
to be freed.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_print_queues2()” on page 1013

988 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_FreeStatusMemory()

IAFLIB_FreeStatusMemory()
IAFLIB_FreeStatusMemory() unlocks and frees the memory used by the PRI_
printer_status_typ structure. IAFLIB_FreeStatusMemory() can be called once
for each call to IAFLIB_get_print_service_info1().

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_FreeStatusMemory(client_h, hPrinterStatus,


wNumPrinters);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

hPrinterStatus HANDLE * input. Pointer to the handle of the structure to be


freed.

wNumPrinters WORD input. The number of printers currently associated


with the memory.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_print_service_info1()” on page 1017

December 1996 WAL for Windows Programmer’s Reference Manual 989


7 WAL Function Reference
IAFLIB_get_annotations()

IAFLIB_get_annotations()
IAFLIB_get_annotations() returns in annot_h a handle for all the annotations
for the specified page of a document. If any annotation on the page is in
modify state, the most recently saved copy of that annotation is returned. Only
annotations for which the caller has read access are returned by this call.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_annotations(client_h, ims_p, doc_id, page,


num_p, annot_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. Document number.

page ASE_page_number_typ input. Page number.

num_p WORD * output. Pointer to the number of annotations


returned in annot_h_p.

annot_h_p HANDLE * output. Pointer to the handle for the array of DOC_
annotation_desc_typ.

Errors Returned
DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_document_not_found
The document was not found by DOC.

DOC_err_annotation_not_found
The annotation was not found by DOC.

990 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_annotations()

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

DOC_err_no_permission
No permission to perform the specified DOC function.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“DOC_annotation_desc_typ” on page 232

“FN_docnum_typ” on page 260

The sample application in the directory C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 991


7 WAL Function Reference
IAFLIB_get_cache_object_attrs()

IAFLIB_get_cache_object_attrs()
IAFLIB_get_cache_object_attrs() retrieves the object attributes from the
Cache Service named by cache_service_p and returns a pointer to them in
attr_p. The object cannot be opened for write access by any other client. Read
permission is required on the cache and the object.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_cache_object_attrs (client_h, doc_id, page,


cache_service_p, attr_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. Document number.

page ASE_page_number_typ input. Page number.

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Cache Service.

attr_p CSM_object_attr_typ * output. Cache object attributes.

Errors Returned
CSM_invalid_session_handle
CSM was given an invalid session handle; the session probably timed
out.

CSM_no_such_object
CSM error: The specified object does not exist in the current cache.

CSM_object_busy
CSM error: The operation specified cannot get necessary access.

CSM_other_error
CSM error: Catchall for other errors encountered inside CSM.

CSM_no_permission
The client does not have permission for the requested operation.

992 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_cache_object_attrs()

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“CSM_object_attr_typ” on page 222

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 993


7 WAL Function Reference
IAFLIB_get_client_handle()

IAFLIB_get_client_handle()
IAFLIB_get_client_handle() allocates resources on behalf of a client, and
returns a handle. This handle must be passed to most IAFLIB functions.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_client_handle(client_h_p);

Parameters
client_h_p HANDLE * output. Pointer to the handle for the IAFLIB client
data structure.

See Also
The sample applications in most of the samples

994 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_current_IMS()

IAFLIB_get_current_IMS()
IAFLIB_get_current_IMS() returns the name of the current IMS.

Syntax
#include <iaflib.i>

void CALLBACK IAFLIB_get_current_IMS(ims_p);

Parameters
ims_p ASE_service_name_typ * output. Pointer to the NCH name
for the currently logged-on IMS.

See Also
“ASE_service_name_typ” on page 178

The sample applications in the directories C:\FILENET\SAMPLE\COMMIT


and C:\FILENET\SAMPLE\FORM

December 1996 WAL for Windows Programmer’s Reference Manual 995


7 WAL Function Reference
IAFLIB_get_default_restrictions()

IAFLIB_get_default_restrictions()
IAFLIB_get_default_restrictions() returns default access restrictions for
creation of a new FileNet object such as folder note, WorkFlo queue, and so
on. Call this function when you create the new object to set the default access
restrictions for the object.

If you’re looking for quick compatibility with WorkForce Desktop apps, this
entry point assigns those default access restrictions.

IMS versions before 3.1 assign default access restrictions based on the user’s
id (user_id). IMS versions 3.1 and later assign restrictions based on the user’s
primary groups (user_group). If both user_group_p and user_id_p are NULL,
this call gets default restrictions from the currently logged-on user’s id.

The default attributes are identical to the WorkForce Desktop native mode
defaults and are listed below.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_default_restrictions(client_h,


service_name_p, user_group_p, user_id_p, image_object, replace_bad_id,
replacement_id, access_restricts);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

service_name_p
ASE_service_name_typ * input. Pointer to the NCH name for
the IMS containing the object. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

user_group_p
ASE_service_name_typ * input. Pointer to the default user
name. For 3.1 or later systems, this is the user’s primary
group. This value is used only if user_id_p is NULL or zero.

user_id_p SEC_id_typ * input. Pointer to the user id for IMS v3.0 or


earlier systems. If NULL or zero is passed, user_group_p is
used.

996 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_default_restrictions()

image_object IAFLIB_image_object_typ input. FileNet object type.

replace_bad_id
BOOL. Not used.

replacement_id
SEC_id_typ. Not used.

access_restricts
SCT_access_restrictions * output. Pointer to a structure
containing document access restrictions.

Default FileNet object security attributes are shown in the following table.
These attributes are identical to the WorkForce Desktop native mode defaults.

Object Pre-3.1 IMS 3.1 IMS


folder User Primary Group
cache object
WorkFlo queue description ANYONE ANYONE
WorkFlo queue content
WorkFlo workspace
annotation
tab

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“IAFLIB_image_object_typ” on page 350

“SCT_access_restrictions” on page 481

“SEC_id_typ” on page 504

“Appendix A–IMS Security Services and WAL” on page 1251

December 1996 WAL for Windows Programmer’s Reference Manual 997


7 WAL Function Reference
IAFLIB_get_doc_attr()

IAFLIB_get_doc_attr()
IAFLIB_get_doc_attr() returns a handle for a structure containing data about
the specified document.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_doc_attr(client_h, ims_p, doc_id, attr_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. Document number.

attr_h_p HANDLE * output. Pointer to the handle for a DOC_doc_


location_desc_typ structure, which contains the data that is
maintained for each document by the document locator
database.

Errors Returned
DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_no_matches
No matches found when attempting to find information from DOC.

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

998 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_doc_attr()

“ASE_service_name_typ” on page 178

“DOC_doc_location_desc_typ” on page 240

“FN_docnum_typ” on page 260

The sample application in the directory C:\FILENET\SAMPLE\DOCUMENT\

December 1996 WAL for Windows Programmer’s Reference Manual 999


7 WAL Function Reference
IAFLIB_get_docs_in_folder()

IAFLIB_get_docs_in_folder()
IAFLIB_get_docs_in_folder() returns a handle to an array of document IDs
that are filed in a specified folder. If the return value of last_match_p is
FALSE, continue by calling IAFLIB_get_docs_in_folder() again with start set
to the last record returned in docs_h.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_docs_in_folder(client_h, ims_p,


folder_name, folder_id, start, max_rec, num_returned_p, last_match_p,
docs_h);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS where the folder is stored. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

folder_name PSTR input. Folder name. If folder_id is 0, folder_name is


used.

folder_id FN_folnum_typ input. Folder ID to use or 0. If zero, folder_


name is used.

start INX_fc_doc_ord_item_typ * input. To search from the first


document, set start.doc_id to zero. To continue the unfinished
search, set start to the last structure returned from docs_h.
Currently, start.ordinal is ignored; it should always be set to
zero.

max_rec unsigned short input. The maximum number of records you


want to return. Valid input range is 1 to 100. If input is outside
of this range, max_rec is set to 100.

num_returned_p
unsigned short * output. Pointer to the actual number of
returned records.

1000 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_docs_in_folder()

last_match_p FN_BOOL * output. If TRUE, the last record is reached. If


FALSE, you can continue by setting start to the last record
returned in docs_h.

docs_h HANDLE * output. Pointer to a handle of an array of INX_fc_


doc_ord_item_typ.

Note This function requires the Series 6000 software version 3.0 or FDOS 2.6e or
later.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_folnum_typ” on page 261

“INX_fc_doc_ord_item_typ” on page 366

December 1996 WAL for Windows Programmer’s Reference Manual 1001


7 WAL Function Reference
IAFLIB_get_file_text()

IAFLIB_get_file_text()
IAFLIB_get_file_text() extracts text from a TEXT- or FORM-type page. At
most, one line of text is returned, but no more than size bytes. The returned
text is always NULL-terminated.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_file_text(client_h, file_name, row, col, size,


free_buf, text, rows_p, cols_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

file_name PSTR input. Name of file containing FileNet text or form


page.

row WORD input. Along with col, position of text to extract; row
zero, col zero is the first position.

col WORD input. See row above.

size WORD input. Maximum number of bytes to extract plus 1 for


the NULL terminator; text_p must point to a buffer of at least
size bytes.

free_buf FN_BOOL input. TRUE to free internal text buffer after this
call. FALSE to keep it. If extracting more than one row from
the same page, set free_buf to FALSE on all calls except the
last.

text PSTR output. The extracted text. Must be at least size bytes
large.

rows_p WORD * output. Pointer to the number of columns of text on


the page.

cols_p WORD * output. Pointer to the number of rows of text on the


page.

1002 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_file_text()

Note The file named must contain a FileNet format page (TEXT- or FORM-type)
containing a PCODES stream. Usually, the file name is one returned by a call
to IAFLIB_get_object(), and the file resides in the cache managed by CAM.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_object()” on page 1007

“IAFLIB_get_object_text()” on page 1009

December 1996 WAL for Windows Programmer’s Reference Manual 1003


7 WAL Function Reference
IAFLIB_get_folder_attrs()

IAFLIB_get_folder_attrs()
IAFLIB_get_folder_attrs() retrieves the attributes of a folder. It returns folder_
desc for folder_id (if folder_id is non-zero) or folder_name.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_folder_attrs(client_h, ims_p, folder_name,


folder_id, folder_desc_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the folder. If NULL, the default IMS specified
in IAFLIB_logon_user() is used.

folder_name PSTR input. Folder name. If folder_id is zero, folder_name is


used.

folder_id FN_folnum_typ input. Folder to find or zero. If zero, folder_


name is used.

folder_desc_p INX_folder_desc_typ * output. Pointer a structure that


contains the attributes of the folder.

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_folder
The specified folder does not exist.

INX_err_other
The real error tuple is a parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

1004 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_folder_attrs()

“ASE_service_name_typ” on page 178

“FN_folnum_typ” on page 261

“INX_folder_desc_typ” on page 367

The sample applications in the directories C:\FILENET\SAMPLE\FOLD2\,


C:\FILENET\SAMPLE\DOCUMENT\, and C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 1005


7 WAL Function Reference
IAFLIB_get_membership_list()

IAFLIB_get_membership_list()
IAFLIB_get_membership_list() returns the names of all the groups to which a
user/group belongs and returns a handle for the caller. An error code is
returned if the user/group does not exist.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_membership_list (client_h,


security_service_p, id_p, list_type, num_incl_p, incl_h_p, num_excl_p,
excl_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

security_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
a Security Service. If NULL, the default service is used.

id_p long * input. Pointer to the user ID (SEC_id_typ) for


membership list.

list_type unsigned short input. Subscriber or subscription (SEC_


MEMLIST_SUBSCRIPTION or SEC_MEMLIST_
SUBSCRIBER)

num_incl_p long * output. Pointer to the number of entries in incl_h_p.

incl_h_p HANDLE * output. Pointer to the handle for the inclusion list.

num_excl_p long * output. Pointer to the number of entries in excl_h_p.

excl_h_p HANDLE * output. Pointer to the handle for the exclusion list.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

1006 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_object()

IAFLIB_get_object()
IAFLIB_get_object() retrieves a specified page in a committed document and
places it in a file in the PC’s local cache. It returns the name of the file
containing the object in file_name.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_object(client_h, doc_id, page, offset, size,


style, cache_service_p, pages_in_doc_p, file_name, attr_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. Document number.

page ASE_page_number_typ input. Page number.

offset DWORD input. Offset and size control the portion of the
object returned. If both are set to zero, the whole object is
returned.

size DWORD input. See offset above.

style WORD input. If style is ILIB_USE_DEFAULT_IMS, cache_


service_p is not used, the object is retrieved from the IMS to
which the user is logged, and pages_in_doc_p returns the
number of pages in the whole document.

If style is ILIB_USE_CACHE_SERVICE, the object is


retrieved from the Cache Service named by cache_service_
p, and pages_in_doc_p returns no useful information.

If style is ILIB_USE_DOC_SERVICE, the object is retrieved


from the Document Service named by cache_service_p, and
pages_in_doc_p returns the number of pages in the whole
document.

December 1996 WAL for Windows Programmer’s Reference Manual 1007


7 WAL Function Reference
IAFLIB_get_object()

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the desired Cache or Document Service. Use NULL for
default.

pages_in_doc_p
ASE_page_number_typ * output. Pointer to the number of
pages in the whole document, only if style is ILIB_USE_
DEFAULT_IMS or ILIB_USE_DOC_SERVICE.

file_name PSTR output. The name of the file that contains the object.

attr_p CSM_object_attr_typ * output. Pointer to the object’s


attributes. Allocate memory to hold the return value. If the
attributes are needed, include CSM.DEF file; otherwise,
specify NULL.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“CSM_object_attr_typ” on page 222

“FN_docnum_typ” on page 260

The sample applications in the directories C:\FILENET\SAMPLE\GEN\,


C:\FILENET\SAMPLE\DOCUMENT\, C:\FILENET\SAMPLE\IMAGE\, and
C:\FILENET\SAMPLE\LPRINT\

1008 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_object_text()

IAFLIB_get_object_text()
IAFLIB_get_object_text() extracts text from a TEXT- or FORM-type page. At
most, one line of text is returned, but no more than size bytes. The returned
text is always NULL-terminated.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_object_text(client_h, doc_id, page, row, col,


size, style, free_buf, service_p, text, rows_p, cols_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. Document number.

page ASE_page_number_typ input. Page number.

row WORD input. Along with col, position of text to extract; row
zero, column zero is the first position.

col WORD input. See row above.

size WORD input. Maximum number of bytes to extract plus 1 for


NULL termination; text must point to a buffer of at least size
bytes.

style WORD input. Can be one of the following:

ILIB_USE_DEFAULT_IMS goes through the Document


Service of the IMS to which the
user is logged on.

ILIB_USE_CACHE_SERVICE goes through the Cache Service


named in the service_p
parameter.

ILIB_USE_DOC_SERVICE goes through the Document


Service named in the service_p
parameter.

December 1996 WAL for Windows Programmer’s Reference Manual 1009


7 WAL Function Reference
IAFLIB_get_object_text()

free_buf FN_BOOL input. TRUE to free the internal text buffer after
this call, FALSE to keep it. If extracting more than one row
from the same page, you should set free_buf to FALSE on all
calls except the last.

service_p ASE_service_name_typ * input. Pointer to the NCH name for


desired Cache or Document Service.

text PSTR output. The extracted text. Must be at least size bytes
large.

rows_p WORD * output. Pointer to the number of columns of text on


the page.

cols_p WORD * output. Pointer to the number of rows of text on the


page.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_file_text()” on page 1002

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

1010 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_print_queues()

IAFLIB_get_print_queues()
IAFLIB_get_print_queues() retrieves information about one or more print
requests presently known to the Print Service. The number of print requests
the client wants returned at one time, along with the request ID of the first
request to be included in this list, are passed as input parameters. The
function returns the last request ID retrieved, the number of requests that
were placed in the list, a handle for the list itself, and an indicator as to
whether all known requests have been returned.

Note that only requests to which the caller has read access are returned.

Syntax
#include <pri.def>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_print_queues(client_h, print_service_p,


filter, job_id_start, max_requests, job_id_end_p, num_q_entries_p, more_p,
psq_entry_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

filter PRI_request_filter_typ * input. Restricts the match set to


those requests that match the specified filter conditions.

job_id_start DWORD input. Specifies the request ID from which to begin


the query. Subsequent calls to IAFLIB_get_print_queues()
should set job_id_start to the job_id_end returned in the
previous call.

max_requests WORD input. Maximum number desired (limits the number of


requests returned per call).

job_id_end_p DWORD * output. Pointer to the last job ID retrieved.

December 1996 WAL for Windows Programmer’s Reference Manual 1011


7 WAL Function Reference
IAFLIB_get_print_queues()

num_q_entries_p
WORD * output. Pointer to the number returned in psq_
entry_h_p.

more_p BOOL * output. Pointer to a boolean. If TRUE, there are more


print jobs; otherwise, there are not.

psq_entry_h_p
HANDLE * output. Pointer to the handle for the memory
containing the array of structures of type PRI_request_desc_
typ. These structures describe the publicly-visible attributes
of a print request.

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_print_queues2()” on page 1013

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PRI_request_desc_typ” on page 439

“PRI_request_filter_typ” on page 450

1012 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_print_queues2()

IAFLIB_get_print_queues2()
IAFLIB_get_print_queues2() retrieves information about one or more print
requests presently known to the Print Service. Note that this call can only be
used with IMS 3.3.1 or later.

The number of print requests the client wants returned at one time, along with
the request ID of the first request to be included in this list, are passed as
input parameters. The function returns the last request ID retrieved, the
number of requests that were placed in the list, a handle for the list itself, and
an indicator as to whether all known requests have been returned.

Note that only requests for which the caller has read access are returned.

You can call IAFLIB_FreeRequest2Memory() to free the memory used by the


psq_entry_h_p parameter.

Syntax
#include <pri.def>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_print_queues2(client_h, print_service_p,


filter, want_docs, job_id_start, num_q_entries_p, more_p, psq_entry_h_p);

Parameters
client_h HANDLE input. The handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

filter PRI_request_filter_typ * input. Restricts the match set to


those requests that match the specified filter conditions.

want_docs BOOL. Not currently supported.

job_id_start PRI_position_typ * input. Specifies the request ID from which


to begin the query. Subsequent calls to IAFLIB_get_print_
queues2() should set job_id_start to the job_id_end returned
in the previous call.

December 1996 WAL for Windows Programmer’s Reference Manual 1013


7 WAL Function Reference
IAFLIB_get_print_queues2()

num_q_entries_p
WORD * output. Pointer to the number returned in psq_
entry_h_p.

more_p BOOL * output. Pointer to a boolean. If TRUE, there are more


print jobs; otherwise there are not.

psq_entry_h_p
HANDLE * output. Pointer to the handle for the memory
containing the array of structures of type PRI_request_desc_
typ2. These structures describe the publicly-visible attributes
of a print request.

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

See Also
“IAFLIB_FreeRequest2Memory()” on page 988

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_print_queues()” on page 1011

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PRI_position_typ” on page 415

“PRI_request_desc_typ2” on page 444

“PRI_request_filter_typ” on page 450

1014 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_print_service_info()

IAFLIB_get_print_service_info()
IAFLIB_get_print_service_info() returns information about the status of a Print
Service along with information about the status of the individual printers and
fax machines this Print Service is controlling.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_print_service_info(client_h,


print_service_p, num_printers_p, requests_p, printer_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

num_printers_p
WORD * output. Pointer to the number of printers and fax
machines known to be controlled by this Print Service (the
number of structures in printer_h_p).

requests_p WORD * output. Pointer to the number of requests that are


queued (i.e., for which a printer has been chosen) but have
not yet printed.

printer_h_p HANDLE * output. Pointer to the handle for the memory


containing an array of structures of type PS_printer_status_
desc_type.

The status information returned about each printer includes


the name of the printer, the printer’s operational status, the
direction that pages should be fed to this printer, the number
of requests queued to this printer, the number of document
pages queued to this printer, the number of paper sizes that
this printer currently has loaded, and a list of those paper
sizes.

December 1996 WAL for Windows Programmer’s Reference Manual 1015


7 WAL Function Reference
IAFLIB_get_print_service_info()

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_print_service_info1()” on page 1017

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PS_printer_status_desc_type” on page 465

1016 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_print_service_info1()

IAFLIB_get_print_service_info1()
IAFLIB_get_print_service_info1() returns information about the status of a
Print Service along with information about the status of the individual printers
and fax machines this Print Service is controlling.

Ccall IAFLIB_FreeStatusMemory() to free the memory used by the printer_h_


p parameter.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_print_service_info1(client_h,


print_service_p, num_printers_p, requests_p, printer_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

num_printers_p
WORD * output. Pointer to the number of printers and fax
machines known to be controlled by this Print Service (the
number of structures in printer_h_p).

requests_p WORD * output. Pointer to the number of requests that are


queued (i.e., for which a printer has been chosen) but have
not yet printed.

printer_h_p HANDLE * output. Pointer to the handle for the memory


containing an array of structures of type PRI_printer_status_
typ.

The status information returned about each printer includes


the name of the printer, the printer’s operational status, the
direction that pages should be fed to this printer, the number
of requests queued to this printer, the number of document

December 1996 WAL for Windows Programmer’s Reference Manual 1017


7 WAL Function Reference
IAFLIB_get_print_service_info1()

pages queued to this printer, the number of paper sizes that


this printer currently has loaded, and a list of those paper
sizes.

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

See Also
“IAFLIB_FreeStatusMemory()” on page 989

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_print_service_info()” on page 1015

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PRI_printer_status_typ” on page 435

1018 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_printer_info()

IAFLIB_get_printer_info()
IAFLIB_get_printer_info() gets a list of printers for the specified Print Service,
and retrieves attribute information about these printers. The attributes
describe the capabilities of each printer under the service’s control.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_printer_info(client_h, print_service_p,


num_printers_p, printer_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

num_printers_p
WORD * output. Pointer to the number returned in printer_h_
p.

printer_h_p HANDLE * output. Pointer to the handle for an array of PS_


printer_attr_desc_type structures.

The attribute information returned includes the name of the


printer, the type of printer (printer or fax), the security needed
to print on this printer, the speed of this printer, an indicator
that says whether or not this printer can print on both sides of
the paper, an indicator that says whether or not this printer is
capable of stapling, the number of trays that this printer can
support, the number of paper sizes that this printer is capable
of printing on, and a list of those paper sizes.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_printer_info2()” on page 1021

December 1996 WAL for Windows Programmer’s Reference Manual 1019


7 WAL Function Reference
IAFLIB_get_printer_info()

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PS_printer_attr_desc_type” on page 463

1020 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_printer_info2()

IAFLIB_get_printer_info2()
IAFLIB_get_printer_info2() gets a list of printers for the specified Print Service
and retrieves attribute information about these printers. These attributes
describe the capabilities of each printer under the service’s control.

You can call IAFLIB_FreeAttr2Memory() to free the memory used by the


printer_h_p parameter.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_printer_info2(client_h, print_service_p,


num_printers_p, printer_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

num_printers_p
WORD * output. Pointer to the number of structures returned
in printer_h_p.

printer_h_p HANDLE * output. Pointer to the handle for the array of


structures of type PRI_printer_attr_typ2.

The attribute information returned includes the name of the


printer, the type of printer (printer or fax), the security needed
to print on this printer, the speed of this printer, an indicator
that says whether or not this printer can print on both sides of
the paper, an indicator that says whether or not this printer is
capable of stapling, the number of trays that this printer can
support, the number of paper sizes that this printer is capable
of printing on, and a list of those paper sizes.

December 1996 WAL for Windows Programmer’s Reference Manual 1021


7 WAL Function Reference
IAFLIB_get_printer_info2()

See Also
“IAFLIB_FreeAttr2Memory()” on page 986

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_printer_info()” on page 1019

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“PRI_printer_attr_typ2” on page 432

1022 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_security_info()

IAFLIB_get_security_info()
IAFLIB_get_security_info() retrieves information about a user or group and
returns it to the caller. The information returned includes the user/group name
and ID, primary group, language, and login flag. If the user/group does not
exist in the security database, SCT_undefined is returned.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_security_info(client_h, security_service_p,


user_p, id_p, sec_info_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

security_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the desired Security Service. NULL for default.

user_p ASE_service_name_typ * input/output. Pointer to the NCH


name to look up. The NCH name is returned in user_p if the
ID pointed to by id_p is not zero.

id_p SEC_id_typ * input/output. Pointer to the user ID to look up.


User ID is returned in id_p if NCH name passed security
check.

sec_info_p SEC_security_info_typ * output. Pointer to a structure


containing security information.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_service_name_typ” on page 178

“SEC_id_typ” on page 504

“SEC_security_info_typ” on page 513

December 1996 WAL for Windows Programmer’s Reference Manual 1023


7 WAL Function Reference
IAFLIB_get_server_version()

IAFLIB_get_server_version()
IAFLIB_get_server_version() returns the release version of the server
software.

For server software release 3.0, the value of FN_server_version_typ is hard-


coded to {3,0,0,0} from the WAL for WIndows client software.

For pre-3.0 releases, it’s hard-coded to {2,6,0.0}.

For server software releases 3.1 or later, this call RPCs to the server to get
the server software release number and returns it in the FN_server_version_
typ structure.

Syntax
#include <iaflib.i>

void CALLBACK IAFLIB_get_server_version(fn_version);

Parameters
fn_version FN_server_version_typ * output. Pointer to a structure
containing the version information.

See Also
“FN_server_version_typ” on page 263

1024 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_single_DIR()

IAFLIB_get_single_DIR()
IAFLIB_get_single_DIR() performs a high-performance, non-interruptible
query. It returns a single document index record, retrieving it by its ID number.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_single_DIR(client_h, ims_p, doc_id, dir_h);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name of


the IMS to query. If NULL, the default IMS specified in
IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. Document number.

dir_h PHANDLE output. Handle for an INX_dir_typ data structure


(which represents a document index record).

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_record
The requested record was not found.

INX_err_no_permission
Permission denied.

INX_err_record_busy
The record is already locked

INX_err_other
The real error tuple is a parameter to this protocol error.

December 1996 WAL for Windows Programmer’s Reference Manual 1025


7 WAL Function Reference
IAFLIB_get_single_DIR()

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

“INX_dir_typ” on page 362

The sample application in the directory C:\FILENET\SAMPLE\DOCUMENT\

1026 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_user_name()

IAFLIB_get_user_name()
IAFLIB_get_user_name() returns the NCH name for the logged user name.

This function is usually used to check whether a user has logged on to a


FileNet system. You must allocate space for the return value. The maximum
length of user can be 82 characters.

Syntax
#include <iaflib.i>

void CALLBACK IAFLIB_get_user_name(user);

Parameters
user PSTR output. NCH name for the user. If “:” is returned, it
means you have not logged on to the FileNet system.

See Also
The sample applications in the directories C:\FILENET\SAMPLE\GEN\,
C:\FILENET\SAMPLE\COMMIT\, C:\FILENET\SAMPLE\LPRINT\,
C:\FILENET\SAMPLE\SECURITY\, and C:\FILENET\SAMPLE\TTYLIB\

December 1996 WAL for Windows Programmer’s Reference Manual 1027


7 WAL Function Reference
IAFLIB_get_user_stats()

IAFLIB_get_user_stats()
IAFLIB_get_user_stats() retrieves IMS 3.1 user group, password status, and
account activity information for security management and creation and
change of passwords.

For example, call this function to check account activity or to recover


information about an expired password. See the “Example Password and
Security Management Code” section in “Appendix A–IMS Security Services
and WAL” on page 1251.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_get_user_stats(client_h, user_p,


service_name_p, user_stats);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

user_p PSTR input. Pointer to the default user name. Null specifies
the logged-on user.

service_name_p
ASE_service_name_typ * input. Pointer to the NCH name for
the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

user_stats SEC_stats_desc_typ * output. User statistics.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“SEC_stats_desc_typ” on page 516

“Appendix A–IMS Security Services and WAL” on page 1251

1028 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_get_version()

IAFLIB_get_version()
IAFLIB_get_version() returns the version of the WAL for Windows SDK
installed on a particular workstation. For example, for WAL for Windows
release 3.1.0, it returns:

version[0] = 0;
version[1] = 3;
version[2] = 1;
version[3] = 0;

Syntax
#include <iaflib.i>

void CALLBACK IAFLIB_get_version(version);

Parameters
version PSTR output. Pointer to an array of four bytes. Upon return,
the array is filled with the following information:

Byte 0 = reserved, set to 0


Byte 1 = major release
Byte 2 = minor release
Byte 3 = cycle number

December 1996 WAL for Windows Programmer’s Reference Manual 1029


7 WAL Function Reference
IAFLIB_initialize_RDD()

IAFLIB_initialize_RDD()
IAFLIB_initialize_RDD() remains only to emit an error message in case it is
called by a client. It was replaced with RDD_init().

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_initialize_RDD(void);

See Also
“RDD_init()” on page 1113

1030 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_is_annotated()

IAFLIB_is_annotated()
IAFLIB_is_annotated() returns a pointer to a flag that indicates whether there
are annotations on any page of the specified document.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_is_annotated(client_h, ims_p, doc_id,


annotated_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. Document number.

annotated_p FN_BOOL * output. Pointer to boolean that is TRUE if


document has annotations, FALSE otherwise.

Errors Returned
DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_document_not_found
The document was not found by DOC.

DOC_err_no_permission
No permission to perform the specified DOC function.

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

December 1996 WAL for Windows Programmer’s Reference Manual 1031


7 WAL Function Reference
IAFLIB_is_annotated()

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

1032 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_logon_user()

IAFLIB_logon_user()
IAFLIB_logon_user() validates the name and password before logging onto or
off of the Index Service associated with IMS.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_logon_user(user, passwd, ims_p,


print_service_p);

Parameters
user PSTR input. The user name. Can be a three-part NCH name
or just the object part. If the latter, IAFLIB supplies the
organization and domain from the ims_p parameter.

If NULL, IAFLIB_logon_user() clears the user name and


password (to be used when shutting down).

passwd PSTR input. A NULL terminated string containing a


password.

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the desired IMS. Can be obtained from
ServiceNameDefaults().

print_service_p
ASE_service_name_typ * optional input. Pointer to the NCH
name of the default Print Service selected by the user. No
validation of print_service_p is done. print_service_p is
simply stored in IAFLIB’s global data as the default Print
Service, for use with subsequent printing calls. If NULL,
IAFLIB uses the default Print Service for the IMS.

See Also
“ASE_service_name_typ” on page 178

The sample application in the directory C:\FILENET\SAMPLE\LOGON\

December 1996 WAL for Windows Programmer’s Reference Manual 1033


7 WAL Function Reference
IAFLIB_migrate_from_optical_disk()

IAFLIB_migrate_from_optical_disk()
IAFLIB_migrate_from_optical_disk() retrieves a document from the optical
disk and places it in the server cache. Specific CSM calls must be made to
retrieve the server cache object from the IMS and place it in the local PC
cache.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_migrate_from_optical_disk(client_h, ssn,


doc_id, page, style, cache_service_p, pages_in_doc_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ssn ASE_ssn_typ input. The system serial number. If ssn is zero,


then the system serial number for the current IMS is used.

doc_id FN_docnum_typ input. Document number.

page ASE_page_number_typ input. Page number.

style WORD input. If style is ILIB_USE_DEFAULT_IMS, cache_


service_p is not used, the object is retrieved from the IMS to
which the user is logged, and pages_in_doc_p returns the
number of pages in the whole document.

If style is ILIB_USE_CACHE_SERVICE, the object is


retrieved from the Cache Service named by cache_service_
p, and pages_in_doc_p returns no useful information.

If style is ILIB_USE_DOC_SERVICE, the object is retrieved


from the Document Service named by cache_service_p, and
pages_in_doc_p returns the number of pages in the whole
document.

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Cache or Document Service. Use NULL for default.

1034 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_migrate_from_optical_disk()

pages_in_doc_p
ASE_page_number_typ * output. If style is ILIB_USE_
DEFAULT_IMS or ILIB_USE_DOC_SERVICE, pointer to the
number of pages in the whole document.

See Also
“IAFLIB_get_client_handle()” on page 994

“CSM_close_object()” on page 712

“CSM_delete_object()” on page 713

“CSM_logoff()” on page 714

“CSM_logon()” on page 715

“CSM_modify_object()” on page 717

“CSM_open_object()” on page 718

“CSM_read_object()” on page 720

“CSM_renew()” on page 721

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“ASE_ssn_typ” on page 180

December 1996 WAL for Windows Programmer’s Reference Manual 1035


7 WAL Function Reference
IAFLIB_migrate_to_optical_disk()

IAFLIB_migrate_to_optical_disk()
IAFLIB_migrate_to_optical_disk() migrates a committed document from a
cache to optical disk. The entire document must be in the specified cache.
The migration is asynchronous with the call. The document must not be
previously migrated and is written to the family and/or cluster dictated by the
DOC_committal_desc_typ provided when the document was committed.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_migrate_to_optical_disk(client_h, ims_p,


doc_id, cache_service_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. Document number.

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the desired Cache Service (where the document is located);
if it is NULL, this function uses the cache from which the
document was originally committed.

Errors Returned
DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_document_not_found
The document was not found by DOC.

DOC_err_invalid_cache
An invalid cache name was given to DOC.

1036 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_migrate_to_optical_disk()

DOC_err_document_already_migrated
The document that was to be migrated has already been migrated.

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 1037


7 WAL Function Reference
IAFLIB_modify_print()

IAFLIB_modify_print()
IAFLIB_modify_print() modifies print options of a print request. The print
options specified in prt_options_p replace the original request’s print options
(i.e., any print option you specify overwrites the original print option, but the
remainding original print options do not change.) The caller must have write
access to the request.

You may modify print requests that have the status of queued, failed, waiting,
or suspended. Attempting to modify a request with a complete status results
in an error.

Attempting to modify requests with a status of printing, cancelled, or fetching


is allowed only if the modification is to suspend the job (by setting priority to
zero). If the modification to print requests with these three statuses is for
anything else, the modify request is rejected with an error.; the modification
might cause another printer to be assigned in the middle of printing, which
would cause a coordination problem with all of the Print Service’s back end
processes and some of its abstracts. To switch printers or specify another
option that would cause another printer to be selected, cancel and resubmit
the print request.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_modify_print(client_h, print_service_p, job_id,


prt_options_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

job_id DWORD input. Print job to modify. Obtained from IAFLIB_


print_docs() or IAFLIB_print_files() (request_id parameter).

1038 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_modify_print()

prt_options_p PS_options_rec_type * input. Existing options replaced by


those in the structure pointed to by prt_options_p. (Only
specify the options that you want changed.)

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

PRI_err_no_permission
The client does not have valid access for the document or request.

PRI_err_no_such_request
The specified request ID could not be found.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_modify_print2()” on page 1040

“IAFLIB_print_docs()” on page 1051

“IAFLIB_print_files()” on page 1055

“ASE_service_name_typ” on page 178

“PS_options_rec_type” on page 462

December 1996 WAL for Windows Programmer’s Reference Manual 1039


7 WAL Function Reference
IAFLIB_modify_print2()

IAFLIB_modify_print2()
IAFLIB_modify_print2() modifies print options of a print request. This function
provides similar functionality to IAFLIB_modify_print(), but uses the PRI_
print_option_typ2 structure instead of PS_options_rec_type.

The print options specified in prt_options_p replace the original request’s print
options (i.e., any print option you specify overwrites the original print option,
but the remaining original print options do not change). The caller must have
write access to the request.

You can modify print requests with a status of queued, failed, waiting, or
suspended. Attempting to modify a request with a complete status results in
an error.

Attempting to modify requests with a status of printing, cancelled, or fetching


is allowed only if the modification is to suspend the job (by setting priority to
0). If the modification to print requests with these three statuses is for anything
else, the modify request is rejected with an error; the modification might cause
another printer to be assigned in the middle of printing, which would cause a
coordination problem with all of the Print Service’s back end processes and
some of its abstracts. To switch printers or specify another option that would
cause another printer to be selected, cancel and resubmit the print request.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_modify_print2(client_h, print_service_p, job_id,


num_options, prt_options_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the desired Print Service. If NULL, the default Print Service
specified in IAFLIB_logon_user() is used.

job_id DWORD input. The ID of the print job to modify. Returned


from IAFLIB_print_docs1() or IAFLIB_print_files1() (request_
id parameter).

1040 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_modify_print2()

num_options WORD input. Number of options in prt_options_p.

prt_options_p PRI_print_option_typ2 * input. Existing options replaced by


those in the structure pointed to by prt_options_p. (Only
specify the options that you want changed.)

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

PRI_err_no_permission
The client does not have valid access for the document or request.

PRI_err_no_such_request
The specified request ID could not be found.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_modify_print()” on page 1038

“IAFLIB_print_docs1()” on page 1053

“IAFLIB_print_files1()” on page 1057

“ASE_service_name_typ” on page 178

“PRI_print_option_typ2” on page 423

December 1996 WAL for Windows Programmer’s Reference Manual 1041


7 WAL Function Reference
IAFLIB_move_cache_object()

IAFLIB_move_cache_object()
IAFLIB_move_cache_object() copies or moves a cache object to the specified
cache, to an object identified by object_desc. If source_cache_service_p and
dest_cache_service_p point to the same cache name and delete_source is
TRUE, this is a move operation.

For a copy operation, the client must have write permission on the target
cache and read permission on the current cache and the object. For a move
operation, the client must have read and delete permission on the current
cache and object and write permission on the target cache.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_move_cache_object(client_h, doc_id, page,


delete_source, source_cache_service_p, dest_cache_service_p,
object_desc_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. Document number.

page ASE_page_number_typ input. Page number.

delete_source BOOL input. If TRUE, this is a move operation (the source


object is deleted). If FALSE, this is a copy operation (the
source object remains).

source_cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
source Cache Service.

dest_cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the destination Cache Service. This might be the same as the
source Cache Service.

object_desc_p
CSM_object_desc_typ * output. Pointer to a structure
containing CSM object description.

1042 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_move_cache_object()

Notes
If object_desc->id is set to ASE_INVALID_DOC_ID, the service generates a
temporary object descriptor for the object, which is returned in object_desc_p.

If doc_id and page refer to a temporary object, object_desc_p must not refer
to the same object.

If the new object already exists and reference counts are enabled, the
reference count in the destination object is incremented, and no error is
returned.

Errors Returned
For copy operation:

CSM_no_such_cache
CSM_logon, CSM_copy, CSM_move: Unknown cache_id.

For either copy or move operation:

CSM_invalid_session_handle
CSM was given an invalid session handle; the session probably timed
out.

CSM_no_such_object
CSM error: The specified object does not exist in the current cache.

CSM_no_resources
CSM_create: Lack of disk or data base space for the desired
operation.

CSM_IO_error
CSM_read, CSM_write: An IO error was encountered.

CSM_already_exists
CSM: Attempt to create a CSM object that already exists.

CSM_no_permission
The client does not have permission for the requested operation.

See Also
“IAFLIB_get_client_handle()” on page 994

“ASE_page_number_typ” on page 173

December 1996 WAL for Windows Programmer’s Reference Manual 1043


7 WAL Function Reference
IAFLIB_move_cache_object()

“ASE_service_name_typ” on page 178

“CSM_object_desc_typ” on page 224

“FN_docnum_typ” on page 260

1044 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_move_folder()

IAFLIB_move_folder()
IAFLIB_move_folder() moves or copies the specified folder or subtree of
folders. Specify more than one folder with wildcards.

If delete_source is TRUE, this is a move operation and the source folder(s)


are deleted. If delete_source is FALSE, this is a copy operation and the
source folder(s) remain. Document references in the folders are duplicated in
the new folders.

How you specify source determines which folders you get and what part of
their pathname remains in the new folder name.

For example, suppose you have the following folders:

/acct713
/acct713/charges
/acct713/payments
/acct45
/acct45/charges

With a wildcard in a level of the folder pathname, any matching folder that
appears to be at the same level is specified. (Remember these are pseudo-
levels indicated by slashes in the folder name since all folders are really at the
same level. The pathname is really the folder name.)

For example, with source set to “/acct*,” the function moves or copies
/acct713 and /acct45 – BUT NOT /acct713/charges, /acct713/payments, and
/acct45/charges which are at another level.

The name of the new folder(s) starts with the prefix specified by dest. What
follows the prefix comes from the source. It is the part of the pathname that
includes the asterisk wildcard and any parts that follow it. For example, if dest
were “/loans”, the new folder or pathnames would be /loans/acct713 and
/loans/acct45.

If source were “/acct*/”, the folders moved or copied would be /acct713,


/acct713/charges, /acct713/payments, /acct45, and /acct45/charges. Their
new names would be /loans/acct713, /loans/acct713/charges,
/loans/acct713/payments, /loans/acct45, and /loans/acct45/charges.

If source were “/acct713/*”, the folders moved or copied would be


/acct713/charges and /acct713/payments. Their new names would be
/loans/charges and /loans/payments.

December 1996 WAL for Windows Programmer’s Reference Manual 1045


7 WAL Function Reference
IAFLIB_move_folder()

If you are not using wildcards, specify only one folder. In this case, the new
folder name contains dest and the last piece of the pathname in source. For
example, if source is “/acct45/charges” and dest is “/loans,” the new name for
the folder is “/loans/charges.”

You must have read permission to copy the folder and write permission to
move the folder.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_move_folder(client_h, ims_p, source, dest,


delete_source);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the folder. If NULL, the default IMS specified
in IAFLIB_logon_user() is used.

source INX_folder_spec_typ input. Source folder pathname.

dest INX_folder_name_typ input. Destination folder pathname


prefix. (The prefix to attach to the last segment or segments
of the source.)

delete_source BOOL input. If TRUE, the source folder is deleted. If FALSE,


the source folder is moved.

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_bad_folder_name
Invalid folder name.

INX_err_too_deep
An attempt was made to create too many folder levels.

1046 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_move_folder()

INX_err_descendent_dest
You cannot move/copy a folder to its own descendent.

INX_err_other
The real error tuple is a parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“INX_folder_name_typ” on page 369

“INX_folder_spec_typ” on page 370

The sample application in the directory C:\FILENET\SAMPLE\FOLD2\

December 1996 WAL for Windows Programmer’s Reference Manual 1047


7 WAL Function Reference
IAFLIB_prefetch()

IAFLIB_prefetch()
IAFLIB_prefetch() initiates the prefetch of a list of documents from optical disk
to the specified cache. This function is called if the client anticipates requiring
the documents in the near future.

If you set the migrate_flag to FALSE (which we recommend), the prefetch


migrates the specified documents from the OSAR Library to the cache on the
server at a lower priority than the migration initiated by IAFLIB_get_object().
Because of its low priority, there is no guarantee that the prefetch is done –
especially on a busy system. Many clients prefetch overnight or at other not-
so-busy times.

If you set the migrate_flag to TRUE, the migration of the specified documents
is given a higher priority. We do not recommend this as it can interfere with the
migration of documents needed currently.

Prefetching a document does not replace the need for calling IAFLIB_get_
object(). However, it takes less time for IAFLIB_get_object() to find a
prefetched document if the document is already in the cache.

One prefetch call with a large list is better than several prefetch calls with
small lists, as it allows the optical disk selection algorithm to better minimize
the total amount of disk swapping. If an error occurs while prefetching an
individual document, that document is not prefetched, but subsequent
documents are still attempted.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_prefetch(client_h, ims_p, range_count,


ranges_p, cache_service_p, order, migrate_flag, result_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the documents. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

range_count unsigned short input. The number of page ranges in


ranges p.

1048 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_prefetch()

ranges_p ASE_page_range_typ * input. Pointer to an array of page


ranges of documents to prefetch; zero for both the start page
and end page of an element means prefetch the entire
document. If the page range is in reverse order, then the first
and last fields effectively are swapped. If the start page is a
valid page and the end page is zero, it migrates through the
end of the document.

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the Cache Service controlling the cache where the document
will reside. If it is a retrieval cache, the pages might not
remain in the cache; if this name is null, then a default cache
is used for each page range. The default cache used for each
page range is indicated in the corresponding dest_cache
field (see result_h_p below).

order DOC_migrate_order_typ input. The order of the migration of


the pages. Can be one of the following:
DOC_ASCENDING
DOC_DESCENDING
DOC_EXACT_ASCENDING
DOC_EXACT_DESCENDING

migrate_flag FN_BOOL input. If FALSE, prefetch; if TRUE, migrate.

result_h_p HANDLE * output. Pointer to the handle for an array of


IAFLIB_prefetch_result structures, which contain pages_in_
doc, dest_cache, and range_error.

Errors Returned
The error returned by IAFLIB_prefetch() reflects an overall error that caused
the prefetch of all the page ranges to be aborted. The individual errors
indicated in the range_error field of the result_h_p reflect errors obtained
solely on prefetching the corresponding page ranges. Page ranges that did
not have errors are prefetched, even if other page ranges had errors.

DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_document_not_found
The document was not found by DOC.

December 1996 WAL for Windows Programmer’s Reference Manual 1049


7 WAL Function Reference
IAFLIB_prefetch()

DOC_err_invalid_cache
An invalid cache name was given to DOC.

DOC_err_page_out_of_range
Page number out of the range of pages in a document given to DOC.

DOC_err_bad_cache_to_use
The specified cache is invalid to use with the given DOC function.

DOC_err_too_many_prefetches
The number of prefetches specified to DOC is beyond the limit.

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_get_object()” on page 1007

“IAFLIB_logon_user()” on page 1033

“ASE_page_range_typ” on page 174

“ASE_service_name_typ” on page 178

“DOC_migrate_order_typ” on page 246

“IAFLIB_prefetch_result” on page 351

1050 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_print_docs()

IAFLIB_print_docs()
IAFLIB_print_docs() submits a request to print documents or uncommitted
images.

To print a document, provide the document ID (or an array of document IDs).


If you do not specify a Print Service or any print options, the document goes
to a remote printer selected by the default Print Service using the default print
options.

Printing an uncommitted image is similar to printing a document, except you


supply a single image ID instead of a document ID. (You cannot print an array
of image IDs.) Also, specify that the image is from a cache service and identify
which cache service.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_print_docs(client_h, print_service_p,


fax_request, num_docs, prt_options_p, doc_ids_p, request_id_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the Print Service to which this request is sent. If NULL, the
default Print Service specified in the most recent IAFLIB_
logon_user() call is used.

fax_request BOOL input. If TRUE, the request is validated as a fax


request, and is queued for a fax machine rather than a
printer. If FALSE, the request is queued to a printer.

num_docs WORD input. The number of documents to print.

prt_options_p PS_options_rec_type * input. Pointer to print options for the


entire request.

doc_ids_p PRI_doc_specifier_typ * input. Pointer to an array of


document IDs or a single image ID to print. (A PRI_doc_

December 1996 WAL for Windows Programmer’s Reference Manual 1051


7 WAL Function Reference
IAFLIB_print_docs()

specifier_typ data structure specifies a document ID, a range


of pages to be printed, and the source–either Cache or
Document Service.)

request_id_p ASE_request_id_typ * output. Pointer to the ID of a print


request. The request_id returned from IAFLIB_print_docs() is
guaranteed to be unique. All further monitoring or alteration
(including cancellation) of the print request uses this
request ID.

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

PRI_err_no_permission
The client does not have valid access for the document or request.

PRI_err_invalid_option
The Print Service cannot satisfy some of the specified options.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_print_docs1()” on page 1053

“ASE_request_id_typ” on page 176

“ASE_service_name_typ” on page 178

“PRI_doc_specifier_typ” on page 404

“PS_options_rec_type” on page 462

The sample application in the directory C:\FILENET\SAMPLE\GEN\

1052 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_print_docs1()

IAFLIB_print_docs1()
IAFLIB_print_docs1() submits a request to print documents or uncommitted
images. IAFLIB_print_docs1() provides similar functionality to IAFLIB_print_
docs(), but uses the PRI_print_option_typ2 structure instead of PS_options_
rec_type.

To print a document, provide the document ID (or an array of document IDs).


If you do not specify a Print Service or any print options, the document goes
to a remote printer selected by the default Print Service using the default print
options.

Printing an uncommitted image is similar to printing a document, except you


supply a single image ID instead of a document ID. (You cannot print an array
of image IDs.) Also, specify that the image is coming from a cache service
and identify which cache service. Uncommitted images cannot be printed on
a FileNet printer; they must be printed locally.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_print_doc1(client_h, print_service_p,


fax_request, num_docs, num_options, prt_options_p, doc_ids_p,
request_id_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the Print Service to which this request is sent. If NULL, the
default Print Service specified in the most recent IAFLIB_
logon_user() call is used.

fax_request BOOL input. If TRUE, the request is validated as a FAX


request, and is queued for a FAX machine rather than a
printer. If FALSE, the request is queued to a printer.

num_docs WORD input. The number of documents to print.

num_options WORD input. The number of options in prt_options_p.

December 1996 WAL for Windows Programmer’s Reference Manual 1053


7 WAL Function Reference
IAFLIB_print_docs1()

prt_options_p PRI_print_option_typ2 * input. Pointer to print options for the


entire request.

doc_ids_p PRI_doc_specifier_typ * input. Pointer to an array of


document IDs or a single image ID to print. (A PRI_doc_
specifier_typ data structure specifies a document ID, a range
of pages to be printed, and the source–either Cache or
Document Service.)

request_id_p ASE_request_id_typ * output. Pointer to the ID of a print


request. The request_id returned from IAFLIB_print_docs1()
is guaranteed to be unique. All further monitoring or alteration
(including cancellation) of the print request uses this request
ID.

Errors Returned
PRI_err_invalid_session_handle
PRI was given an invalid session handle; the session might have
timed out.

PRI_err_no_permission
The client does not have valid access for the document or request.

PRI_err_invalid_option
The Print Service cannot satisfy some of the specified options.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_print_docs()” on page 1051

“ASE_request_id_typ” on page 176

“ASE_service_name_typ” on page 178

“PRI_doc_specifier_typ” on page 404

“PRI_print_option_typ2” on page 423

1054 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_print_files()

IAFLIB_print_files()
IAFLIB_print_files() prints the contents of a DOS file containing standard
ASCII text (for example, a source program listing). It can print only one file per
call.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_print_files(client_h, print_service_p,


fax_request, num_files, prt_options_p, file_names, request_id_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the Print Service to which this request is sent. If NULL, the
default Print Service specified in the most recent IAFLIB_
logon_user() call is used.

fax_request BOOL input. If TRUE, the request is validated as a fax


request and is queued for a fax machine rather than a printer.
If FALSE, the request is queued to a printer.

num_files WORD input. Number of files to print. Currently, only one file
can be printed per call.

prt_options_p PS_options_rec_type * input. Print options for the request.

file_names PSTR input. Array of file names. Currently, only one file name
can be specified. The directory path is not required. If no path
is specified, it checks the current directory. If the file is not in
the current directory, it searches the whole path.

request_id_p ASE_request_id_typ * output. Pointer to the request ID. The


request_id returned from IAFLIB_print_files() is guaranteed
to be unique. All further monitoring or alteration (including
cancellation) of the print request uses this request ID.

December 1996 WAL for Windows Programmer’s Reference Manual 1055


7 WAL Function Reference
IAFLIB_print_files()

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_print_files1()” on page 1057

“ASE_request_id_typ” on page 176

“ASE_service_name_typ” on page 178

“PS_options_rec_type” on page 462

The sample application in the directory C:\FILENET\SAMPLE\GEN\

1056 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_print_files1()

IAFLIB_print_files1()
IAFLIB_print_files1() prints the contents of a DOS file containing standard
ASCII text (for example, a source program listing). It can print only one file per
call.

IAFLIB_print_files1() provides similar functionality to IAFLIB_print_files(), but


uses the PRI_print_option_typ2 structure instead of PS_options_rec_type.

Syntax
#include <prilib.h>
#include <iaflib.i>

error_typ CALLBACK IAFLIB_print_files1(client_h, print_service_p,


fax_request, num_files, num_options, prt_options_p, file_list, request_id_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

print_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the Print Service to which this request is sent. If NULL, the
default Print Service specified in the most recent IAFLIB_
logon_user() call is used.

fax_request BOOL input. If TRUE, the request is validated as a FAX


request, and is queued for a FAX machine rather than a
printer. If FALSE, the request is queued to a printer.

num_files WORD input. Number of files to print. Currently, only one file
can be printed per call.

num_options WORD input. Number of options in prt_options_p.

prt_options_p PRI_print_option_typ2 * input. Print options for the request.

file_list PSTR input. Array of file names. Currently, only one file name
can be specified. The directory path is not required. If no path
is specified, it checks the current directory. If the file is not in
the current directory, it searches the whole path.

December 1996 WAL for Windows Programmer’s Reference Manual 1057


7 WAL Function Reference
IAFLIB_print_files1()

request_id_p ASE_request_id_typ * output. Pointer to the request ID. The


request_id returned from IAFLIB_print_files1() is guaranteed
to be unique. All further monitoring or alteration (including
cancellation) of the print request uses this request ID.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_print_files()” on page 1055

“ASE_request_id_typ” on page 176

“ASE_service_name_typ” on page 178

“PRI_print_option_typ2” on page 423

1058 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_put_annotation()

IAFLIB_put_annotation()
IAFLIB_put_annotation() creates or modifies an annotation.

Creating an Annotation
Creating an annotation means associating a new annotation with a page of an
existing document. Append/execute permission on the document is required
in order to annotate it.

To create an annotation, set style to ILIB_ANO_CREATE. On return, annot_


desc_p->annotId contains the ID of the new annotation. When creating an
annotation, the docId and page fields of annot_desc_p are used. IAFLIB_put_
annotation() always sets the access restrictions of new annotations to match
those of the document.

Modifying an Annotation
If style is not set to ILIB_ANO_CREATE, IAFLIB_put_annotation() modifies
the annotation. Modifying an annotation replaces an existing annotation with a
new one.

To modify an annotation, change its description (pointed to by annot_desc_p).


Usually, this is within the block returned in annot_h_p by IAFLIB_get_
annotations(). The doc_id, page and annot_id fields are used. All other fields
are ignored. Both read and write access are required to modify an annotation.

IAFLIB_put_annotation() never changes the access restrictions when


updating annotations.

When modifying, the following styles are available. These styles can also be
combined using the bitwise OR operator:

ILIB_ANO_OVERRIDE
If set, IAFLIB_put_annotation() uses override, if needed, to get and
lock the annotation. An existing lock on the annotation is released and
the lock is granted to the current caller. Applications should set this bit
only with confirmation by the user.

ILIB_ANO_REPORT_CHANGE
If set, this bit tells IAFLIB_put_annotation() to compare the current
annotation with the original and return IAFLIB_annotation_changed if
they differ. It compares the current annotation’s annot_len and annot
fields to the original annotation’s fields and updates them with the
current value of the annotation. (Virtually all applications should use

December 1996 WAL for Windows Programmer’s Reference Manual 1059


7 WAL Function Reference
IAFLIB_put_annotation()

ILIB_ANO_REPORT_CHANGE so they can let the user know a


change has been made.)

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_put_annotation(client_h, ims_p, annot_desc_p,


annot, annot_len, style);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

annot_desc_p DOC_annotation_desc_typ * input/output. Pointer to a data


structure, which describes an annotation.

annot PSTR input. The new annotation.

annot_len WORD input. Length of the new annotation.

style WORD input. Word specifying the action to take. Can be


ILIB_ANO_CREATE, ILIB_ANO_OVERRIDE, or ILIB_ANO_
REPORT_CHANGE. (See “Creating an Annotation” on
page 1059 and “Modifying an Annotation” on page 1059 for
descriptions of these styles.)

Errors Returned
For create annotation:

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

1060 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_put_annotation()

DOC_err_document_not_found
Document not found by DOC.

DOC_err_page_out_of_range
Page number out of the range of pages in a document given to DOC.

DOC_err_annotation_too_large
The annotation given to DOC is too large.

DOC_err_no_permission
No permission to perform specified DOC function.

DOC_err_invalid_security
Invalid security given to DOC.

For modify annotation:

DOC_err_other_error
An error other than the standard DOC error reported in the protocol
occurred (a bug in DOC).

DOC_err_invalid_session_handle
DOC was given an invalid session handle; the session probably timed
out.

DOC_err_annotation_not_found
Annotation not found by DOC.

DOC_err_annotation_busy
DOC annotation is busy being updated by another client.

DOC_err_no_permission
No permission to perform specified DOC function.

DOC_err_annotation_not_busy
Annotation not busy when override was requested of DOC. If the
annotation is not currently locked and OVERRIDE is set, this error is
returned.

DOC_err_document_not_found
Document not found by DOC.

DOC_err_annotation_too_large
Annotation given to DOC is too large.

December 1996 WAL for Windows Programmer’s Reference Manual 1061


7 WAL Function Reference
IAFLIB_put_annotation()

DOC_err_no_capability
No capability for updating the given item through DOC.

DOC_err_invalid_security
Invalid security given to DOC.

See Also
“IAFLIB_get_annotations()” on page 990

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“DOC_annotation_desc_typ” on page 232

The sample application in the directory C:\FILENET\SAMPLE\GEN\

1062 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_put_object()

IAFLIB_put_object()
IAFLIB writes the data to the cache object, which must already exist, or
updates the object’s attributes, or both. The client must have write permission
on the object and the cache.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_put_object(client_h, doc_id, page, offset,


object_size, cache_service_p, data_h, new_attrs_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. Document ID. This, along with page


and an IAF-supplied ssn, uniquely identifies the object in the
cache that you want to open for write/update.

page ASE_page_number_typ input. Page number. See doc_id


above.

offset DWORD input. The offset at which to write the data.

object_size DWORD input. The number of bytes to write. If non-zero, then


the data is written at the specified offset.

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
desired Cache Service.

data_h HANDLE. Handle indicating where the data to be written to


the object is located.

new_attrs_p CSM_object_attr_typ * input. Pointer to the new attributes for


the object. If NULL, no attribute update is done. Otherwise,
the object’s attributes are updated to the values pointed to by
new_attrs_p. (Note that the max_length attribute can only be
modified using IAFLIB_resize_cache_object().)

December 1996 WAL for Windows Programmer’s Reference Manual 1063


7 WAL Function Reference
IAFLIB_put_object()

Errors Returned
For write:

CSM_invalid_session_handle
CSM given invalid session handle; session probably timed out.

CSM_no_such_object
CSM error: The specified object does not exist in the current cache.

CSM_invalid_object_handle
FATAL CSM ERROR: An invalid object handle has been encountered.

CSM_object_busy
CSM error: The operation specified cannot get necessary access.

If exclusive access cannot be acquired (because other clients already


hold shared or exclusive access), the service waits a short (to be
determined) amount of time, and if the requested access still cannot
be acquired, then the service returns this error.

CSM_no_permission
The client does not have permission for the requested operation.

CSM_out_of_range
CSM_write, CSM_read: Attempt to read/write beyond end of object.

If the client attempts to write off the end of the allocated space for an
object, this error is returned, and no write takes place.

CSM_IO_error
CSM_read, CSM_write: An IO error was encountered.

CSM_other_error
CSM error: Catchall for other errors encountered inside CSM.

For modify attributes:

CSM_other_error
CSM error: Catchall for other errors encountered inside CSM.

CSM_invalid_session_handle
CSM given invalid session handle; session probably timed out.

CSM_no_such_object
CSM error: The specified object does not exist in the current cache.

1064 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_put_object()

If exclusive access cannot be acquired (because other clients already


hold shared or exclusive access), the service waits a short (to be
determined) amount of time, and if the requested access still cannot
be acquired, then the service returns this error.

CSM_object_busy
CSM error: The operation specified cannot get necessary access.

CSM_no_permission
The client does not have permission for the requested operation.

CSM_no_ageable_docs
An attempt was made to put an ageable document into a cache, but
this cache is not configured to allow ageable documents.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_resize_cache_object()” on page 1074

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“CSM_object_attr_typ” on page 222

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 1065


7 WAL Function Reference
IAFLIB_query_db()

IAFLIB_query_db()
IAFLIB_query_db() performs an Index Database Query.

You can specify a maximum number of matched records per call. If the query
returns less than the maximum number of records, the query is complete and
automatically terminates.

If the query returns the maximum number of records, the function sets the
more_p parameter to TRUE, indicating that there are more records. In this
case, use IAFLIB_continue_query() to retrieve further matches from the
previous query specification.

Unlike other IAF functions, when the query is not yet complete (more_p
parameter returns TRUE), the call maintains a continuous network connection
to the server. This holds a limited resource on FileNet servers.

Also, until the query is completed, the connection remains open and the client
handle (client_h) used to start up the connection remains in use. Continue the
query using IAFLIB_continue_query().

To start another INXs resource connection (e.g., call IAFLIB_get_folder_


attrs()), define and use another IAFLIB client handle. If you use the same
IAFLIB client handle (client_h) to start another INXs resource connection, the
INX connection for the query is terminated.

Note that the Index Service searches in a forward (increasing key values)
direction.

If the IAFLIB_query_db() or IAFLIB_continue_query() calling sequence does


not complete the query (the more_p parameter returns TRUE), use IAFLIB_
terminate_query() to terminate the connection and free the resources.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_query_db(client_h, ims_p, folder_spec,


folder_state, doc_state, max_matches, key_cond, filter_cond, more_p,
num_matches_p, dirs_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

1066 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_query_db()

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


IMS to query. If NULL, the default IMS specified in IAFLIB_
logon_user() is used.

folder_spec PSTR input. The folder in which the document index record
was filed. Can include wildcards to search multiple folders.

folder_state INX_closed_typ input. Can be INX_CL_ACTIVE, INX_CL_


CLOSED, or INX_CL_ALL.

doc_state INX_closed_typ input. Can be INX_CL_ACTIVE, INX_CL_


CLOSED, or INX_CL_ALL.

max_matches WORD input. Maximum number of matches to return.

key_cond PSTR input. Null terminated key condition string.

filter_cond PSTR input. Null terminated filter condition string.

more_p FN_BOOL * output. Pointer to a boolean which is FALSE if


there are no more entries, TRUE if there are more entries.

num_matches_p
WORD * output. Pointer to the number of matches being
returned.

dirs_h_p HANDLE * output. Pointer to the handle for the array of INX_
query_match_typ structures.

Specifying the Key and Filter Condition


The following paragraphs explain:

• The difference between system indexes and user indexes

• The relationship between retrieval key indexes and non-retrieval key


indexes

• The relationship between the key condition and filter conditions

• How to specify a key condition

• How to specify a filter condition

December 1996 WAL for Windows Programmer’s Reference Manual 1067


7 WAL Function Reference
IAFLIB_query_db()

System Indexes vs. User Indexes


There are two types of indexes: system and user. System indexes are
common across all document index records. Most of them are set implicitly
when the record is inserted or updated. User indexes are supplied by the user
and are typically used to hold application-dependent information about
documents.

You can specify the following system indexing fields in the filter conditions:

F_DOCNUMBER
F_DOCCLASSNUMBER
F_DOCCLASSNAME
F_ARCHIVEDATE
F_DELETEDATE
F_ENTRYDATE
F_RETENTOFFSET
F_PAGES
F_DOCTYPE
F_RETENTBASE
F_RETENTDISP
F_ACCESSRIGHTS
F_CLOSED

Key and Filter Indexing Fields


Some indexes are defined as retrieval keys. There are three system indexing
fields that are defined as retrieval keys: F_ARCHIVEDATE, F_DELETEDATE,
and F_DOCNUMBER. User-defined indexing fields can be defined as
retrieval keys when you define user indexes.

Document indices can also be classified as retrieval keys (key indexing fields)
and non-retrieval keys (filter indexing fields). Retrieval keys are a subset of
non-retrieval keys. All key indexing fields can be used as filter indexing fields.
Retrieval key indexes are stored separately in a B-tree so that you can filter
the whole database quickly.

Call RDD_get_valid_ixs() to get all the valid filter indexing fields and call
RDD_get_valid_keyixs() to get all the valid key indexing fields.

Key and Filter Conditions


Both the key condition and the filter conditions are optional. The key condition
is evaluated before the filter condition. The key condition is connected to the

1068 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_query_db()

filter condition by a logical AND operator. If a key condition fails to find a


document, the filter condition is not evaluated.

Key and filter conditions can be entered without spaces or can be surrounded
by any number of spaces for easier reading. Key and filter values are not
casesensitive. They can be entered in lower, upper, or mixed case.

The key condition (key_cond) is a NULL-terminated string that contains:

<key> <key operator> <key value>

or

<key> IN RANGE <low_op> <lower bound> <hi_op> <upper bound>

where

<key> is the key indexing field (e.g. F_DOCNUMBER, etc.)

<key operator> is a relative operator: “<”, “<=”, “=”, “>=”, “>”.

<low_op> is “>” or “>=”.

<hi_op> is “<“ or “<=”.

<key value>, <lower bound>, and <upper bound> are constant strings or
numbers.

Examples of Key Conditions


1) Retrieve documents that have IDs that are greater than 200400.

"F_DOCNUMBER > 200400"

2) Retrieve documents that have a deletion date before or equal to August 15,
1992 (assuming that ‘mm/dd/yyyy’ is the system default mask).

"F_DELETEDATE <= '8/15/1992'"

3) Retrieve documents that have IDs that are greater or equal to 200000 and
less than 200500.

"F_DOCNUMBER IN RANGE >= 200000 < 200500"

December 1996 WAL for Windows Programmer’s Reference Manual 1069


7 WAL Function Reference
IAFLIB_query_db()

The filter condition (filter_cond) is a NULL-terminated string that contains a


series of simple conditions (filter indexing field, relative operator, and filter
values) joined by logical operators. Parentheses can be used as delimiters.

The relative operators that can be used in filter conditions are:

< less than


<= less than or equal to
= equal to
!= not equal to
<> not equal to
>= greater than or equal to
> greater than
LIKE string pattern match
NOT LIKE string pattern mismatch

During the string pattern matching, the asterisk (*) matches one or more
characters, and the question mark (?) matches one character.

The logical operators that can be used in filter conditions are:

OR inclusive or
AND conjunction
NOT logical negation (unary operator)

The precedence (from low to high) of the operators is as follows:

1) OR
2) AND
3) NOT
4) <, <=, =, !=, <>, >=, >, LIKE, NOT LIKE

Examples of Filter Conditions


1) Retrieve documents that have a city field with a value of Los Angeles and
zip code field with a value of either 90012 or 90013 (assuming that City and
Zip are user-defined indexing fields).

"City = 'Los Angeles' AND (Zip = 90012 OR Zip = 90013)"

2) Retrieve documents that have a title field with the word romance. The word
romance can be at the beginning, at the middle, or at the end (assuming that
Title is user- defined indexing field).

"Title LIKE '*romance*'"

1070 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_query_db()

3) Retrieve documents that have a state field with a value of neither New York
nor California (assuming that State is user- defined indexing field).

"NOT (State = 'New York' OR State = California)"

4) Retrieve documents that belong to ‘general’ document class.

"F_DOCCLASSNAME = 'general'"

5) Retrieve documents that belong to image type IMAGE.

"F_DOCTYPE = IMAGE"

You can also retrieve the following document types:

TEXT
FORM
MIXED
OTHER

See Also
“IAFLIB_continue_query()” on page 963

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“IAFLIB_terminate_query()” on page 1076

“RDD_get_valid_ixs()” on page 1111

“RDD_get_valid_keyixs()” on page 1112

“ASE_service_name_typ” on page 178

“INX_closed_typ” on page 357

“INX_query_match_typ” on page 374

The sample applications in the directories C:\FILENET\SAMPLE\FOLD2\ and


C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 1071


7 WAL Function Reference
IAFLIB_reorder_folder()

IAFLIB_reorder_folder()
IAFLIB_reorder_folder() reorders documents in a specified folder by putting
the doclist after the document specified by after_doc.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_reorder_folder(client_h, ims_p, folder_name,


folder_id, after_doc, num_docs, doclist);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS where the document is stored. If NULL, the default
IMS specified in IAFLIB_logon_user() is used.

folder_name PSTR input. Folder name. If folder_id is zero, folder_name is


used.

folder_id FN_folnum_typ input. Folder ID to use or zero. If zero, folder_


name is used.

after_doc FN_docnum_typ input. Document ID after which doclist will


be placed. Specify FN_UNDEF_FOLDER to put the doclist at
the beginning of the folder. Specify FN_MAX_FOLDER to put
the doclist at the end of the folder.

num_docs WORD input. Number of documents in the doclist.

doclist FN_docnum_typ * input. A sorted array of document IDs to


be placed after after_doc.

Note This function requires Series 6000 software version 3.0 or later.

1072 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_reorder_folder()

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_folder
The specified folder does not exist.

INX_err_not_in_folder
The document is not filed in the specified folder.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

“FN_folnum_typ” on page 261

December 1996 WAL for Windows Programmer’s Reference Manual 1073


7 WAL Function Reference
IAFLIB_resize_cache_object()

IAFLIB_resize_cache_object()
IAFLIB_resize_cache_object() enables the client to modify the max_length
attribute of an object. The object must be closed and the client must have
write permission on the object. new_size cannot be less than the object’s
current length; however the client can explicitly set the current length lower
using IAFLIB_put_object().

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_resize_cache_object(client_h, doc_id, page,


cache_service_p, new_size);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

doc_id FN_docnum_typ input. Document ID. This, along with page


and an IAF-supplied ssn, uniquely identifies the object in
cache that you want to resize.

page ASE_page_number_typ input. Page number. See doc_id


above.

cache_service_p
ASE_service_name_typ * input. Pointer to the NCH name for
the desired Cache Service.

new_size DWORD input. The new size of the cache object (number of
bytes).

Errors Returned
CSM_invalid_session_handle
CSM was given an invalid session handle; the session probably timed
out.

CSM_no_such_object
CSM error: The specified object does not exist in the current cache.

CSM_no_permission
The client does not have permission for the requested operation.

1074 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_resize_cache_object()

CSM_object_busy
CSM error: The operation specified cannot get necessary access.

CSM_no_resources
CSM_create: Lack of disk or data base space for the desired
operation.

CSM_other_error
CSM error: Catchall for other errors encountered inside CSM.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_put_object()” on page 1063

“ASE_page_number_typ” on page 173

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

December 1996 WAL for Windows Programmer’s Reference Manual 1075


7 WAL Function Reference
IAFLIB_terminate_query()

IAFLIB_terminate_query()
IAFLIB_terminate_query() interrupts a query or continuation that is in
progress. If an incomplete query has been made for the client, IAFLIB_
terminate_query() terminates it, which frees resources on the Index server.

For more information, see “IAFLIB_query_db()” on page 1066.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_terminate_query(client_h);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_query
No query in progress.

INX_err_other
Real error tuple is parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

1076 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_unfile_docs()

IAFLIB_unfile_docs()
IAFLIB_unfile_docs() unfiles a list of documents from a specified folder. If
folder_id is zero, folder_name is used. Note that unfiling a document does not
delete the document index record itself; it deletes only the reference to it in the
specified folder.

If you have Series 6000 3.0 or later, we recommend that you use IAFLIB_
unfile_docs() instead of IAFLIB_file_doc() with file_flag set to FALSE.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_unfile_docs(client_h, ims_p, folder_name,


folder_id, num_docs, doclist, untab_doc);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS where the document is stored. If NULL, the default
IMS specified in IAFLIB_logon_user() is used.

folder_name PSTR input. Folder name. If folder_id is zero, folder_name is


used.

folder_id FN_folnum_typ input. Folder ID to use or zero. If zero, folder_


name is used.

num_docs WORD input. Number of documents in the doclist.

doclist FN_docnum_typ * input. An array of document IDs to be


unfiled.

untab_doc FN_BOOL. Not currently used. Always specify FALSE.

Note This function requires Series 6000 software version 3.0 or later.

December 1996 WAL for Windows Programmer’s Reference Manual 1077


7 WAL Function Reference
IAFLIB_unfile_docs()

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_file_doc()” on page 978

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

“FN_folnum_typ” on page 261

1078 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_update_db()

IAFLIB_update_db()
IAFLIB_update_db() closes a document or changes the index values of an
existing document index record, or both. The record is identified by doc_id.

If dir_p is not NULL, dir_p points to the new version of the document index
record. Indices present in the record are set to the values given. Missing
indices are not changed. Indices can be set to null by giving a value type of
null. dir_p can be NULL if only the close operation is desired.

If new_dir_h_p is not NULL, the updated document index record is retrieved


and a handle for it is returned through new_dir_h_p. new_dir_h_p can be
NULL if the client has no use for the updated document index record.

When updating, if the ILIB_DIR_OVERRIDE bit is set in style, IAFLIB uses


override, if needed, to lock the document index record. Applications should
only set this bit with confirmation by the user.

If the ILIB_DIR_CLOSE bit is set in style, IAFLIB_update_db() closes the


document specified by doc_id. If only the close operation is required, dir_p
and new_dir_h_p can be NULL. When you close a document, its retention
base is set relative to closing and the archive or delete date is set to the
current date plus the retention offset, rendering the document closed.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_update_db(client_h, ims_p, doc_id, dir_p, style,


new_dir_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. Document number.

dir_p INX_doc_index_rec_typ * input. Pointer to the new version of


the document index record. Can be NULL if closing only. You
must include the document ID in the list of indices being

December 1996 WAL for Windows Programmer’s Reference Manual 1079


7 WAL Function Reference
IAFLIB_update_db()

updated; the list of indices is specified by the values field of


the INX_doc_index_rec_typ structure.

style unsigned short input. Can be ILIB_DIR_OVERRIDE, ILIB_


DIR_CLOSE, or neither.

new_dir_h_p HANDLE * output. Pointer to the handle for the updated


document index record (an INX_dir_typ structure). Can be
NULL if you have no use for the updated document index
record.

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_capability
No capability (lock) obtained for operation.

INX_err_no_record
The requested record was not found.

INX_err_no_permission
Permission denied.

INX_err_other
Real error tuple is parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

“INX_dir_typ” on page 362

“INX_doc_index_rec_typ” on page 364

The sample application in the directory C:\FILENET\SAMPLE\DOCUMENT\

1080 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_update_folder()

IAFLIB_update_folder()
IAFLIB_update_folder() changes the attributes of a folder or closes a folder, or
both. It updates folder_desc for the folder specified by the id field in folder_
desc.

If style is ILIB_FOLDER_OVERRIDE, IAFLIB_update_folder() uses override,


if needed, to lock the folder. Applications should set this bit only with
confirmation by the user.

If style is ILIB_FOLDER_CLOSE, the folder is closed. The retention base is


set relative to closing and the archive or delete date is set to the current date
plus the retention offset, rendering the folder closed.

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_update_folder(client_h, ims_p, style, folder_


desc_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the folder. If NULL, the default IMS specified
in IAFLIB_logon_user() is used.

style WORD input. ILIB_FOLDER_CLOSE, ILIB_FOLDER_


OVERRIDE, or both (OR-ed) or neither (zero). If ILIB_
FOLDER_CLOSE is present, the folder is closed. In this
case, only the id field of folder_desc is used. Otherwise, it is
updated.

folder_desc_p
INX_folder_desc_typ * input. Pointer to a data structure that
contains the new attributes of the folder.

December 1996 WAL for Windows Programmer’s Reference Manual 1081


7 WAL Function Reference
IAFLIB_update_folder()

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_capability
No capability (lock) obtained for operation.

INX_err_no_record
The requested record was not found.

INX_err_no_permission
Permission denied.

INX_err_other
Real error tuple is parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

“INX_folder_desc_typ” on page 367

1082 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IAFLIB_where_filed()

IAFLIB_where_filed()
IAFLIB_where_filed() returns an array of FN_folnum_typ folder IDs (in
folders_h_p) that contain the given document (doc_id).

Syntax
#include <iaflib.i>

error_typ CALLBACK IAFLIB_where_filed(client_h, ims_p, doc_id,


num_folders_p, folders_h_p);

Parameters
client_h HANDLE input. Handle obtained from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the IMS storing the document. If NULL, the default IMS
specified in IAFLIB_logon_user() is used.

doc_id FN_docnum_typ input. The identifier of the document.

num_folders_p
WORD * output. Pointer to the number of folders returned in
folder_h_p.

folders_h_p HANDLE * output. Pointer to a handle for an unordered array


of folder IDs in which the document is filed.

Errors Returned
INX_err_invalid_handle
Invalid session handle.

INX_err_no_record
The requested record was not found.

INX_err_other
Real error tuple is parameter to this protocol error.

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_logon_user()” on page 1033

December 1996 WAL for Windows Programmer’s Reference Manual 1083


7 WAL Function Reference
IAFLIB_where_filed()

“ASE_service_name_typ” on page 178

“FN_docnum_typ” on page 260

The sample application in the directory C:\FILENET\SAMPLE\DOCUMENT\

1084 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IMGFMT_cmp_tiff()

IMGFMT_cmp_tiff()
IMGFMT_cmp_tiff() compresses the TIFF image data in the source file. This
function is usually used within a loop to compress the image one band at a
time.

This function is not supported yet.

Syntax
#include <imgfmt.i>

int CALLBACK IMGFMT_cmp_tiff(source, line_size, destination, mode);

Parameters
source PSTR input. Name of source file.

line_size int input. Size of data to compress.

destination PSTR output. Name of destination file.

mode int. Mode is unused and might be zero.

December 1996 WAL for Windows Programmer’s Reference Manual 1085


7 WAL Function Reference
IMGFMT_compress()

IMGFMT_compress()
IMGFMT_compress() compresses num_lines lines of image data into FileNet
format.

The resolution of the source and destination images is assumed to be


100 dpi.

Syntax
#include <imgfmt.i>

int CALLBACK IMGFMT_compress(num_lines, source, line_size, destination,


mode);

Parameters
num_lines WORD input. Number of scan lines to compress.

source PSTR input. Pointer to the source buffer.

line_size int input. Size of line to compress (must be even number of


bytes).

destination PSTR output. Pointer to the destination buffer. Allocate


memory large enough to hold the compressed data.

mode int input. Mode is first band flag. If mode is non-zero, an extra
EOL is added at the beginning of the compressed data.

1086 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IMGFMT_convert_image()

IMGFMT_convert_image()
IMGFMT_convert_image() converts an image file from source format to dest
format. Formats are defined in IMGFMT.I. See Chapter 5, “Image Formats,”
on page 135 for more information about FileNet image formats.

Use IMGFMT_convert_image_custom() to handle JPEG and any other


conversion. IMGFMT_convert_image() cannot handle JPEG conversions.

The resolution of the destination will be the same as that of the source. If the
information about the resolution of the source is missing from the header of
the source file (bitmaps, JPEGs), the resolution is assumed to be 100 dpi.

When converting to TIFF group 3 FAX images, your result might be an A-size
image.

Note We’ve tested the conversions listed in the tables below for A-size images.
Many larger images work, but some do not. JPEG conversions are a function
of IMGFMT_convert_image_custom().

Syntax
#include <imgfmt.i>

error_typ CALLBACK IMGFMT_convert_image(source_p, destination_p);

Parameters
source_p IMGFMT_desc_typ * input. Pointer to structure containing
information about the source image.

destination_p
IMGFMT_desc_typ * input. Pointer to a structure containing
information about what to convert the source image to.

The following three tables explain the image formats and conversion
possibilities.

December 1996 WAL for Windows Programmer’s Reference Manual 1087


7 WAL Function Reference
IMGFMT_convert_image()

Valid input for source formats is shown in the following table:

Constant Value Description


IMGFMT_FILENET 1 FileNet banded Group 3, Group 4, Raw, or
Reduced image format. The constants for
these image formats are:
IMGFMT_FILENET_RAW 3
IMGFMT_FILENET_G3 4
IMGFMT_FILENET_G4 5
IMGFMT_TIFF 2 Compression tag in TIFF header of Raw,
Group 3, Group 4, or fax Group 3 image
format. The constants for these image
formats are:
IMGFMT_TIFF_1 6
IMGFMT_TIFF_2_G3 7
IMGFMT_TIFF_2_G4 8
IMGFMT_TIFF_3_G3 9
IMGFMT_TIFF_3C_G3 16
IMGFMT_DIB 20 Windows 3 device independent bitmap
format.
IMGFMT_PCX 11 Windows PCX format.
IMGFMT_MSP 13 Windows Microsoft Paint format.
IMGFMT_BMP 14 Windows 2 bitmaps format.
IMGFMT_JPEG * 21 JPEG format

* Indicates new in WAL 4.0. JPEG functions require IMGFMT_convert_


image_custom().

Note Use 1 (IMGFMT_FILENET) to input source format 3, 4, and 5.

Use 2 (IMGFMT_TIFF) to input source format 6, 7, 8, 9, and 16.

1088 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IMGFMT_convert_image()

Valid input for destination formats follows:

Constant Value Description


IMGFMT_FILENET_RAW 3 FileNet image containing raw bands.
IMGFMT_FILENET_G3 4 FileNet image containing Group 3 bands.
IMGFMT_FILENET_G4 5 FileNet image containing Group 4 bands.
Currently, convert to this image format is
not implemented yet.
IMGFMT_TIFF_1 6 Compression tag in TIFF header of Raw
image.
IMGFMT_TIFF_2_G3 7 Compression tag in TIFF header of Group
3 compressed image.
IMGFMT_TIFF_2_G4 8 Compression tag in TIFF header of Group
4 compressed image.
IMGFMT_TIFF_3_G3 9 Compression tag in TIFF header of fax
Group 3 compressed image.
IMGFMT_TIFF_3C_G3 16 Compression tag in TIFF header of fax
Group 3 compressed, coarse mode
image.
IMGFMT_DIB 20 Windows 3 device independent bitmap
image.
IMGFMT_PCX 11 Windows PCX image. Conversion from
image type 11 to type 3 (FileNet Raw) is
not supported.
IMGFMT_MSP 13 Windows Microsoft Paint image.
IMGFMT_BMP 14 Windows 2 bitmaps image.
IMGFMT_JPEG* 21 JPEG image.

* Indicates new in WAL 4.0. Useable only with IMGFMT_convert_image()

Note As shown in the following table,

Use 1 (IMGFMT_FILENET) to input source format 3, 4, and 5.

Use 2 (IMGFMT_TIFF) to input source format 6, 7, 8, 9, and 16.

December 1996 WAL for Windows Programmer’s Reference Manual 1089


7 WAL Function Reference
IMGFMT_convert_image()

In the following table of possible image conversions, the column on the left
lists the source formats and the top row lists the destination formats.

Constant 3 4 5 6 7 8 9 16 17 20 11 13 14 21
IMGFMT_FILENET 1
IMGFMT_FILENET_RAW 3 Y 101 Y Y Y Y Y Y Y Y Y Y Y
IMGFMT_FILENET_G3 4 Y 101 Y Y Y Y Y Y Y Y Y Y Y
IMGFMT_FILENET_G4 5 Y Y Y Y Y Y Y Y Y Y Y Y Y
IMGFMT_TIFF2
IMGFMT_TIFF_1 or 6 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_TIFF_RAW
IMGFMT_TIFF_2_G3 or 7 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_TIFF_G3_CMP2
IMGFMT_TIFF_2_G4 or 8 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_TIFF_G4
IMGFMT_TIFF_3_G3 or 9 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_TIFF_G3_FAX
IMGFMT_TIFF_3C_G3 or 16 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_TIFF_G3_FAX_COARSE
IMGFMT_TIFF_G3_CMP3* 17 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMG_FMT_DIB 20 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_PCX 11 101 Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_MSP 13 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_BMP 14 Y Y 101 Y Y Y Y Y Y Y Y Y Y
IMGFMT_JPEG* 21 Y Y 101 Y Y Y Y Y Y Y Y Y Y

Table Legend
* means for WAL 4.0 only. JPEG useable only with IMGFMT_convert_
image().
Y means Yes.
100 means return error <201, 0, 100> Conversion not supported, or for WAL
3.1, no error is returned. The result of the conversion is a FileNet group 3
image rather than a FileNet group 4 image.

1090 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IMGFMT_convert_image()

Note Use 1 (IMGFMT_FILENET) to input source format 3, 4, and 5.


Use 2 (IMGFMT_TIFF) to input source format 6, 7, 8, 9, and 16.

See Also
“IMGFMT_convert_image_custom()” on page 1092

“IMGFMT_desc_typ” on page 356

Chapter 5, “Image Formats,” on page 135

December 1996 WAL for Windows Programmer’s Reference Manual 1091


7 WAL Function Reference
IMGFMT_convert_image_custom()

IMGFMT_convert_image_custom()
IMGFMT_convert_image_custom() converts an image file from the source
format to the destination format. This function handles JPEG and any other
conversion and can be used instead of IMGFMT_convert_image(), which
does not handle JPEG conversions. IMGFMT.I defines formats.

See Chapter 5, “Image Formats,” on page 135 for more information about
FileNet image formats.

The resolution of the destination is the same as that of the source. If


information about the resolution of the source is missing from the header of
the source file (bitmaps, JPEGs), the resolution is assumed to be 100 dpi.

When converting to TIFF group 3 FAX images, your result might be an A-size
image.

Syntax
#include <imgfmt.i>

error_typ CALLBACK IMGFMT_convert_image(source_p, destination_p,


custom_params);

Parameters
source_p IMGFMT_desc_typ * input. Pointer to structure containing
information about the source image.

destination_p
IMGFMT_desc_typ * input. Pointer to a structure containing
information about what to convert the source image to.

custom_params
IMGFMT_custom_typ * input. Pointer to a structure
containing any custom parameters needed. For example,
JPEG luminance can be set for conversion to JPEG format.

See “IMGFMT_convert_image()” on page 1087 for tables that explain the


image formats and conversion possibilities.

Note We’ve tested the conversions listed in the tables for A-size images. Many
larger images work, but some do not.

1092 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
IMGFMT_convert_image_custom()

See Also
“IMGFMT_convert_image()” on page 1087

“IMGFMT_custom_typ” on page 354

“IMGFMT_desc_typ” on page 356

Chapter 5, “Image Formats,” on page 135

December 1996 WAL for Windows Programmer’s Reference Manual 1093


7 WAL Function Reference
QMR_build_doc_list()

QMR_build_doc_list()
QMR_build_doc_list() allocates and fills a structure that contains a list of the
selected documents for printing or displaying. The list is allocated as
shareable and non-bankable, so it is suitable for use in DDE.

Syntax
#include <qmr.i>

error_typ CALLBACK QMR_build_doc_list(wnd_h, list_h_p, count_p);

Parameters
wnd_h HWND input. QMR window handle.

list_h_p PHANDLE output. Pointer to the handle for a DS_LIST


structure.

count_p PINT output. Pointer to the number of selected matches.

1094 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
QMR_create_match_window()

QMR_create_match_window()
QMR_create_match_window() invokes the Query Match Report interface,
which shows the results of a query against the Index Database. This function
creates an asynchronous window and requires subclassing to trap
terminators. The function QMR_select_match() is recommended.

From the user interface, the user can print the match report on a local printer,
continue the query, file and unfile documents, delete documents, perform
folder management, and modify user indices.

Syntax
#include <qmr.i>

error_typ CALLBACK QMR_create_match_window(client_h, ims_p, parent_h,


num_matches, more, dirs_h, title, allow_filing, max_select, free_dirs,
softkey_h, key_count, dialog_h_p, dialog_id, qmr_info_h_p);

Parameters
client_h HANDLE input. IAFLIB client handle from IAFLIB_get_client_
handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the desired IMS. Can be NULL to use the default IMS.

parent_h HWND input. Handle for the parent window.

num_matches int input. Number of document index records (typically


obtained from IAFLIB_query_db()).

more BOOL input. If FALSE, there are no more entries. This value
is usually obtained from IAFLIB_query_db().

dirs_h HANDLE input. Handle for the list of document index records
(typically obtained from IAFLIB_query_db()). This handle is
freed by QMR_create_match_window() and should not be
freed or used by the caller on return from QMR_create_
match_window().

title PSTR input. The text that appears in the caption bar of the
QMR window.

allow_filing BOOL input. Allow filing into or unfiling from folders.

December 1996 WAL for Windows Programmer’s Reference Manual 1095


7 WAL Function Reference
QMR_create_match_window()

max_select int input. Maximum number of QMR entries the user can
select. If max_select is -1, the number of selections is
unlimited.

free_dirs BOOL input. Free the memory allocated to the DIRs after
formatting the report.

softkey_h HANDLE input. Handle for a list of softkeys.

key_count int input. Number of softkeys in softkey_h.

dialog_h_p HWND * input. Pointer to the status dialog box window


handle. Can be obtained from the Windows SDK function
CreateDialog or can be NULL. When used, must be used
with dialog_id. Shows “Formatting” message for the user.

dialog_id int input. ID of where to place the message in the status


dialog box. Can be NULL. When used, must be used with
dialog_h_p. Shows “Formatting” message for the user.

qmr_info_h_p HANDLE * output. Pointer to a handle for QMR_INFO


structures of additional information (where WAL places
various information the caller needs).

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_query_db()” on page 1066

“QMR_select_match()” on page 1101

“ASE_service_name_typ” on page 178

“QMR_INFO” on page 468

1096 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
QMR_format_report()

QMR_format_report()
QMR_format_report() formats the index data from document index records
into an ASCII text file suitable for displaying or printing.

Syntax
#include <qmr.i>

error_typ CALLBACK QMR_format_report(client_h, ims_p, entries,


query_dir_p, file_name, qmr_list_h_p, num_entries, next_dir_p);

Parameters
client_h HANDLE input. IAFLIB client handle returned from IAFLIB_
get_client_handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the desired IMS. If NULL, the default IMS is used.

entries int input. Number of document index records to format


(typically the number of matches returned from IAFLIB_
query_db() or IAFLIB_continue_query()).

query_dir_p INX_query_match_typ * input. Pointer to the list of document


index records to format (obtained by locking the handle dirs_
h_p returned by IAFLIB_query_db() or dir_h returned from
IAFLIB_continue_query()).

file_name PSTR input. The name of an ASCII file containing the


formatted report. If it is an empty string, QMR_format_
report() creates a file and returns the name. file_name must
point to a buffer large enough to hold the file name and be no
larger than 128 bytes. If it contains the name of an existing
file, QMR_format_report() appends the new data to the file.

qmr_list_h_p HANDLE * input. Pointer to a handle for the list of QMR_


ENTRY structures. If it points to NULL, a handle for a list of
structures of type QMR_ENTRY is allocated and returned. If
it points to a valid handle, the handle is reallocated to provide
room for the new entries. The caller must free the handle
returned by this call.

num_entries int input. Number of entries in the current report.

December 1996 WAL for Windows Programmer’s Reference Manual 1097


7 WAL Function Reference
QMR_format_report()

next_dir_p PINT input. Pointer to an offset of the next document index


record. Can be NULL.

See Also
“IAFLIB_continue_query()” on page 963

“IAFLIB_get_client_handle()” on page 994

“IAFLIB_query_db()” on page 1066

“ASE_service_name_typ” on page 178

“INX_query_match_typ” on page 374

“QMR_ENTRY” on page 467

1098 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
QMR_query()

QMR_query()
QMR_query() is an all-in-one-call function that performs a query, optionally
displays QMR, and returns a list of selected document IDs.

Syntax
#include <qmr.i>

error_typ CALLBACK QMR_query(ims, folder_spec, folder_state, doc_state,


key_cond, filter_cond, show, title, allow_filing, maxselect, doc_ids);

Parameters
ims PSTR input. NCH name of the IMS to use. Can be NULL for
default.

folder_spec PSTR input. Can specify one or more folders. See “IAFLIB_
delete_folders()” on page 976 for a description of how to use
wildcards with folder_spec.

folder_state INX_closed_typ input. Specifies the states of folders that can


be queried. Values are INX_CL_ACTIVE, INX_CL_CLOSED,
and INX_CL_ALL.

doc_state INX_closed_typ input. Specifies the states of documents that


can be queried. Values are INX_CL_ACTIVE, INX_CL_
CLOSED, and INX_CL_ALL.

key_cond PSTR input. Null-terminated key condition string.

filter_cond PSTR input. Null-terminated filter condition string.

show FN_BOOL input. TRUE to show QMR and let user select;
FALSE to just return the first matches up to the limit of max_
select.

title PSTR input. Title for the QMR window.

allow_filing FN_BOOL input. Allow filing to or unfiling from folders in


QMR window.

max_select int input. Maximum number of entries user can select, if


maxselect is -1, the number of selections is unlimited. In no
event are there more than 1000 matches.

December 1996 WAL for Windows Programmer’s Reference Manual 1099


7 WAL Function Reference
QMR_query()

doc_ids PSTR output. TAB-separated list of selected document IDs,


formatted as ASCII text. The caller must provide a buffer of
sufficient size.

See Also
“INX_closed_typ” on page 357

1100 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
QMR_select_match()

QMR_select_match()
QMR_select_match() invokes the Query Match Report window, which
displays the results of a query against the Index Database and enables the
user to select one or more of the documents. select_h_p points to an array of
the selected document IDs.

This function is recommended for querying the end user or a select list
resulting from a call to IAFLIB_query_db(). From the user interface, the user
can print the match report on a local printer or continue the query until it is
complete.

Syntax
#include <iaflib.i>

error_typ CALLBACK QMR_select_match(client_h, ims_p, parent_h,


num_matches, more, dirs_h_p, title, allow_filing, max_select, free_dirs,
softkey_h, key_count, select_h_p, count_p, terminator_p);

Parameters
client_h HANDLE input. IAFLIB client handle obtained from IAFLIB_
get_client_handle().

ims_p ASE_service_name_typ * input. Pointer to the NCH name for


the desired IMS.

parent_h HWND input. The parent window handle.

num_matches int input. Number of document index records (typically


returned from IAFLIB_query_db()).

more BOOL input. Indicates whether the query is complete or not


(typically returned from IAFLIB_query_db()). TRUE if the
query is complete, otherwise FALSE.

dirs_h_p HANDLE * input. Pointer to a handle for a list of document


index records (typically returned from IAFLIB_query_db()).
The handle is freed by QMR_select_match() and should not
be freed or used by the caller on return from QMR_select_
match().

title PSTR input. Specifies the text that is to appear in the caption
bar of the window.

December 1996 WAL for Windows Programmer’s Reference Manual 1101


7 WAL Function Reference
QMR_select_match()

allow_filing BOOL input. Allow filing to or unfiling from folders.

max_select int input. Maximum number of entries the user can select. If
max_select is -1, the number of selections is unlimited.

free_dirs BOOL input. Free the memory allocated to DIRs after


formatting report.

softkey_h HANDLE input. Handle for a list of softkeys.

key_count int input. Number of softkeys in softkey_h.

select_h_p HANDLE * output. Pointer to a handle for all retrieved QMR


entries.

count_p PINT output. Pointer to the number of retrieved entries in


select_h_p.

terminator_p byte * output. Pointer to terminator key (zero if none).

See Also
“IAFLIB_get_client_handle()” on page 994

“IAFLIB_query_db()” on page 1066

“ASE_service_name_typ” on page 178

The sample application in the directory C:\FILENET\SAMPLE\FOLD2\

1102 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD_exit()

RDD_exit()
RDD_exit() frees the handle rdd_h.

RDD stands for retrieval data dictionary. It is an in-memory version of the


document classes and user-defined indices.

Syntax
#include <rdd.i>

void CALLBACK RDD_exit(rdd_h);

Parameters
rdd_h HANDLE input. Handle for client data structure containing
handles to RDD lists and other data. Obtained from RDD_
init().

See Also
“RDD_init()” on page 1113

The sample applications in the directories C:\FILENET\SAMPLE\FOLD2\ and


C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 1103


7 WAL Function Reference
RDD_get_dclass_info()

RDD_get_dclass_info()
RDD_get_dclass_info() returns a handle for the document class descriptor for
the document class specified by class_id or class_name.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_dclass_info(rdd_h, class_id, class_name,


class_desc_h_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

class_id RDD_DCL_ID_TYP input. Document class ID. If class_id is


FN_UNDEF_DOCCLASS, class_name is used to specify the
document class.

class_name PSTR input. Document class name. Used to specify the


document class if class_id is FN_UNDEF_DOCCLASS.

class_desc_h_p
HANDLE * output. Pointer to the handle for a document class
descriptor (RDD_DCLASS_DESC).

Note This function returns a handle for a variable size structure. It is the
application’s responsibility to free the handle to which class_desc_h_p points
when use of the data is complete.

See Also
“RDD_init()” on page 1113

“RDD_DCL_ID_TYP” on page 472

“RDD_DCLASS_DESC” on page 473

The sample application in the directory C:\FILENET\SAMPLE\GEN\

1104 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD_get_dclasses()

RDD_get_dclasses()
RDD_get_dclasses() returns a count of document classes and a handle for an
array of document class names. Each name is a string of length FN_MAX_
DCNAMESIZE + 1 (which is 19). Count is the number of names in the array.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_dclasses(rdd_h, count_p, classes_h_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

count_p WORD * output. Pointer to the number of document classes


in the array.

classes_h_p HANDLE * output. Pointer to the handle for an array of


document class names.

Note It is the application’s responsibility to free the handle to which


classes_h_p points when use of the data is complete.

See Also
“RDD_init()” on page 1113

The sample application in the directory C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 1105


7 WAL Function Reference
RDD_get_handle()

RDD_get_handle()
RDD_get_handle() returns the requested handle. The handle must have been
previously registered with RDD_set_handle(). See “RDD_set_handle()” on
page 1116 for more information. It returns NULL if the handle is not found.

Syntax
#include <rdd.i>

HANDLE CALLBACK RDD_get_handle(name);

Parameters
name PSTR output. Name of handle set by RDD_set_handle(). Its
maximum length is 8 characters. Returns NULL if the handle
is not found.

See Also
“RDD_set_handle()” on page 1116

The sample application in the directory C:\FILENET\SAMPLE\LOGON\

1106 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD_get_ix_info()

RDD_get_ix_info()
RDD_get_ix_info() returns an index descriptor for the index specified by
index_id or index_name. This can be used with any index.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_ix_info(rdd_h, index_id, index_name,


index_desc_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

index_id RDD_INDEX_ID_TYP input. Index ID. If index_id is RDD_


INVALID_INDEX_ID, index_name is used to specify the
index.

index_name PSTR input. Name of the index. Used to specify the index if
index_id is RDD_INVALID_INDEX_ID.

index_desc_p RDD_IXFIELD_DESC * output. Pointer to an index


descriptor.

See Also
“RDD_init()” on page 1113

“RDD_INDEX_ID_TYP” on page 474

“RDD_IXFIELD_DESC” on page 475

The sample applications in the directories C:\FILENET\SAMPLE\GEN\ and


C:\FILENET\SAMPLE\DOCUMENT\

December 1996 WAL for Windows Programmer’s Reference Manual 1107


7 WAL Function Reference
RDD_get_key_info()

RDD_get_key_info()
RDD_get_key_info() returns a key descriptor for the key index specified by
index_id or index_name. This can be used only with key indices.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_key_info(rdd_h, index_id, index_name,


index_desc_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

index_id RDD_INDEX_ID_TYP input. Index ID. If index_id is RDD_


INVALID_INDEX_ID, index_name is used to specify the
index.

index_name PSTR input. Name of the index. Used to specify the index if
index_id is RDD_INVALID_INDEX_ID.

index_desc_p
RDD_KEY_IXFIELD_DESC * output. Pointer to an index
descriptor.

See Also
“RDD_init()” on page 1113

“RDD_INDEX_ID_TYP” on page 474

“RDD_KEY_IXFIELD_DESC” on page 477

1108 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD_get_menuitem_info()

RDD_get_menuitem_info()
RDD_get_menuitem_info() returns a menu item descriptor for the menu item
specified by item_id or item_name, in the menu specified by menu_name.

A user-defined index can be of type menu. If it is, the name of a menu (built in
Forms Build on the UNIX workstation) is part of the index’s definition. Each
menu has a series of items or options.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_menuitem_info(rdd_h, menu_name, item_id,


item_name, item_desc_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

menu_name PSTR input. Name of the menu.

item_id unsigned short input. Menu item ID. If item_id is FN_UNDEF_


SELECTION, item_name is used to specify the menu item.

item_name PSTR input. Name of the menu item. Used to specify the
menu item if item_id is FN_UNDEF_SELECTION.

item_desc_p RDD_MENUITEM_DESC * output. Pointer to a menu item


descriptor.

See Also
“RDD_init()” on page 1113

“RDD_MENUITEM_DESC” on page 479

December 1996 WAL for Windows Programmer’s Reference Manual 1109


7 WAL Function Reference
RDD_get_menuitems()

RDD_get_menuitems()
RDD_get_menuitems() returns a pointer to a handle for an array of menu item
strings and the number of menu items

A user-defined index can be of type menu. If it is, the name of a menu (built in
Forms Build on the UNIX workstation) is part of the index’s definition. Each
menu has a series of items or options. Each string is null-terminated.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_menuitems(rdd_h, menu_name, count_p,


items_h_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

menu_name PSTR input. Name of the menu.

count_p unsigned short * output. Pointer to the number of menu items


in the array.

items_h_p HANDLE * output. Pointer to the handle for an array of menu


item strings. The array contains the menu items for the menu
specified by menu_name. The maximum length of each of
these null-terminated strings is 41 characters.

Note It is the application’s responsibility to free the handle to which items_h_p


points when data use is complete.

See Also
“RDD_init()” on page 1113

1110 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD_get_valid_ixs()

RDD_get_valid_ixs()
RDD_get_valid_ixs() returns a pointer to a handle for an array of the index
names for the specified document classes. It also returns a pointer to the
number of indices returned. If num_classes is zero, class_names is ignored
and all document classes are used; that is, all the indices defined for the
system are returned.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_valid_ixs(rdd_h, num_classes, class_names,


count_p, index_h_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

num_classes WORD input. Number of document classes in class_names.


If zero, class_names is ignored and all document classes are
used.

class_names PSTR input. Array of document class names of maximum


length of FN_MAX_DCNAMESIZE + 1.

count_p WORD * output. Pointer to the number of index names in


index_h_p.

index_h_p HANDLE * output. Pointer to the handle for an array of index


names. The array contains all the valid indices for all of the
document classes listed in the input. The length of each null-
terminated string in the array is 19 characters.

Note It is the application’s responsibility to free the handle to which index_h_p


points when data use is complete.

See Also
“RDD_init()” on page 1113

The sample applications in the directories C:\FILENET\SAMPLE\FOLD2\ and


C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 1111


7 WAL Function Reference
RDD_get_valid_keyixs()

RDD_get_valid_keyixs()
RDD_get_valid_keyixs() returns a pointer to a handle for an array of key index
names for the specified classes. It also returns a pointer to the number of
indices returned. If num_classes is zero, class_names is ignored, all
document classes are used, and all the key indices defined for the system are
returned.

A key index is an inverted index. A B-tree is used when accessing a particular


value for this index field. This usually speeds a query of the database
involving this index.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_get_valid_keyixs(rdd_h, num_classes,


class_names, count_p, index_h_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

num_classes WORD input. Number of document classes in the list. If zero,


class_names is ignored and all document classes are used.

class_names PSTR input. An array of document class names.

count_p WORD * output. Pointer to the number of key index names in


index_h_p.

index_h_p HANDLE * output. Pointer to the handle for an array of key


index names. The array contains all the valid key indices for
all of the document classes listed in the input. The length of
each null-terminated string in the array is 19 characters.

Note It is the application’s responsibility to free the handle to which index_h_p


points when data use is complete.

See Also
“RDD_init()” on page 1113

The sample application in the directory C:\FILENET\SAMPLE\FOLD2\

1112 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD_init()

RDD_init()
RDD_init() initializes RDD, the retrieval data dictionary, with index database
dictionary information from the specified IMS.

Syntax
#include <rdd.i>

void CALLBACK RDD_init(ims_p, rdd_h_p);

Parameters
ims_p ASE_service_name_typ * input. Pointer to the NCH name for
desired IMS. If NULL, the default IMS specified in IAFLIB_
logon_user() is used.

rdd_h_p HANDLE * output. Pointer to the handle for a client data


structure containing handles to RDD lists and other data. This
handle is passed to other RDD calls.

See Also
“IAFLIB_logon_user()” on page 1033

“ASE_service_name_typ” on page 178

The sample applications in the directories C:\FILENET\SAMPLE\FOLD2\ and


C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 1113


7 WAL Function Reference
RDD_is_field_valid()

RDD_is_field_valid()
RDD_is_field_valid() returns a pointer to the index field descriptor for the
index_name if index_name is a valid index for one or more of the specified
document classes. If num_classes is zero, class_names is ignored and the
pointer to the index field descriptor is returned if index_name is a valid index
for any document class.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_is_field_valid(rdd_h, index_name, num_classes,


class_names, index_desc_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init().

index_name PSTR input. Name of the index to validate.

num_classes WORD input. Number of document classes in class_names.


If zero, class_names is ignored and all document classes are
used.

class_names PSTR input. Array of document class names.

index_desc_p RDD_IXFIELD_DESC * output. Pointer to index field


descriptor.

See Also
“RDD_init()” on page 1113

“RDD_IXFIELD_DESC” on page 475

1114 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
RDD_is_key_valid()

RDD_is_key_valid()
RDD_is_key_valid() returns a pointer to the index field descriptor for the
index_name if index_name is a valid key index for one or more of the specified
document classes. If num_classes is zero, class_names is ignored and a
pointer to the index field descriptor is returned if index_name is a valid key
index for any document class.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_is_key_valid(rdd_h, index_name, num_classes,


class_names, index_desc_p);

Parameters
rdd_h HANDLE input. Handle for RDD. Obtained from RDD_init.

index_name PSTR input. Name of key index to validate.

num_classes WORD input. Number of document classes in class_names.


If zero, class_names is ignored and all document classes are
used.

class_names PSTR input. Array of document class names.

index_desc_p RDD_IXFIELD_DESC * output. Pointer to index field


descriptor.

See Also
“RDD_init()” on page 1113

“RDD_IXFIELD_DESC” on page 475

December 1996 WAL for Windows Programmer’s Reference Manual 1115


7 WAL Function Reference
RDD_set_handle()

RDD_set_handle()
RDD_set_handle() registers any handle with RDD (the Retrieval Data
Dictionary) and provides a name for that handle. Use the name in a variety of
related modules that use RDD_get_handle() to retrieve the current handle to
make passing the handle from module to module more efficient.

Syntax
#include <rdd.i>

error_typ CALLBACK RDD_set_handle(name, a_handle);

Parameters
name PSTR input. NULL terminated string name of the handle (8
characters maximum).

a_handle HANDLE input. Handle for RDD. HWND or task handle for be
registered.

See Also
“RDD_get_handle()” on page 1106

The sample application in the directory C:\FILENET\SAMPLE\LOGON\

1116 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
REST_CloseArchive()

REST_CloseArchive()
REST_CloseArchive() frees resources associated with a restore operation.
arch_h is invalid on return from this call. This routine is suitable for calling from
external programs such as Microsoft Word for Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_CloseArchive(arch_h);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

Errors Returned
RESTLIB_lock_failed
RESTLIB: Global lock failed (not enough memory?).

See Also
“REST_OpenArchive()” on page 1123

December 1996 WAL for Windows Programmer’s Reference Manual 1117


7 WAL Function Reference
REST_GetArchTime()

REST_GetArchTime()
REST_GetArchTime() returns the time an archive was made. This routine is
suitable for calling from external programs such as Microsoft Word for
Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_GetArchTime(arch_h, arch_time);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

arch_time time_t * output. DOS date/time.

Errors Returned
RESTLIB_lock_failed
RESTLIB: Global lock failed (not enough memory?).

See Also
“REST_OpenArchive()” on page 1123

1118 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
REST_GetDirEntry()

REST_GetDirEntry()
REST_GetDirEntry() returns the dir entry of a file in the archive specified by
the which parameter. Files are numbered starting at 1. This routine is suitable
for calling from external programs such as Microsoft Word for Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_GetDirEntry(arch_h, which, dir_entry);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

which int input. Index of file entry requested; 1 is first.

dir_entry dir_entry_typ * output. The dir entry for the specified file.

Errors Returned
RESTLIB_Lock_Failed
RESTLIB: Global lock failed (not enough memory?).

RESTLIB_OutOfRange
RESTLIB: File index out of range for this archive.

See Also
“REST_OpenArchive()” on page 1123

“dir_entry_typ” on page 226

December 1996 WAL for Windows Programmer’s Reference Manual 1119


7 WAL Function Reference
REST_GetFileName()

REST_GetFileName()
REST_GetFileName() returns the name of a file in the archive specified by the
which parameter. Files are numbered starting at 1. This routine is suitable for
calling from external programs such as Microsoft Word for Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_GetFileName(arch_h, which, file_name);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

which int input. Index of file name requested; 1 is first.

file_name PSTR output. DOS file name. The caller must allocate
sufficient memory to contain the file name.

Errors Returned
RESTLIB_Lock_Failed
RESTLIB: Global lock failed (not enough memory?).

RESTLIB_OutOfRange
RESTLIB: File index out of range for this archive.

See Also
“REST_OpenArchive()” on page 1123

1120 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
REST_GetFileNames()

REST_GetFileNames()
REST_GetFileNames() returns a list of the files in the archive. This routine is
suitable for calling from external programs such as Microsoft Word for
Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_GetFileNames(arch_h, file_count, file_names);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

file_count WORD * output. Number of files in the list.

file_names PSTR output. String of DOS file names, separated by TAB


characters. The caller must allocate sufficient memory to
contain the list of file names.

Errors Returned
RESTLIB_Lock_Failed
RESTLIB: Global lock failed (not enough memory?).

See Also
“REST_OpenArchive()” on page 1123

December 1996 WAL for Windows Programmer’s Reference Manual 1121


7 WAL Function Reference
REST_GetVolName()

REST_GetVolName()
REST_GetVolName() returns the name of the volume from which an archive
was made. This routine is suitable for calling from external programs such as
Microsoft Word for Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_GetVolName(arch_h, vol_name);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

vol_name PSTR output. DOS volume name. The caller must allocate
sufficient memory to contain the volume name.

Errors Returned
RESTLIB_Lock_Failed
RESTLIB: Global lock failed (not enough memory?).

See Also
“REST_OpenArchive()” on page 1123

1122 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
REST_OpenArchive()

REST_OpenArchive()
REST_OpenArchive() provides a high-level interface with which to restore
Archive documents. It obtains an archive handle, which is used to do the
actual restore operation. Optionally, it returns a list of the files in the archive.
This routine is suitable for calling from external programs such as Microsoft
Word for Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_OpenArchive(ims_name, doc_id,


show_progress, desc_length, desc, file_count, file_names, arch_h);

Parameters
ims_name PSTR input. NCH name of the IMS. Can be NULL to use the
default IMS.

doc_id PSTR input. Document ID of the archive, in ASCII format.

show_progress
FN_BOOL input. TRUE to create a modeless dialog box in
which to display status messages, FALSE to not show status.

desc_length WORD input. Size of buffer pointed to by desc.

desc PSTR output. Buffer of desc_length bytes in which to return


archive description.

file_count WORD * output. Number of files in the list; can be NULL if the
list is not needed.

file_names PSTR output. String of DOS file names, separated by TAB


characters. The caller must allocate sufficient memory to
contain the list. Can be NULL if the list is not needed.

arch_h PHANDLE output. Archive handle for subsequent calls.

December 1996 WAL for Windows Programmer’s Reference Manual 1123


7 WAL Function Reference
REST_OpenArchive()

Errors Returned
RESTLIB_No_Mem
RESTLIB: Not enough memory.

RESTLIB_Lock_Failed
RESTLIB: Global lock failed (not enough memory?).

RESTLIB_File_Read
RESTLIB: Cannot read file.

RESTLIB_Not_Archive
RESTLIB: Not an archive document.

See Also
“ARCH_DocEntry()” on page 600

1124 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
REST_RestoreDoc()

REST_RestoreDoc()
The REST_RestoreDoc() function is a high-level interface with which to
restore Archive documents. It restores all files in the archive, optionally
showing status messages or prompting the user to skip or rename files. This
routine is suitable for calling from external programs such as Microsoft Word
for Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_RestoreDoc(arch_h, show_progress, prompt,


warn, file_count, file_names);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

show_progress
FN_BOOL input. TRUE to create a modeless dialog box in
which to display status messages, FALSE to not show status.

prompt FN_BOOL input. TRUE to allow user to skip files or restore


them to different names, FALSE to restore to original names
without prompting for each file.

warn FN_BOOL input. TRUE to warn the user if a file with the
same name exists, FALSE to overwrite without warning.

file_count WORD * output. Number of files in the list; can be NULL if the
list of file names is not needed.

file_names PSTR output. String of DOS file names, separated by TAB


characters. It is assumed that the caller has allocated
sufficient memory to contain this result. Can be NULL if the
file names are not needed.

Errors Returned
RESTLIB_Lock_Failed
RESTLIB: Global lock failed (not enough memory?).

RESTLIB_File_Read
RESTLIB: Cannot read file.

December 1996 WAL for Windows Programmer’s Reference Manual 1125


7 WAL Function Reference
REST_RestoreDoc()

RESTLIB_Cannot_Prompt
RESTLIB: Attempt to prompt user failed.

RESTLIB_User_Cancel
RESTLIB: User Canceled.

See Also
“REST_OpenArchive()” on page 1123

1126 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
REST_RestoreFile()

REST_RestoreFile()
REST_RestoreFile() provides a high-level interface with which to restore
Archive documents. It restores specific files in the archive, optionally showing
status messages or prompting the user to skip or rename files. This routine is
suitable for calling from external programs such as Microsoft Word for
Windows.

Syntax
#include <restlib.i>

error_typ CALLBACK REST_RestoreFile(arch_h, show_progress, prompt,


warn, arch_name, rest_name);

Parameters
arch_h HANDLE input. Archive handle from REST_OpenArchive().

show_progress
FN_BOOL input. TRUE to create a modeless dialog box in
which to display status messages, FALSE to not show status.

prompt FN_BOOL input. TRUE to allow user to skip files or restore


them to different names, FALSE to restore to original names
without prompting for each file.

warn FN_BOOL input. TRUE to warn user if a file with the same
name exists, FALSE to overwrite without warning.

arch_name PSTR input. Source DOS file name of file to restore.

rest_name PSTR input. Destination DOS file name. If present, this is the
name to which to restore the file. It can be NULL if renaming
is not desired or if prompt is TRUE. If it is non-blank and
prompt is TRUE, this sets the default for the “Restore As”
user dialog. If present, the name of the file actually restored is
returned here. Use a blank to let the source name be the
default destination name and get the actual destination name
back.

December 1996 WAL for Windows Programmer’s Reference Manual 1127


7 WAL Function Reference
REST_RestoreFile()

Errors Returned
RESTLIB_Lock_Failed
RESTLIB: Global lock failed (not enough memory?).

RESTLIB_File_Read
RESTLIB: Cannot read file.

RESTLIB_Cannot_Prompt
RESTLIB: Attempt to prompt user failed.

RESTLIB_User_Cancel
RESTLIB: User Canceled.

See Also
“REST_OpenArchive()” on page 1123

1128 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SCT_serialize()

SCT_serialize()
SCT_serialize() has been considered a “No operation” function since
release 3.1. Its functionality is internal now.

Prior to release 3.1, you had to call SCT_serialize() before calling SEC_
logon(), SEC_renew(), WQS_logon(), WQS_qlogon(), and BES_logon().
Since release 3.1, the credential parameter of these logon functions becomes
an unused parameter. No change is required to upgrade 3.0 WAL for
Windows applications.

Syntax
#include <iaflib.i>
#include <SCT.def>

void CALLBACK SCT_serialize(credential);

Parameters
credential PSTR input. Not used.

December 1996 WAL for Windows Programmer’s Reference Manual 1129


7 WAL Function Reference
SEC_add_info()

SEC_add_info()
SEC_add_info() enables a logged-on user to add information to the security
database for users, workstations, functions, and their members. The type of
information to be added is contained in the sec_info_p structure. The logged-
on user must have the appropriate access to the functions GroupAdmin,
SiteAdmin, or FunctionAdmin to execute this function.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_add_info(session_num, sec_info_p);

Parameters
session_num ASE_session_number_typ input. The session handle that
identifies the user/group that is adding information to the
security database. The user must have appropriate access to
add information to the database.

sec_info_p SEC_add_info_typ * input. Pointer to the type of information


to be added to the security database. Depending on the value
of info_type, the information in info_to_add can be one of
either user info, membership info, a service name, or a
function name.

Errors Returned
SEC_err_invalid_session_handle
SEC was given an invalid session handle; the session might have
timed out.

SEC_err_access_denied
You are not authorized to execute the requested command.

SEC_err_name_already_exists
The name being defined already exists in the database.

SEC_err_invalid_name
The name specified has an invalid format.

SEC_err_max_members_exceeded
The maximum number of members has been exceeded.

1130 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_add_info()

See Also
“ASE_session_number_typ” on page 179

“SEC_add_info_typ” on page 487

December 1996 WAL for Windows Programmer’s Reference Manual 1131


7 WAL Function Reference
SEC_check_access()

SEC_check_access()
SEC_check_access() verifies approval of a user’s access, based on the set of
access restrictions passed to this function and the type of access required.
The call is successful if the access is approved.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_check_access(session_num, acc_restr_p,


acc_wanted, new_user_p, new_term_p);

Parameters
session_num ASE_session_number_typ input. The session number
returned as a result of a prior successful logon. See
“SECMAN_get_sec_handle()” on page 1156 or “SEC_
logon()” on page 1148.

acc_restr_p SEC_AR_set_typ * input. Pointer to the three access


restrictions corresponding to read, write, and execute/append
access. The appropriate access restriction for the type of
access wanted is checked.

acc_wanted SEC_access_wanted_typ (unsigned short) input. The type of


access wanted: read (1), write (2), execute/append (4), or a
combination of these. The values for the types of access
wanted are added together to come up with a summary of the
types of access wanted. For example, 7 means read, write,
and execute/append access.

new_user_p ASE_service_name_typ * input. If specified along with new_


term_p, new_user_p is a pointer to the NCH name of a user
to check access for instead of the user denoted by session_
num. If an override is not to be specified, all three parts of the
name should be zero length.

new_term_p ASE_service_name_typ * input. If specified along with new_


user_p, new_term_p is a pointer to a terminal where access
for the user indicated by new_user_p is to be checked from. If
an override is not to be specified, all three parts of this name
should be zero length.

1132 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_check_access()

See Also
“SEC_logon()” on page 1148

“SECMAN_get_sec_handle()” on page 1156

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

“SEC_access_wanted_typ” on page 486

“SEC_AR_set_typ” on page 490

December 1996 WAL for Windows Programmer’s Reference Manual 1133


7 WAL Function Reference
SEC_check_functions()

SEC_check_functions()
SEC_check_functions() verifies whether a user has access to the functions
indicated. A set of function names is passed to SEC_check_functions() which
checks each function name individually and passes back a set of flags
indicating whether or not the corresponding function has been approved.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_check_functions(session_num, list_size,


func_names_p, results_p);

Parameters
session_num ASE_session_number_typ input. The session number
returned as a result of a prior successful logon. See
“SECMAN_get_sec_handle()” on page 1156 or “SEC_
logon()” on page 1148.

list_size unsigned short input. The number of elements in the list


pointed to by func_names_p.

func_names_p
SEC_func_name_typ * input. Pointer to a list of function
names that are to be approved for access by the user
identified by session_num.

results_p FN_BOOL * output. Pointer to a list of boolean flags where


TRUE indicates that the specified user has access to the
function and FALSE indicates that the user does not have
access. There is a one to one correspondence between the
elements in this list and the elements pointed to by func_
names_p.

See Also
“SEC_logon()” on page 1148

“SECMAN_get_sec_handle()” on page 1156

“ASE_session_number_typ” on page 179

“SEC_func_name_typ” on page 500

1134 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_check_functions()

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

December 1996 WAL for Windows Programmer’s Reference Manual 1135


7 WAL Function Reference
SEC_check_membership()

SEC_check_membership()
SEC_check_membership() checks whether a user or group is a member of
the specified group. If the user is a member of the group, the function returns
success; otherwise, an error is returned.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_check_membership(session_num, group_p);

Parameters
session_num ASE_session_number_typ input. The session number
returned as a result of a prior successful logon. See
“SECMAN_get_sec_handle()” on page 1156 or “SEC_
logon()” on page 1148.

group_p ASE_service_name_typ * input. Pointer to the NCH name of


a security group that is to be searched to see if this user is a
member.

See Also
“SEC_logon()” on page 1148

“SECMAN_get_sec_handle()” on page 1156

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

1136 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_delete_info()

SEC_delete_info()
SEC_delete_info() enables the logged-on user to delete information from the
security database for users, workstations, functions, and their members. It
first verifies that the logged-on user has the appropriate access to the
functions GroupAdmin, SiteAdmin, or FunctionAdmin.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_delete_info(session_num, sec_info_p);

Parameters
session_num ASE_session_number_typ input. The session handle that
identifies the user/group that is deleting information from the
security database. The user must have appropriate access to
delete information from the database.

sec_info_p SEC_delete_info_typ * input. Pointer to the information that is


to be deleted from the security database.

Errors Returned
SEC_err_invalid_session_handle
SEC was given an invalid session handle; the session might have
timed out.

SEC_err_invalid_info_type
The info_type given to SEC was invalid.

SEC_err_access_denied
You are not authorized to execute the requested command.

SEC_err_predefined_group
You are attempting to delete a system defined group.

SEC_err_record_not_found
The specified database record was not found.

December 1996 WAL for Windows Programmer’s Reference Manual 1137


7 WAL Function Reference
SEC_delete_info()

See Also
“ASE_session_number_typ” on page 179

“SEC_delete_info_typ” on page 491

1138 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_find_info()

SEC_find_info()
SEC_find_info() retrieves information from the security database about users,
workstations, functions, and their members.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_find_info(session_num, find_type_p, done_p,


names_p);

Parameters
session_num ASE_session_number_typ input. The session handle that
identifies the user/group that is finding information in the
security database. The user must have appropriate access to
find information in the database.

find_type_p SEC_find_info_typ * input. Pointer to a structure containing


information such as the type of information to find, the name
of the user for whom membership information is to be found,
a name denoting the starting point from where the search for
information is to begin, etc.

done_p FN_BOOL * output. Pointer to a boolean. If the value is


TRUE, all pertinent information has been returned. If FALSE,
there is more information that is yet to be retrieved.

names_p SEC_names_found_typ * output. Pointer to a list of user or


function names, depending on find_type_p.

Errors Returned
SEC_err_invalid_session_handle
SEC was given an invalid session handle; the session might have
timed out.

SEC_err_access_denied
You are not authorized to execute the requested command.

SEC_err_invalid_info_type
The info_type given to SEC was invalid.

December 1996 WAL for Windows Programmer’s Reference Manual 1139


7 WAL Function Reference
SEC_find_info()

See Also
“ASE_session_number_typ” on page 179

“SEC_find_info_typ” on page 494

“SEC_names_found_typ” on page 511

1140 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_get_membership_list()

SEC_get_membership_list()
SEC_get_membership_list() retrieves the names of all the groups to which a
user/group belongs. An error code is returned if the user/group does not exist.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_get_membership_list(session_num, id, list_typ,


max_incl, last_incl, max_excl, last_excl, done_p, memlist_p);

Parameters
session_num ASE_session_number_typ input. The session number
returned as a result of a prior successful logon. Identifies the
user that the membership list is to be retrieved for (unless id
is specified). See “SECMAN_get_sec_handle()” on
page 1156 or “SEC_logon()” on page 1148.

id SEC_id_typ input. If specified, this is the ID of the user whose


membership list is to be retrieved. If id is zero, the user ID
specified by session_num is used instead.

list_typ unsigned short input. Specifies the type of membership list to


retrieve: 1 for a subscription list, 2 for a subscriber list
(currently not supported). The subscription list is a list of
groups to which this user or group belongs. The subscriber
list is a list of user or other groups that belong to this group.

max_incl unsigned short input. The maximum number of memberships


that can be returned to the client-allocated space.

last_incl SEC_id_typ input/output. If non-zero, it is the security ID of


the last member in the included list. Used to continue a query
if not all of the memberships can be returned in one call.

max_excl unsigned short input. Same as max_incl, except for the


excluded list. Currently not used and should be set to zero.

last_excl SEC_id_typ input/output. Same as last_incl, except for the


excluded list. Currently not used and should be set to zero.

December 1996 WAL for Windows Programmer’s Reference Manual 1141


7 WAL Function Reference
SEC_get_membership_list()

done_p FN_BOOL * output. Pointer to a boolean. If TRUE, all


memberships for this security ID have been returned in this
and possibly previous calls. If FALSE, there are more to be
retrieved.

memlist_p SEC_memlist_typ * output. Pointer to the membership list for


this security ID.

See Also
“SEC_logon()” on page 1148

“SECMAN_get_sec_handle()” on page 1156

“ASE_session_number_typ” on page 179

“SEC_id_typ” on page 504

“SEC_memlist_typ” on page 508

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

1142 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_get_security_info()

SEC_get_security_info()
SEC_get_security_info() retrieves information about a user or group. The
information returned includes the user/group name and ID, primary group,
language, and login flag. If the user/group does not exist in the security
database, SCT_undefined is returned.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_get_security_info(session_num, user_p, id,


sec_info_p);

Parameters
session_num ASE_session_number_typ input. The session number
returned as a result of a prior successful logon that identifies
the user for which security information is to be retrieved.

user_p ASE_service_name_typ * input. If specified, this points to the


NCH name of a user/group for which information is to be
retrieved rather than the user specified by session_num. If
not specified, all three parts of this name must be zero length.

id SEC_id_typ input. Identical to new_user, except that the ID of


the user is known instead of the name. If not specified, ID
must be set to zero.

sec_info_p SEC_security_info_typ * output. Pointer to the information


about this user/group.

See Also
“SEC_logon()” on page 1148

“SECMAN_get_sec_handle()” on page 1156

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

December 1996 WAL for Windows Programmer’s Reference Manual 1143


7 WAL Function Reference
SEC_get_security_info()

“SEC_security_info_typ” on page 513

“SEC_id_typ” on page 504

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

1144 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_get_system_info()

SEC_get_system_info()
SEC_get_system_info() retrieves system information from the security
database or from the operating system. The information retrieved is either the
security defaults information (preferences) or the system date/time.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_get_system_info(session_num, get_type,


sys_info_p);

Parameters
session_num ASE_session_number_typ input. The session handle. This
identifies the user/group that is getting information from the
security database. The user must have appropriate access to
get system information from the database.

get_type unsigned short input. Specifies the type of information to be


retrieved. Valid values for this field are:
7 get system default information
8 get system date/time information

sys_info_p SEC_get_system_info_typ * output. Either the system


security information or the date and time depending on the
value of get_type.

Errors Returned
SEC_err_invalid_session_handle
SEC was given an invalid session handle; the session might have
timed out.

SEC_err_invalid_info_type
The info_type given to SEC was invalid.

SEC_err_access_denied
You are not authorized to execute the requested command.

December 1996 WAL for Windows Programmer’s Reference Manual 1145


7 WAL Function Reference
SEC_get_system_info()

See Also
“ASE_session_number_typ” on page 179

“SEC_get_system_info_typ” on page 502

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

1146 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_logoff()

SEC_logoff()
SEC_logoff() terminates a service logon with a security service. Use this
function only when you use SEC_logon() to log on to a security service. For
more information, see “SEC_logon()” on page 1148 and “SECMAN_get_sec_
handle()” on page 1156.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_logoff(session_num);

Parameters
session_num ASE_session_number_typ input/output. The session
number returned as a result of a prior successful logon with
SEC_logon().

See Also
“SEC_logon()” on page 1148

“SECMAN_get_sec_handle()” on page 1156

“SECMAN_free_sec_handle()” on page 1155

“SECMAN_renew_sec_handle()” on page 1158

“ASE_session_number_typ” on page 179

“Appendix A–IMS Security Services and WAL” on page 1251

December 1996 WAL for Windows Programmer’s Reference Manual 1147


7 WAL Function Reference
SEC_logon()

SEC_logon()
SEC_logon() establishes a service logon with the security services.

We recommend that you use SECMAN_get_sec_handle() instead of SEC_


logon() to establish a service logon session with the security services.
SECMAN_get_sec_handle() manages multiple sessions of service logons. If
you use SECMAN_get_sec_handle(), you must also use SECMAN_renew_
sec_handle() and SECMAN_free_sec_handle(). See “Appendix A–IMS
Security Services and WAL” on page 1251 for more information.

On a 3.1 IMS, use SECMAN_get_sec_handle(), instead of this, as an entry


point.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_logon(security_service_p, credential, router_p,


session_num_p);

Parameters
security_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the Security Service to log on to.

credential PSTR input. Unused since release 3.1.

router_p ASE_service_name_typ * input. Pointer to the NCH name of


a security gateway that this logon is to be routed through (this
is used for logging on to non-FileNet security systems).

session_num_p
ASE_session_number_typ * output. Pointer to the session
number returned as the result of the logon.

See Also
“SECMAN_get_sec_handle()” on page 1156

“SECMAN_free_sec_handle()” on page 1155

“SECMAN_renew_sec_handle()” on page 1158

1148 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_logon()

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

“Appendix A–IMS Security Services and WAL” on page 1251

December 1996 WAL for Windows Programmer’s Reference Manual 1149


7 WAL Function Reference
SEC_rename_info()

SEC_rename_info()
SEC_rename_info() changes the name of a user or group in the security
database.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_rename_info(session_num, rename_type,


user_p, new_name_p);

Parameters
session_num ASE_session_number_typ input. The session handle that
identifies the user/group that is renaming information in the
security database. The user must have appropriate access to
rename information in the database.

rename_type unsigned short input. Specifies the type of information to be


renamed. Must be set to 1.

user_p ASE_service_name_typ * input. Pointer to the NCH name of


the user that is being renamed.

new_name_p ASE_service_name_typ * input. Pointer to the new NCH


name of the user.

Errors Returned
SEC_err_invalid_session_handle
SEC was given an invalid session handle; the session might have
timed out.

SEC_err_invalid_info_type
The info_type given to SEC was invalid.

SEC_err_access_denied
You are not authorized to execute the requested command.

SEC_err_record_not_found
The specified database record was not found.

1150 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_rename_info()

See Also
“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

December 1996 WAL for Windows Programmer’s Reference Manual 1151


7 WAL Function Reference
SEC_renew()

SEC_renew()
SEC_renew() re-establishes a session with the security services. Use this
function only when you use SEC_logon() to log on to the security services.
For more information, see “SEC_logon()” on page 1148 and “SECMAN_get_
sec_handle()” on page 1156.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_renew(security_service_p, credential, router_p,


session_num);

Parameters
security_service_p
ASE_service_name_typ * input. Pointer to the NCH name of
the Security Service to log on to.

credential PSTR input. Not used since release 3.1.

router_p ASE_service_name_typ * input. Pointer to the NCH name of


a security gateway through which this session is to be
routed (this is used for logging on to non-FileNet security
systems).

session_num ASE_session_number_typ input. The ASE_session_


number_typ session number returned as the result of the
logon.

Error Returned
SEC_other_error

See Also
“SEC_logon()” on page 1148

“SECMAN_get_sec_handle()” on page 1156

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

1152 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SEC_set_system_info()

SEC_set_system_info()
SEC_set_system_info() enables the logged-on user to set either system
information in the security database or the system date/time.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_set_system_info(session_num, sys_info_p);

Parameters
session_num ASE_session_number_typ input. The session handle that
identifies the user/group that is setting information in the
security database. The user must have appropriate access to
set system information in the database.

sys_info_p SEC_set_system_info_typ * input. Pointer to the type of


information to set as well as the information itself.

Errors Returned
SEC_err_invalid_session_handle
SEC was given an invalid session handle; the session might have
timed out.

SEC_err_invalid_info_type
The info_type given to SEC was invalid.

SEC_err_access_denied
You are not authorized to execute the requested command.

See Also
“ASE_session_number_typ” on page 179

“SEC_set_system_info_typ” on page 515

December 1996 WAL for Windows Programmer’s Reference Manual 1153


7 WAL Function Reference
SEC_update_info()

SEC_update_info()
SEC_update_info() enables the logged-on user to update information in the
security database for a user, group, or service process.The logged-on user
must have the appropriate access to the functions GroupAdmin, SiteAdmin, or
FunctionAdmin.

Syntax
#include <seclib.i>

error_typ CALLBACK SEC_update_info(session_num, sec_info_p);

Parameters
session_num ASE_session_number_typ input. The session handle that
identifies the user/group that is updating information in the
security database. The user must have appropriate access to
update information in the database.

sec_info_p SEC_update_info_typ * input. Pointer to the update


information. Depending on the info_type, info_to_update
either contains user data or service data.

Errors Returned
SEC_err_invalid_session_handle
SEC was given an invalid session handle; the session might have
timed out.

SEC_err_invalid_info_type
The info_type given to SEC was invalid.

SEC_err_access_denied
You are not authorized to execute the requested command.

SEC_err_record_not_found
The specified database record was not found.

See Also
“ASE_session_number_typ” on page 179

“SEC_update_info_typ” on page 521

1154 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SECMAN_free_sec_handle()

SECMAN_free_sec_handle()
SECMAN_free_sec_handle() terminates a service logon with the security
services.

Syntax
#include <secman.i>

error_typ CALLBACK SECMAN_free_sec_handle(session_num, sec_flags);

Parameters
session_num ASE_session_number_typ input. The session handle.
Obtained from SECMAN_get_sec_handle().

sec_flags WORD input. Currently, always specify zero.

See Also
“SECMAN_get_sec_handle()” on page 1156

“ASE_session_number_typ” on page 179

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

December 1996 WAL for Windows Programmer’s Reference Manual 1155


7 WAL Function Reference
SECMAN_get_sec_handle()

SECMAN_get_sec_handle()
SECMAN_get_sec_handle() establishes a service logon with the security
services.

We recommend that you use SECMAN_get_sec_handle() instead of SEC_


logon(). SECMAN_get_sec_handle() manages multiple sessions of service
logons. Currently, you can have up to 32 concurrent SEC sessions. See
“Appendix A–IMS Security Services and WAL” on page 1251 for more
information.

Syntax
#include <secman.i>

error_typ CALLBACK SECMAN_get_sec_handle(ims_p, sec_flags,


session_num);

Parameters
ims_p ASE_service_name_typ * input. Pointer to the IMS structure.
If NULL, the currently logged on IMS is used.

sec_flags WORD input. Currently, always specify zero.

session_num ASE_session_number_typ * input. The session handle,


which is a required input for most SECMAN and SEC
functions.

The session handle identifies the user/group that is updating


information in the security database. The user must have
appropriate access to update information in the database.

See Also
“SEC_logon()” on page 1148

“SECMAN_free_sec_handle()” on page 1155

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

1156 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SECMAN_get_sec_handle()

“Appendix A–IMS Security Services and WAL” on page 1251

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

December 1996 WAL for Windows Programmer’s Reference Manual 1157


7 WAL Function Reference
SECMAN_renew_sec_handle()

SECMAN_renew_sec_handle()
SECMAN_renew_sec_handle() re-establishes a service session with the
security services.

Syntax
#include <secman.i>

error_typ CALLBACK SECMAN_renew_sec_handle(ims_p, session_num,


sec_flags);

Parameters
ims_p ASE_service_name_typ * input. Pointer to the IMS structure.
If NULL, the currently logged on IMS is used.

session_num ASE_session_number_typ input. The session handle.


Obtained from SECMAN_get_sec_handle().

sec_flags WORD input. Currently, always specify zero.

See Also
“SECMAN_get_sec_handle()” on page 1156

“ASE_service_name_typ” on page 178

“ASE_session_number_typ” on page 179

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

1158 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ServiceNameCacheDefaults()

ServiceNameCacheDefaults()
ServiceNameCacheDefaults() retrieves a Clearinghouse Default Cache
Descriptor record from the domain specified by domain. If domain in NULL,
the default domain is used.

Syntax
#include <servname.i>

error_typ CALLBACK ServiceNameCacheDefaults(domain, def_p);

Parameters
domain NCH_DomainName * input. Can be NULL for default domain.

def_p NCH_DefCacheDescValue * output. The default cache


descriptor structure.

See Also
“NCH_DefCacheDescValue” on page 386

“NCH_DomainName” on page 391

The sample application in the directory C:\FILENET\SAMPLE\GEN\

December 1996 WAL for Windows Programmer’s Reference Manual 1159


7 WAL Function Reference
ServiceNameDefaults()

ServiceNameDefaults()
ServiceNameDefaults() retrieves a Clearinghouse Default Service Descriptor
record from the domain specified by domain. If domain is NULL, the default
domain is used.

Syntax
#include <servname.i>

error_typ CALLBACK ServiceNameDefaults(domain, def_p);

Parameters
domain NCH_DomainName * input. Can be NULL for default domain.

def_p NCH_DefServiceDescValue * output. The default service


descriptor structure.

See Also
“NCH_DefServiceDescValue” on page 388

“NCH_DomainName” on page 391

The sample applications in the directories C:\FILENET\SAMPLE\GEN and


C:\FILENET\SAMPLE\FORM

1160 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
ServiceNameOptions()

ServiceNameOptions()
ServiceNameOptions() provides a user interface with which to select a
Clearinghouse object by browsing through existing organizations and
domains.

It returns success if a valid object is selected, SVN_CANCELLED if the user


presses CANCEL, SVN_NOMEM if a Windows call fails, or another error
returned by an internal call.

Syntax
#include <servname.i>

error_typ CALLBACK ServiceNameOptions(parent_h, object_text, prop);

Parameters
parent_h HWND input. Window handle to be used as the parent of the
dialog box.

object_text PSTR output. NULL terminated string in NCH format.


Returns selection unless the user cancels.

prop NCH_Property output. NCH property.

See Also
“NCH_Property” on page 397

December 1996 WAL for Windows Programmer’s Reference Manual 1161


7 WAL Function Reference
SLACLIB_GetAttr()

SLACLIB_GetAttr()
SLACLIB_GetAttr() retrieves an attribute from SLACLIB.

Syntax
#include <slaclib.i>

error_typ CALLBACK SLACLIB_GetAttr(attr, wType, hWnd);

Parameters
attr VOID *. A pointer to a structure where the attribute will be
stored.

wType WORD. The type of attribute being requested. Can be one of


the following:
SLACLIB_ATTR_LOGOFF_LEVEL
SLACLIB_ATTR_KILL_WORKFLO
SLACLIB_ATTR_TIMEOUT
SLACLIB_ATTR_ENABLED
SLACLIB_ATTR_SHUTDOWN
SLACLIB_ATTR_UNSAVED_DATA
SLACLIB_ATTR_WORKFLO_HWND

hWnd HWND. The window for which to get the attribute. Can be
NULL if not needed (i.e., if you are getting an SLACLIB
attribute instead of a window attribute).

Errors Returned
SLACLIB_invalid_attribute
Invalid attribute specified.

SLACLIB_key_not_found
Key not found.

SLACLIB_hwnd_required
HWND required.

See Also
“SLACLIB_SetAttr()” on page 1167

1162 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SLACLIB_GetTimeStamp()

SLACLIB_GetTimeStamp()
SLACLIB_GetTimeStamp() returns the latest timestamp, chosen from one of
the following:

• SLACLIB internal timestamp

• COURIER timestamp

• IAFLIB timestamp

If the OCX count is greater than zero, SLACLIB_GetTimeStamp() returns


zero. There is no log off if OCXes are active.

Syntax
#include <slaclib.i>

error_typ CALLBACK SLACLIB_GetTimeStamp(dwTickCount);

Parameters
dwTickCount DWORD *. The timestamp.

December 1996 WAL for Windows Programmer’s Reference Manual 1163


7 WAL Function Reference
SLACLIB_RegisterWindow()

SLACLIB_RegisterWindow()
SLACLIB_RegisterWindow() registers a window with SLACLIB. Windows that
are registered with SLACLIB can be shut down when a user has been idle for
a specified time.

There are two SLACLIB entries in the [AutoLogoff]section of the LOGON.CFG


file, as shown in the following example:

[AutoLogoff]
Timeout=0
LogoffLevel=0

Timeout is specified in minutes and indicates the period over which a user can
be idle; the default is zero. LogoffLevel can have the following values:

0 Discard all changes and exit.


1 If there are unsaved changes, wait and query the user; otherwise, exit.
2 Do not force a log off. Always ask the user and wait.
3 Cache changes, then force a log off.

Syntax
#include <slaclib.i>

error_typ CALLBACK SLACLIB_RegisterWindow(hWnd, uMsg, wParam,


lParam);

Parameters
hWnd The window being registered for SLAC key shut down.

uMsg The shutdown uMsg.

wParam The shutdown wParam.

lParam The shutdown lParam.

1164 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SLACLIB_RegisterWindow()

Errors Returned
SLACLIB_key_exists
Key already exists.

SLACLIB_key_table_full
Key table full.

See Also
“SLACLIB_UnRegisterWindow()” on page 1169

December 1996 WAL for Windows Programmer’s Reference Manual 1165


7 WAL Function Reference
SLACLIB_ResetTimer()

SLACLIB_ResetTimer()
SLACLIB_ResetTimer() resets the SLACLIB internal timer. You can call this
function when a user does not want to be logged off.

Syntax
#include <slaclib.i>

error_typ CALLBACK SLACLIB_ResetTimer(void);

Parameters
None.

1166 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SLACLIB_SetAttr()

SLACLIB_SetAttr()
SLACLIB_SetAttr() sets an attribute in SLACLIB.

Syntax
#include <slaclib.i>

error_typ CALLBACK SLACLIB_SetAttr(attr, wType, hWnd);

Parameters
attr VOID *. A pointer to the new attribute value.

wType WORD. The type of attribute being set. The type of attribute
being requested. Can be one of the following:
SLACLIB_ATTR_LOGOFF_LEVEL
SLACLIB_ATTR_KILL_WORKFLO
SLACLIB_ATTR_TIMEOUT
SLACLIB_ATTR_ENABLED
SLACLIB_ATTR_SHUTDOWN
SLACLIB_ATTR_UNSAVED_DATA
SLACLIB_ATTR_WORKFLO_HWND

hWnd The window to assign the attribute to. Can be NULL if not
needed (i.e. if you are setting a SLACLIB attributes).

Errors Returned
SLACLIB_invalid_attribute
Invalid attribute specified.

SLACLIB_key_not_found
Key not found.

SLACLIB_hwnd_required
HWND required.

See Also
“SLACLIB_GetAttr()” on page 1162

December 1996 WAL for Windows Programmer’s Reference Manual 1167


7 WAL Function Reference
SLACLIB_Shutdown()

SLACLIB_Shutdown()
SLACLIB_Shutdown() performs a SLAC key shutdown of all registered
windows, in reverse order (i.e., newest window first).

Syntax
#include <slaclib.i>

error_typ CALLBACK SLACLIB_Shutdown(void);

Parameters
None.

Errors Returned
SLACLIB_disabled
SLACLIB is disabled.

See Also
“SLACLIB_RegisterWindow()” on page 1164

“SLACLIB_UnRegisterWindow()” on page 1169

1168 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SLACLIB_UnRegisterWindow()

SLACLIB_UnRegisterWindow()
SLACLIB_UnRegisterWindow() unregisters a window with SLACLIB. Call this
function before destroying a window that has been registered with SLACLIB.

Syntax
#include <slaclib.i>

error_typ CALLBACK SLACLIB_UnRegisterWindow(hWnd);

Parameters
hWnd HWND. A handle for the window to unregister.

Errors Returned
SLACLIB_key_not_found
Key not found.

See Also
“SLACLIB_RegisterWindow()” on page 1164

December 1996 WAL for Windows Programmer’s Reference Manual 1169


7 WAL Function Reference
SVN_get_Attr_desc()

SVN_get_Attr_desc()
SVN_get_Attr_desc() retrieves attributes from a specified domain. IMS
software release 3.1 and later support this function.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_get_Attr_desc(domain_p, desc_p);

Parameters
domain_p NCH_DomainName * input. The NCH name for the desired
domain. If NULL, the currently logged on domain is used.

desc_p NCH_AttributesDescValue * output. Pointer to the


Clearinghouse Attribute’s Descriptor record for the specified
domain.

See Also
“NCH_AttributesDescValue” on page 380

“NCH_DomainName” on page 391

1170 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SVN_get_BES_desc()

SVN_get_BES_desc()
SVN_get_BES_desc() retrieves a Clearinghouse BES Descriptor record for
the BES name given in service_p.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_get_BES_desc(service_p, desc_p);

Parameters
service_p NCH_ObjectName * input. The NCH name for the desired
BES.

desc_p NCH_BatchDescValue * output. Pointer to the Clearinghouse


BES Descriptor record.

See Also
“NCH_BatchDescValue” on page 383

“NCH_ObjectName” on page 395

The sample applications in the directories C:\FILENET\SAMPLE\GEN\ and


C:\FILENET\SAMPLE\DOCUMENT\

December 1996 WAL for Windows Programmer’s Reference Manual 1171


7 WAL Function Reference
SVN_get_CSM_desc()

SVN_get_CSM_desc()
SVN_get_CSM_desc() retrieves a Clearinghouse CSM Descriptor record for
either the CSM or BES name specified in service_p.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_get_CSM_desc(service_p, desc_p);

Parameters
service_p NCH_ObjectName * input. The NCH name for the desired
CSM or BES.

desc_p NCH_CacheDescValue * output. Pointer to the


Clearinghouse CSM Descriptor record.

See Also
“NCH_CacheDescValue” on page 384

“NCH_ObjectName” on page 395

1172 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SVN_get_DefDevice_desc()

SVN_get_DefDevice_desc()
SVN_get_DefDevice_desc() gets the NCH_DefDeviceDescValue structure for
the specified domain. This structure contains the NCH object names for the
default printer and default tape drive.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_get_DefDevice_desc(domain, desc_p);

Parameters
domain NCH_DomainName * input. The NCH name for the desired
domain. Can be NULL for default domain.

desc_p NCH_DefDeviceDescValue * output. Pointer to the default


service descriptor structure.

See Also
“NCH_DefDeviceDescValue” on page 387

“NCH_DomainName” on page 391

December 1996 WAL for Windows Programmer’s Reference Manual 1173


7 WAL Function Reference
SVN_get_DefServ1_desc()

SVN_get_DefServ1_desc()
SVN_get_DefServ1_desc() retrieves a Clearinghouse DefServ1 Descriptor
record for the specified domain.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_get_DefServ1_desc(domain, desc_p);

Parameters
domain NCH_DomainName * input. The NCH domain name.

desc_p NCH_DefService1DescValue * output. Pointer to the


Clearinghouse DefServ1 Descriptor record.

See Also
“NCH_DefService1DescValue” on page 389

“NCH_DomainName” on page 391

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

1174 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SVN_get_IMS_desc()

SVN_get_IMS_desc()
SVN_get_IMS_desc() retrieves a Clearinghouse IMS Descriptor record for
either the IMS name or BES name specified in service_p, as determined by
service_type, which must be either SVN_IMS or SVN_BES.

If service_p is NULL, the default IMS or BES (depending on service_type) is


used.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_get_IMS_desc(service_p, service_type, desc_p);

Parameters
service_p NCH_ObjectName * input. The NCH name for either the
desired IMS (if service_type is SVN_IMS) or BES (if service_
type is SVN_BES).

service_type WORD input. Either SVN_IMS or SVN_BES.

desc_p NCH_IMSDescValue * output. Pointer to the Clearinghouse


IMS Descriptor record.

See Also
“NCH_IMSDescValue” on page 393

“NCH_ObjectName” on page 395

December 1996 WAL for Windows Programmer’s Reference Manual 1175


7 WAL Function Reference
SVN_GetLocalAddr()

SVN_GetLocalAddr()
SVN_GetLocalAddr() retrieves the local area network (e.g., Ethernet) address
of the caller.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_GetLocalAddr(net_address);

Parameters
net_address_p
NCH_NetAddr_typ *. Pointer to the local area network
address of the caller.

See Also
“NCH_NetAddr_typ” on page 394

1176 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SVN_get_PS_desc()

SVN_get_PS_desc()
SVN_get_PS_desc() retrieves a Network Clearinghouse Print Service
Descriptor record for the specified Print Service.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_get_PS_desc(service_p, desc_p);

Parameters
service_p NCH_ObjectName * input. The NCH name for the Print
Service. If NULL, the default Print Service is used.

desc_p NCH_PrintServDescValue *. Input. Pointer to the


Clearinghouse Print Service Descriptor record.

See Also
“NCH_ObjectName” on page 395

“NCH_PrintServDescValue” on page 396

December 1996 WAL for Windows Programmer’s Reference Manual 1177


7 WAL Function Reference
SVN_IMSToStr()

SVN_IMSToStr()
SVN_IMSToStr() converts an ASE_service_name_typ structure to an NCH
name. This function returns 1 (TRUE) if name_len is greater then zero. It
returns zero (FALSE) if name_len is zero.

Syntax
#include <servname.i>

int CALLBACK SVN_IMSToStr(service_p, service_name, name_len);

Parameters
service_p ASE_service_name_typ * input. Pointer to the three-part
ASE_service_name_typ structure.

service_name PSTR output. NCH name. You must allocate enough memory
for the return value. It can be a maximum of 82 characters in
length.

name_len int input. Size of service_name. You can use sizeof (service_
name).

See Also
“ASE_service_name_typ” on page 178

1178 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
SVN_parse_service_name()

SVN_parse_service_name()
SVN_parse_service_name() takes a three-part NCH name and converts it to
an ASE_service_name_typ.

Syntax
#include <servname.i>

error_typ CALLBACK SVN_parse_service_name(service_name, service_p);

Parameters
service_name PSTR input. NULL terminated string in NCH format.

service_p NCH_ObjectName * output. Pointer to the three-part NCH_


objectName type.

See Also
“NCH_ObjectName” on page 395

The sample applications in the directories C:\FILENET\SAMPLE\TTYLIB\ and


C:\FILENET\SAMPLE\SECURITY\

December 1996 WAL for Windows Programmer’s Reference Manual 1179


7 WAL Function Reference
TTY_clear()

TTY_clear()
TTY_clear() clears the rectangular area specified.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_clear(tty_h, from_row, to_row, from_col, to_col);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

from_row unsigned short input. If less than 1, it is assumed to be 1.

to_row unsigned short input. If to_row exceeds the number of rows,


the number of rows is used.

from_col unsigned short input. If less than 1, it is assumed to be 1.

to_col unsigned short input. If to_col exceeds the number of


columns, the number of columns is used.

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

See Also
“TTY_init()” on page 1194

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

1180 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_clear_input()

TTY_clear_input()
TTY_clear_input() clears the input buffer.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_clear_input(tty_h);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

Error Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

See Also
“TTY_init()” on page 1194

December 1996 WAL for Windows Programmer’s Reference Manual 1181


7 WAL Function Reference
TTY_clear_msg()

TTY_clear_msg()
TTY_clear_msg() clears the message window associated with tty_h.

It is not necessary to call TTY_clear_msg() immediately before TTY_display_


msg(), because TTY_display_msg() clears the message window of its old
contents, replacing them completely with the new message.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_clear_msg(tty_h);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

See Also
“TTY_display_msg()” on page 1188

“TTY_init()” on page 1194

1182 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_clear_softkeys()

TTY_clear_softkeys()
TTY_clear_softkeys() clears the softkey labels from the menu bar and resets
the acceptable terminator list to contain just <Esc> and <Enter>.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_clear_softkeys(tty_h);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

Error Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

See Also
“TTY_init()” on page 1194

December 1996 WAL for Windows Programmer’s Reference Manual 1183


7 WAL Function Reference
TTY_create_window()

TTY_create_window()
TTY_create_window() creates and displays a TTY window with the specified
number of rows and columns and the specified title.

Rows and cols refer to the underlying character map, rather than the actual
display size of the window. The display size is under control of the user, rather
than the client of TTYLIB.

If TTY_create_window() is not called explicitly, a window is created when


another input or output call is made. In this case, the default values specified
in the call to TTY_init() are used.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_create_window(tty_h, rows, cols, title);

Parameters
tty_h HANDLE input. A handle obtained from TTY_init().

rows unsigned short input. Number of rows.

cols unsigned short input. Number of columns.

title PSTR input. Window title in the caption bar.

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

1184 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_create_window()

See Also
“TTY_init()” on page 1194

December 1996 WAL for Windows Programmer’s Reference Manual 1185


7 WAL Function Reference
TTY_display()

TTY_display()
TTY_display() displays the data, to which data points at the current caret
position, and advances the caret. Characters that would go off the end of a
row in the character map are wrapped onto the next row. If characters would
go off the bottom, the window scrolls, the top line disappears, and a blank line
appears at the bottom to accommodate the characters.

If count is zero, data must point to a NULL-terminated string of characters.


Otherwise, count is the maximum number of characters to display from the
buffer to which data points. Display is terminated when count characters have
been processed or when a NULL character is encountered.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_display(tty_h, data, count);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

data PSTR input. Pointer to buffer.

count unsigned short input. Maximum number of characters to be


displayed. If zero, display stops when a NULL character is
encountered.

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

1186 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_display()

See Also
“TTY_init()” on page 1194

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

December 1996 WAL for Windows Programmer’s Reference Manual 1187


7 WAL Function Reference
TTY_display_msg()

TTY_display_msg()
TTY_display_msg() replaces the contents of the message window with the
string to which data points. Since the message window is one row only, the
display is clipped to the size of the display window. (No characters are lost up
to the width of the character map. If the display window is widened, more of
the message is visible.)

Data must point to a NULL-terminated string of characters.

Note that it is not necessary to call TTY_clear_msg() immediately before


TTY_display_msg(), because TTY_display_msg() clears the message
window of its old contents, replacing them completely with the new message.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_display_msg(tty_h, data);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

data PSTR input. Pointer to a NULL-terminated string.

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

1188 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_display_msg()

See Also
“TTY_clear_msg()” on page 1182

“TTY_init()” on page 1194

December 1996 WAL for Windows Programmer’s Reference Manual 1189


7 WAL Function Reference
TTY_display_popup()

TTY_display_popup()
TTY_display_popup() displays the data in string in a popup window. Since this
function creates a new window for each call, the input data must be an
already-formatted, null-terminated ASCII string. It automatically formats the
text with left-justification and word wrapping.

The popup window is a dialog box. If wait has the value TTY_FORUSER, the
popup contains a Continue button that must be pressed by the user in order to
continue. (TTY_FORUSER is defined to be 10000 seconds. After 10000
seconds, the window disappears and the application continues.)

Otherwise, wait is taken to be the number of seconds to display the popup


window. The window disappears after wait seconds or immediately, if the user
presses the Enter or Esc key.

modal determines whether control returns immediately to the caller or only


when the popup window disappears. If modal is TRUE, TTY_display_popup()
does not return until the popup window disappears. If modal is FALSE, the call
returns immediately.

Only one popup window is displayed for a given tty_h at a time. If TTY_
display_popup() is called in a re-entrant manner (while a popup is visible), the
old popup is removed before the new one is created.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_display_popup(tty_h, string, wait, modal);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

string PSTR input. NULL-terminated string to be displayed.

wait unsigned short input. Number of seconds before the window


disappears and the application continues.

modal BOOL input. If TRUE, the popup window is a modal dialog


box; otherwise, the popup window is a modeless dialog box.

1190 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_display_popup()

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_no_timer
TTYLIB error: The wait parameter is not set.

See Also
“TTY_init()” on page 1194

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

December 1996 WAL for Windows Programmer’s Reference Manual 1191


7 WAL Function Reference
TTY_exit()

TTY_exit()
TTY_exit() destroys the TTY window associated with tty_h and frees all
resources allocated on its behalf.

tty_h is a handle obtained from TTY_init(). It is invalid on return from TTY_


exit().

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_exit(tty_h);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

See Also
“TTY_init()” on page 1194

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

1192 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_get_pos()

TTY_get_pos()
TTY_get_pos() returns the current cursor position within the TTY window.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_get_pos(tty_h, row, col);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

row unsigned short * output. Row position.

col unsigned short * output. Column position.

Error Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

See Also
“TTY_init()” on page 1194

December 1996 WAL for Windows Programmer’s Reference Manual 1193


7 WAL Function Reference
TTY_init()

TTY_init()
TTY_init() returns a handle for client-relative data needed by the F3TTYLIB
DLL to perform its other functions. This function should be called exactly once
by each client application for each TTY window it wants to display. The handle
returned is required input for the other TTY functions.

def_rows and def_cols are the dimensions of the character map to be


allocated for the window. The actual allocation is not performed until TTY_
create_window(), TTY_display(), TTY_display_msg(), or some other input or
output call is made. TTY_create_window() can override the row and column
dimensions of the TTY window.

def_title is the default title to be used for the window, unless overridden by
TTY_create_window().

If the handle returned is NULL, the function failed.

Syntax
#include <ttylib.i>

HANDLE CALLBACK TTY_init(def_rows, def_cols, def_title);

Parameters
def_rows unsigned short input. Number of rows.

def_cols unsigned short input. Number of columns.

def_title PSTR input. Window title in the caption bar.

See Also
“TTY_create_window()” on page 1184

“TTY_display()” on page 1186

“TTY_display_msg()” on page 1188

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

1194 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_make_current()

TTY_make_current()
TTY_make_current() performs the action(s) specified in style, which can be a
combination of:

TTY_BRING_TO_TOP Bring the tty window to the top.


TTY_ACTIVATE Make the tty window active.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_make_current(tty_h, style);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

style WORD input. Window style. Can be TTY_ACTIVATE or TTY_


BRING_TO_TOP, or both

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

See Also
“TTY_init()” on page 1194

December 1996 WAL for Windows Programmer’s Reference Manual 1195


7 WAL Function Reference
TTY_read_input()

TTY_read_input()
TTY_read_input() displays characters from the keyboard buffer at the current
caret position and advances the caret. Unlike TTY_display(), rather than wrap
or scroll echoed characters in the TTY window, this function superimposes an
edit control in the correct position and enables input, with full editing
functionality, in the control. When a terminator is encountered, or the wait
expires, the contents of the control are returned in input_string and echoed to
the TTY window, clipped to the current row.

User input in the edit control is limited to size characters. No more than size
characters are echoed or returned. If non-terminator keys are pressed after
size characters have been entered, a beep sounds to alert the user. These
characters are thrown away.

If wait has the value TTY_FORUSER, TTY_read_input() waits for the user to
press a terminator in order to return the data. Otherwise, wait is taken to be
the number of seconds to wait for input. The call returns after wait seconds or
immediately, if the user presses the Enter, Space, or Esc key.

The code for the actual terminator pressed is returned in terminator_p. If size
is zero, only the terminator is returned.

Because the return data is always null-terminated, the actual size of the buffer
to which data points must be at least one greater than size.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_read_input(tty_h, input_string, size, wait,


terminator_p);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

input_string PSTR output. String of characters entered by user.

size unsigned short input. Maximum number of characters to


return.

wait unsigned short input. Number of seconds before window


disappears and continues.

1196 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_read_input()

terminator_p int * output. Terminator of this window.

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

See Also
“TTY_display()” on page 1186

“TTY_init()” on page 1194

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

December 1996 WAL for Windows Programmer’s Reference Manual 1197


7 WAL Function Reference
TTY_scroll()

TTY_scroll()
TTY_scroll() scrolls the rectangular area specified. If from_row or from_col is
less than 1, it is assumed to be 1. If to_row or to_col exceeds the number of
rows or columns respectively, it is assumed to be that number. If direction is
TTY_UP, the top row in the area is discarded, all rows between the top and
bottom rows move up one row, and the bottom row is blank-filled. If direction is
TTY_DOWN, the bottom row is discarded, all rows move down one row, and
the top row is blank-filled.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_scroll(tty_h, from_row, to_row, from_col, to_col,


direction);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

from_row unsigned short input. The top row of the rectangle.

to_row unsigned short input. The bottom row of the rectangle.

from_col unsigned short input. The left column of the rectangle.

to_col unsigned short input. The right column of the rectangle.

direction unsigned char input. Specifies the direction to scroll. Can be


TTY_UP or TTY_DOWN.

Errors Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

1198 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_scroll()

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

See Also
“TTY_init()” on page 1194

December 1996 WAL for Windows Programmer’s Reference Manual 1199


7 WAL Function Reference
TTY_set_app_info_key()

TTY_set_app_info_key()
TTY_set_app_info_key() sets the key (80-character maximum) under which
window size and position are saved in the LOGON.CFG file. If the key is
empty when the window is closed, the information is not saved. If the key is
empty when the window is created (or the key is not found in the
LOGON.CFG file), the position and size are determined by default.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_set_app_info_key(tty_h, key);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

key PSTR input. NULL-terminated data to be set in LOGON.CFG


file.

Error Returned
TTY_bad_tty_handle
TTYLIB error: Bad handle.

See Also
“TTY_init()” on page 1194

1200 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_set_pos()

TTY_set_pos()
TTY_set_pos() sets the cursor position within the TTY window. If the point
specified by row and col is not in the character map, the cursor position does
not move and an error is returned.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_set_pos(tty_h, row, col);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

row unsigned short input. Row position.

col unsigned short input. Column position.

Errors Returned
TTY_bad_position
TTYLIB error: Either row or column is out of the display area.

TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

See Also
“TTY_init()” on page 1194

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

December 1996 WAL for Windows Programmer’s Reference Manual 1201


7 WAL Function Reference
TTY_set_softkeys()

TTY_set_softkeys()
TTY_set_softkeys() puts the softkey labels into the menu bar and the
corresponding keys into the acceptable terminator list. You can set up to eight
softkeys (VK_F1 to VK_F8).

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_set_softkeys(tty_h, count, labels_p);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

count unsigned short input. Number of softkeys in labels_p.

labels_p TTY_softkey_label * input. Pointer to a list of structures


containing the string labels for the softkeys.

Errors Returned
TTY_softkey_not_available
TTYLIB error: Trying to set softkeys other than VK_F1 to VK_F8.

TTY_bad_tty_handle
TTYLIB error: Bad handle.

TTY_win_open
TTYLIB error: Specified window already exists.

TTY_map_too_big
TTYLIB error: Bad position (rows*columns is greater than 0xFFFFL).

TTY_no_memory
TTYLIB error: Not enough memory to do GlobalAlloc.

TTY_no_window
TTYLIB error: CreateWindow failed.

1202 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
TTY_set_softkeys()

See Also
“TTY_init()” on page 1194

“TTY_softkey_label” on page 529

The sample application in the directory C:\FILENET\SAMPLE\TTYLIB\

December 1996 WAL for Windows Programmer’s Reference Manual 1203


7 WAL Function Reference
TTY_update_window()

TTY_update_window()
TTY_update_window() causes the display window to show the results of
display commands immediately. Otherwise, the display is repainted only when
there is relatively little else for any application to do.

Syntax
#include <ttylib.i>

error_typ CALLBACK TTY_update_window(tty_h);

Parameters
tty_h HANDLE input. Handle obtained from TTY_init().

See Also
“TTY_init()” on page 1194

1204 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_close_queue()

WQS_close_queue()
WQS_close_queue() closes a queue. It frees the resources allocated to
maintain the queue in the opened state. The client should call this function
when no further operation on the queue will be performed.

Do not attempt to use the queue handle after a WQS_close_queue() function


call, whether the close queue function is successful or not; queue_h is not a
valid queue handle for further operations.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_close_queue(queue_h);

Parameters
queue_h HANDLE input. The queue handle. Obtained from WQS_
open_queue().

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

See Also
“WQS_open_queue()” on page 1230

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1205


7 WAL Function Reference
WQS_continue()

WQS_continue()
WQS_continue() extends the duration of the service logon. It alerts Queue
Services to keep the service logon alive. The service logon remains alive for
at least timeout_p more seconds.

WQS_continue has been obsolete since the 3.0 release. The task that this
function performs has been taken care of internally.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_continue(remote_info_h, timeout_p);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

timeout_p WORD * output. Pointer to the minimum amount of time in


seconds that logon will remain alive.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

See Also
“WQS_logon()” on page 1228

1206 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_count_entries()

WQS_count_entries()
WQS_count_entries() returns the number of queue entries in a queue that
satisfies a specified set of filter conditions.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_count_entries(queue_h, filter_p, count_p);

Parameters
queue_h HANDLE input. The queue handle. Obtained from WQS_
open_queue().

filter_p WQSLIB_fetch_spec_typ * input. Pointer to the filter


condition. If no filter condition is specified, filter_p should be
NULL, and the total number of entries in the queue is
returned.

count_p unsigned long * output. Pointer to the number of entries


satisfying the filter condition.

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_invalid_find_field
The filter condition contains an undefined user_field.

See Also
“WQS_open_queue()” on page 1230

“WQSLIB_fetch_spec_typ” on page 545

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1207


7 WAL Function Reference
WQS_create_queue()

WQS_create_queue()
WQS_create_queue() sets up a new queue by allocating the appropriate
storage, creating the data base table, and entering the name of the queue into
the Clearinghouse.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_create_queue(session_h, queue_desc_p);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

queue_desc_p WQSLIB_queue_desc_typ * input. Pointer to the description


of the queue to be created.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

WQS_err_invalid_workspace
The specified workspace does not exist.

If you try to create a queue that’s already created, the error message returned
depends on the server software version.

WQS_err_queue_already_defined
The specified queue already exists, for IMS v3.0.1 or later.

NCH_NoChange_error
The specified queue already exists, for IMS v2.6.

See Also
“WQS_logon()” on page 1228

“WQSLIB_queue_desc_typ” on page 548

1208 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_create_workspace()

WQS_create_workspace()
WQS_create_workspace() creates a workspace by setting up the necessary
directories and Clearinghouse entry. The function is successful if the
workspace already exists.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_create_workspace(session_h, workspace,


restrictions_p, text_desc);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

workspace WQS_workspace_name_typ input. Name of the workspace


to be created.

restrictions_p SCT_access_restrictions * input. Pointer to the set of access


restrictions associated with the workspace.

text_desc PSTR input. A text description of the workspace.

Errors Returned
WQS_err_no_resources
Insufficient resources.

WQS_err_bad_workspace_name
Syntax error (illegal characters) in the workspace name. The
workspace name must begin with a letter.

WQS_err_workspace_not_created
Failed to create workspace.

December 1996 WAL for Windows Programmer’s Reference Manual 1209


7 WAL Function Reference
WQS_create_workspace()

See Also
“WQS_logon()” on page 1228

“SCT_access_restrictions” on page 481

“WQS_workspace_name_typ” on page 544

1210 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_delete_entry()

WQS_delete_entry()
WQS_delete_entry() deletes one or more entries from a queue. None of the
entries are deleted if an error is encountered.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_delete_entry(queue_h, num_entries, entry_id);

Parameters
queue_h HANDLE input. The queue handle. Obtained from WQS_
open_queue().

num_entries unsigned short input. Number of entries to delete.

entry_id PSTR input. Specifies the entries to be deleted, a contiguous


array of WQS_entry_id_typ containing null-terminated strings
19 characters in length.

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_invalid_entry_id
The specified entry ID does not exist.

WQS_err_security_violation
Operator does not have write access.

See Also
“WQS_open_queue()” on page 1230

“WQS_entry_id_typ” on page 532

December 1996 WAL for Windows Programmer’s Reference Manual 1211


7 WAL Function Reference
WQS_delete_queue()

WQS_delete_queue()
WQS_delete_queue() deletes a queue from the workspace. The queue to be
deleted must not be open by a client. The database table for the queue is
dropped and the object name of the queue is removed from the
Clearinghouse when the deletion is completed.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_delete_queue(session_h, workspace,


queue_name, even_if_full);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

workspace PSTR input. Name of the WorkFlo workspace to which the


queue belongs.

queue_name PSTR input. Name of the queue to be deleted.

even_if_full FN_BOOL input. A boolean indicating whether the queue is


to be deleted even if it contains valid entries. If FALSE, the
queue must be empty for the deletion to be successful.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

WQS_err_invalid_workspace
The specified workspace does not exist.

WQS_err_queue_not_defined
The specified queue does not exist.

WQS_err_queue_in_use
The specified queue is set to busy (might be in use by others).

1212 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_delete_queue()

WQS_err_queue_not_empty
Queue is not empty and the parameter even_if_full is set to FALSE.

WQS_err_security_violation
Operator does not have write access.

See Also
“WQS_logon()” on page 1228

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1213


7 WAL Function Reference
WQS_delete_workspace()

WQS_delete_workspace()
WQS_delete_workspace() deletes a workspace by removing the directories
and Clearinghouse entry associated with the workspace. To be successfully
deleted, the workspace must contain neither queues nor procedures.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_delete_workspace(session_h, workspace);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

workspace WQS_workspace_name_typ input. Pointer to the name of the


WorkFlo workspace to be deleted.

Errors Returned
WQS_err_invalid_workspace
The specified workspace does not exist.

WQS_err_workspace_not_deleted
Workspace not deleted, possibly not empty.

WQS_err_security_violation
You don’t have write access.

See Also
“WQS_logon()” on page 1228

“WQS_workspace_name_typ” on page 544

1214 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_end_dump()

WQS_end_dump()
WQS_end_dump() terminates a dump. On return, dump_h is invalid for
further dump operations. The resources allocated to maintain the dump are
freed.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_end_dump(dump_h);

Parameters
dump_h HANDLE input. The dump handle. Obtained from WQS_
start_dump().

Errors Returned
WQS_err_invalid_dump_handle
Invalid dump handle.

See Also
“WQS_start_dump()” on page 1243

December 1996 WAL for Windows Programmer’s Reference Manual 1215


7 WAL Function Reference
WQS_get_default_service()

WQS_get_default_service()
WQS_get_default_service() returns the NCH object name of the default
Queue Services on the FileNet system.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_get_default_service(queue_service_p);

Parameters
queue_service_p
ASE_service_name_typ * output. The NCH object name of
the default Queue Service.

See Also
“ASE_service_name_typ” on page 178

1216 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_get_queue_desc()

WQS_get_queue_desc()
WQS_get_queue_desc() returns the definition of an existing queue.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_get_queue_desc (session_h, workspace,


queue_name, queue_desc_h_p);

Parameters
session_h HANDLE input. The session handle.

workspace WQS_workspace_name_typ input. Pointer to the name of the


WorkFlo workspace to which the queue belongs.

queue_name WQS_queue_name_typ input. Pointer to the name of the


queue.

queue_desc_h_p
HANDLE * output. Pointer to the returned handle to the
definition of the queue. It is of type WQSLIB_queue_desc_
typ.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

WQS_err_invalid_workspace
The specified workspace does not exist.

WQS_err_queue_not_defined
The specified queue does not exist.

WQS_err_security_violation
Operator does not have write access.

December 1996 WAL for Windows Programmer’s Reference Manual 1217


7 WAL Function Reference
WQS_get_queue_desc()

See Also
“WQS_queue_name_typ” on page 538

“WQS_workspace_name_typ” on page 544

“WQSLIB_queue_desc_typ” on page 548

1218 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_get_queue_names()

WQS_get_queue_names()
WQS_get_queue_names() returns the number of queues in a given
workspace and a list of queue names.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_get_queue_names(domain_p, workspace,


pattern, num_returned_p, queuelist_h_p);

Parameters
domain_p NCH_DomainName * input. Pointer to the domain to search;
NULL for default domain.

workspace WQS_workspace_name_typ input. Pointer to the name of the


WorkFlo workspace.

pattern WQS_queue_name_typ input. A partial queue name; only


queues containing this pattern in the name are found. The
partial queue name can contain the wild card characters ‘?’
and ‘*’, if appropriate. If pattern is NULL, the names of all the
queues in the workspace are returned.

num_returned_p
unsigned short * output. Pointer to the number of queue
names returned in queuelist_h_p.

queuelist_h_p HANDLE * output. Pointer to the handle for a list of the queue
names found; list of WQS_queue_name_typ.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

WQS_err_invalid_workspace
The specified workspace does not exist.

December 1996 WAL for Windows Programmer’s Reference Manual 1219


7 WAL Function Reference
WQS_get_queue_names()

See Also
“NCH_DomainName” on page 391

“WQS_queue_name_typ” on page 538

“WQS_workspace_name_typ” on page 544

The sample application in the directory C:\FILENET\SAMPLE\WQS

1220 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_get_server_name()

WQS_get_server_name()
WQS_get_server_name() returns the NCH object name of the WorkFlo
Queue Server responsible for servicing the named queue.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_get_server_name(domain_p, workspace,


queue_name, queue_service_p);

Parameters
domain_p NCH_DomainName * input. Pointer to the NCH name of the
domain to search.

workspace PSTR input. Name of the WorkFlo workspace to which the


queue belongs.

queue_name PSTR input. Name of the queue.

queue_service_p
ASE_service_name_typ * output. Pointer to the name of the
WorkFlo Queue Server responsible for servicing the queue
returned.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

WQS_err_invalid_workspace
The specified workspace does not exist.

WQS_err_queue_not_defined
The specified queue does not exist.

See Also
“ASE_service_name_typ” on page 178

“NCH_DomainName” on page 391

December 1996 WAL for Windows Programmer’s Reference Manual 1221


7 WAL Function Reference
WQS_get_workspace_info()

WQS_get_workspace_info()
WQS_get_workspace_info() returns the security information and the text
description of the workspace for a specified workspace name. This function is
for Series 6000 systems only.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_get_workspace_info(session_h, workspace,


restrictions_p, text_desc);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

workspace WQS_workspace_name_typ input. Name of the workspace


to be queried.

restrictions_p SCT_access_restrictions * output. Pointer to the set of


access restrictions associated with the workspace.

text_desc PSTR input. A text description of the workspace to be


updated.

Errors Returned
WQS_err_invalid_session_handle
Specified session handle does not match the current active session.

WQS_err_invalid_workspace
Specified workspace does not exist.

WQS_err_bad_workspace_name
Workspace name must begin with a letter.

See Also
“SCT_access_restrictions” on page 481

“WQS_workspace_name_typ” on page 544

1222 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_get_workspace_names()

WQS_get_workspace_names()
WQS_get_workspace_names() returns the names of the workspaces defined
in the specified domain.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_get_workspace_names(domain_p, ws_pattern,


num_returned_p, ws_list_h_p);

Parameters
domain_p NCH_DomainName * input. NCH name of the domain to
search; NULL for the default domain.

ws_pattern WQS_workspace_name_typ input. A partial workspace


name; only queues containing this pattern in the name are
found. Wildcards can be used.

num_returned_p
unsigned short * output. Pointer to the number of workspace
names returned.

ws_list_h_p HANDLE * output. Pointer to the handle to a list of the


workspace names found.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

See Also
“NCH_DomainName” on page 391

“WQS_workspace_name_typ” on page 544

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1223


7 WAL Function Reference
WQS_insert_entry()

WQS_insert_entry()
WQS_insert_entry() inserts one or more entries into a queue. The insert
operation is a single operation even if more than one entry is to be inserted. If
an error occurs, none of the entries are successfully inserted.

When inserting a new entry into an ordinary queue, all the fields declared as
“required” must be assigned data.

When inserting a new entry into a queue (ordinary or rendezvous), user-


defined fields that are not specified are set to the NULL value. System-defined
fields that are not specified are set to their respective default values.
Furthermore, the system-defined field “busy” must not be explicitly specified.

When passing string length via the WQSLIB_queue_field_choice_typ field


qf_string_offset, be sure qf_string_offset equals the exact string length
without terminators.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_insert_entry(queue_h, num_entries, entry_in_p);

Parameters
queue_h HANDLE input. The queue handle. Obtained from WQS_
open_queue().

num_entries unsigned short input. The number of entries to be inserted.

entry_in_p WQSLIB_queue_entry_in_typ * input. Pointer to the


definitions of the entries to be inserted.

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_rendez_field_missing
The rendezvous field is missing.

WQS_err_required_field_missing
A required field is missing.

1224 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_insert_entry()

WQS_err_illegal_write_field
Illegal write field; should check status.

WQS_err_invalid_user_field
The specified user-defined field does not exist.

WQS_err_invalid_field_value
Invalid field value detected on insertion.

WQS_err_invalid_sys_field
The specified system field does not exist.

WQS_err_invalid_sys_field_data
The data type is not comparable with the system defined queue field.

WQS_err_field_specified_twice
The queue field is specified more than once.

WQS_err_security_violation
Operator does not have write access.

WQS_err_dup_unique_val
The entry already exists with the same value for a unique field.

See Also
“WQS_open_queue()” on page 1230

“WQSLIB_queue_entry_in_typ” on page 550

“WQSLIB_queue_field_choice_typ” on page 552

“WQSLIB_queue_entry_in_typ” on page 550

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1225


7 WAL Function Reference
WQS_is_WQS()

WQS_is_WQS()
WQS_is_WQS() checks to see whether the currently logged on IMS is using
the WQS or WQM server service. Server software prior to release 2.6 uses
the WQM service. Server software release 3.0 and later use the WQS
service. This function does not require WQS_logon().

For example, you might have an application that runs against two versions of
the server software (2.6 and 3.0). Your application could then include both 2.6
and 3.0 functionality. To learn, at runtime, which WorkFlo queue
library (WQS2WQM or WQSLIB) is being used, call WQS_is_WQS(). Then,
change your application’s functionality accordingly.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_is_WQS(is_wqs);

Parameters
is_wqs BOOL * output. Returns TRUE if currently logged on to IMS
software release 3.0 or later. Returns FALSE if currently
logged on to IMS software release 2.6 or earlier.

1226 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_logoff()

WQS_logoff()
WQS_logoff() terminates a service logon with a Queue Service. The client
should use this function to log off from a Queue Service if no further
processing will be done. All the resources allocated to maintain the service
logon are freed. Any attempt to use the same session handle after a
successful logoff results in an invalid service handle error.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_logoff(session_h);

Parameters
session_h HANDLE input. The session handle.

See Also
“WQS_logon()” on page 1228

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1227


7 WAL Function Reference
WQS_logon()

WQS_logon()
WQS_logon() establishes a service logon with a WorkFlo Queue Service.
Every client must first log on to a Queue Service before attempting any other
function. The returned session handle should be used for WQS_open_
queue() calls.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_logon(credential, queue_service_p,


session_h_p, timeout_p);

Parameters
credential PSTR input. Unused parameter since release 3.1.

queue_service_p
ASE_service_name_typ * input. Name of the Queue Service
to log on to. This can be NULL to log on to the default Queue
Service.

session_h_p HANDLE * output. Pointer to the session handle returned by


the Queue Service upon a successful service logon. This
handle must be used on subsequent calls to functions that
require a service handle as a parameter.

timeout_p WORD * output. Pointer to the minimum amount of time in


seconds that the service logon will remain alive.

Errors Returned
WQS_err_no_resources
Insufficient resources.

WQS_err_service_not_available
The specified service is undefined.

WQS_err_bad_version
Running on a incompatible version of WQS services.

1228 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_logon()

See Also
“WQS_open_queue()” on page 1230

“WQS_qlogon()” on page 1232

“ASE_service_name_typ” on page 178

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1229


7 WAL Function Reference
WQS_open_queue()

WQS_open_queue()
WQS_open_queue() opens a queue for processing and returns a queue
handle that must be passed to function calls that use this queue. After a
queue is opened, new entries can be inserted and entries can be retrieved or
deleted.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_open_queue(session_h, workspace,


queue_name, return_desc, queue_h_p, queue_desc_h_p);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

workspace WQS_workspace_name_typ input. Name of the WorkFlo


workspace to which the queue belongs.

queue_name WQS_queue_name_typ input. Name of the queue to be


opened.

return_desc FN_BOOL input. A boolean specifying whether the definition


of the queue is to be returned.

queue_h_p HANDLE * output. Pointer to the queue handle returned,


which should be used on all future operations related to the
queue. For some operations, a dump handle is used instead.

queue_desc_h_p
HANDLE * output. Pointer to the handle for the queue
description of type WQSLIB_queue_desc_typ.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

WQS_err_invalid_workspace
The specified workspace does not exist.

1230 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_open_queue()

WQS_err_queue_not_defined
The specified queue does not exist.

WQS_err_no_resources
Insufficient resources.

See Also
“WQS_logon()” on page 1228

“WQS_queue_name_typ” on page 538

“WQS_workspace_name_typ” on page 544

“WQSLIB_queue_desc_typ” on page 548

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1231


7 WAL Function Reference
WQS_qlogon()

WQS_qlogon()
WQS_qlogon() establishes a service logon with the WorkFlo Queue Service
responsible for servicing the specified queue. WQS_qlogon() can be called
instead of WQS_logon() if the workspace and the name of the queue to be
accessed are known.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_qlogon(domain_p, workspace, queue_name,


credential, session_h_p, timeout_p)

Parameters
domain_p NCH_DomainName * input. The domain and organization
where the queue is defined.

workspace WQS_workspace_name_typ input. Name of the workspace.

queue_name WQS_queue_name_typ input. Name of the queue.

credential PSTR input. Unused parameter since release 3.1.

session_h_p HANDLE * output. Pointer to the session handle returned by


the Queue Service servicing the named queue.

timeout_p WORD * input. Pointer to the minimum amount of time in


seconds that the service logon will remain alive.

Errors Returned
WQS_err_invalid_service_handle
Invalid service handle.

WQS_err_invalid_workspace
The specified workspace does not exist.

WQS_err_queue_not_defined
The specified queue does not exist.

WQS_err_no_resources
Insufficient resources.

1232 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_qlogon()

See Also
“WQS_logon()” on page 1228

“NCH_DomainName” on page 391

“WQS_queue_name_typ” on page 538

“WQS_workspace_name_typ” on page 544

December 1996 WAL for Windows Programmer’s Reference Manual 1233


7 WAL Function Reference
WQS_read_dump()

WQS_read_dump()
WQS_read_dump() retrieves the next one or more entries that satisfy a set of
filter conditions from a dumped queue. The client can call WQS_read_dump()
repeatedly to get the next block of entries until all the entries have been
processed.

WQS_read_dump() has the following advantages:

• When reading multiple times, WQS_read_dump() is faster than WQS_


read_queue(). WQS_read_queue() is designed for a one-time read.

• WQS_read_dump() does not lock the queue. This is an advantage when


more than one user wants to access the queue.

• You can call WQS_read_dump() multiple times and it continues where it


left off. WQS_read_queue() does not have this capability.

• WQS_read_dump() contains a parameter that signals the application


when there are no more entries that satisfy the condition.

NOTES
1 For performance reasons, the num_entries parameter should not be too large
or too small. The recommended number is 16. The example on page 1235
shows code that uses WQS_read_dump() in a loop.

If the num_entries is huge, the WorkFlo Queue Service (WQSs or WQMs


server process) must allocate enough memory to hold all the entries.
Although the allocated memory is freed before WQS_read_dump() returns,
the kernel still reserves memory until the server process finishes.

2 Before freeing the entry_out_h_p handle, you must free all the handles within
the WQSLIB_queue_entry_out_typ structure for every num_read_p returned.
For more information, see the example on page 1235.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_read_dump(dump_h, num_entries, num_read_p,


entry_out_h_p, finished_p);

1234 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_read_dump()

Parameters
dump_h HANDLE input. The dump handle of the desired dump.
Obtained from WQS_start_dump().

num_entries unsigned short input. The number of entries to read.

num_read_p unsigned short * output. Pointer to the number of entries


actually read; can be less than the number requested, but is
at least one if more entries are pending.

entry_out_h_p
HANDLE * output. Pointer to a handle to the entries read, an
array of num_read WQSLIB_queue_entry_out_typ. You are
responsible for freeing this handle. For more information
about how to free this handle, see the notes on page 1234
and the code example on page 1235.

finished_p FN_BOOL * output. Pointer to a boolean specifying whether


there are any more entries satisfying the condition. A value of
TRUE means the queue entry read is the last of the dump;
otherwise, more queue entries might be pending.

Errors Returned
WQS_err_invalid_dump_handle
Invalid dump handle.

See Also
“WQS_read_queue()” on page 1240

“WQS_start_dump()” on page 1243

“WQSLIB_queue_entry_out_typ” on page 551

Example
#include <wqslib.i>

error_typ CALLBACK Read_Dump(HWND hWnd)


{
error_typ err = success;
// success is defined as 0
ASE_doc_id_typ docid;

December 1996 WAL for Windows Programmer’s Reference Manual 1235


7 WAL Function Reference
WQS_read_dump()

ASE_service_name_typ wqs;
WQS_workspace_name_typ ws_name;
WQS_queue_name_typ q_name;
WQSLIB_queue_entry_out_typ *qout_p = NULL;
WQSLIB_user_field_value_typ *ufv_p = NULL;
unsigned short max_read = 16, num_read = 0;
HANDLE wqs_h = 0, que_h = 0, dum_h = 0, qout_h = 0;
WORD q_timeout = 0;
BOOL done = FALSE;

if(err = WQS_get_default_service(&wqs)) goto Exit;

// the first parameter of WQS_logon is a dummy


err = WQS_logon(NULL, &wqs, &wqs_h, &q_timeout);
if (err) goto Exit;

lstrcpy(ws_name, "pub_ws"); // get workspace name lstrcpy(q_name,


"pub_que1"); // get queue name

err = WQS_open_queue
(wqs_h, ws_name, q_name, FALSE, &que_h, NULL);
if (err) goto Exit;

err = WQS_start_dump
(que_h, (WQSLIB_fetch_spec_typ *)NULL, &dum_h);
if (err) goto Exit;

// read the whole dump queue 16 entries at a time


while (!(err || done)) {
err = WQS_read_dump
(dum_h, max_read, &num_read, &qout_h, &done);
if (err) goto Exit;

if (num_read > 0 && q_out_h) {


// lock the qout_h handle
qout_p = (WQSLIB_queue_entry_out_typ *)
GlobalLock(qout_h);
if (qout_p == NULL)
// code here to handle error of no resources

// parse queue contents


for (ii=0;ii<num_read;ii++,qout_p++) {
// lock user field value hanlde
ufv_p = (WQSLIB_user_field_value_typ *)
GlobalLock(qout_p->user_field_val_h);

1236 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_read_dump()

if (ufv_p == NULL)
// code here to handle error of no resources

//following is an example of retrieving a docid


docid = ufv_p->field_value.val.qf_docid_value;

if (ufv_p)
GlobalUnlock(qout_p->user_field_val_h);

// free handles within the qout_h handle


if (qout_p->user_field_val_h)
GlobalFree(qout_p->user_field_val_h)
if (qout_p->string_val_h)
GlobalFree(qout_p->string_val_h)
if (qout_p->sys_field_val_h)
GlobalFree(qout_p->sys_field_val_h)
} // end for
} // end if (lock the qout_h handle)

if (qout_p) {
GlobalUnlock(qout_h);
GlobalFree(qout_h);
}
} // end while (WQS_read_dump is not done)

Exit:
if (dum_h) WQS_end_dump(dum_h);
if (que_h) WQS_close_queue(que_h);
if (wqs_h) WQS_logoff(wqs_h);
return (err); // error handling from the caller.
} // Read_Dump

December 1996 WAL for Windows Programmer’s Reference Manual 1237


7 WAL Function Reference
WQS_read_entry()

WQS_read_entry()
WQS_read_entry() retrieves a specific entry, the identification of which is
already known.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_read_entry(queue_h, entry_id, incomplete,


even_busy, set_busy, entry_out_h_p);

Parameters
queue_h HANDLE input. The queue handle of the desired queue.

entry_id PSTR input. The identification of the entry to be read. This


entry_id must have been returned from a call to WQS_read_
queue() in the current service logon.

incomplete FN_BOOL input. A boolean specifying whether to retrieve the


entry if it is incomplete. If the value is FALSE, all the required
fields in the entry must have data for the read operation to be
successful. Otherwise, the read will be successful as long as
the entry exists.

even_busy FN_BOOL input. A boolean specifying whether to retrieve the


entry if its status is busy. If FALSE, the busy field of the entry
must be “available” in order for the read to be successful.
Otherwise, the read will be successful as long as the entry
exists, regardless of the busy field setting.

set_busy FN_BOOL input. A boolean specifying whether the status of


the retrieved entry should be set to busy or not. If TRUE, the
busy field of the entry is set to TRUE. Otherwise, the busy
field retains its original value.

entry_out_h_p
HANDLE * output. Pointer to a handle to the retrieved entry,
WQSLIB_queue_entry_out_typ.

1238 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_read_entry()

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_invalid_entry_id
The specified entry id does not exist.

WQS_err_no_entry_selected
No entry is currently selected.

WQS_err_security_violation
Operator does not have read access.

See Also
“WQS_read_queue()” on page 1240

“WQSLIB_queue_entry_out_typ” on page 551

December 1996 WAL for Windows Programmer’s Reference Manual 1239


7 WAL Function Reference
WQS_read_queue()

WQS_read_queue()
WQS_read_queue() retrieves one or more queue entries that satisfy a set of
filter conditions.

For performance reasons, make the max_to_read parameter neither too large
nor too small. (The recommended number is 16.)

If you specify set_busy to TRUE and delete_spec to WQS_delete_none, also


specify the status_spec field (in the filter_p structure) to WQS_busy_not_ok.
Otherwise, WQS_read_queue() returns the first queue entry over and over.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_read_queue(queue_h, filter_p, num_entries,


set_busy, delete_spec, num_read_p, entry_out_h_p)

Parameters
queue_h HANDLE input. The queue handle of the desired queue.

filter_p WQSLIB_fetch_spec_typ * input. Specifies the set of filter


conditions.

num_entries unsigned short input. The maximum number of entries to


retrieve. Must be at least one. Note that if more than one
entry is to be retrieved and the set_busy flag is set to TRUE,
the client is responsible for any clean-up operation.

set_busy FN_BOOL input. A boolean flag specifying whether the status


of the retrieved entries should be set to busy (processing
mode) or not (read-only mode). If the value is TRUE, the read
operation is in processing mode, the busy flag of the entries
retrieved is set to TRUE, and the delete flag (delete_spec) is
further interpreted. Otherwise, the operation is in a read-only
mode, and the delete flag is ignored.

delete_spec WQS_delete_typ input. Specifies which entry (if any) is to be


deleted. This value is interpreted only if set_busy is TRUE. If
this value is WQS_delete_none, no entry is deleted. If the
value is WQS_delete_current, the entry or entries retrieved
are deleted immediately after the read. If the value is WQS_
delete_previous, the previously-retrieved entry is deleted

1240 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_read_queue()

from the queue (if more than one entry was previously
retrieved, only the last entry previously retrieved is deleted).

num_read_p unsigned short * output. Pointer to the number of retrieved


entries.

entry_out_h_p
HANDLE * output. Pointer to a handle to the retrieved entries,
an array of num_read WQSLIB_queue_entry_out_typ.

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_invalid_find_field
The delete condition contains an undefined user_field.

WQS_err_no_entry_selected
No entry is currently selected.

WQS_err_security_violation
Operator does not have read access.

See Also
“WQS_delete_typ” on page 530

“WQSLIB_fetch_spec_typ” on page 545

“WQSLIB_queue_entry_out_typ” on page 551

The sample application in the directory C:\FILENET\SAMPLE\WQS

December 1996 WAL for Windows Programmer’s Reference Manual 1241


7 WAL Function Reference
WQS_renew()

WQS_renew()
WQS_renew() re-establishes a service logon with a WorkFlo Queue Service.

WQS_renew() has been obsolete since the 3.0 release. This function
reestablishes a session that was dropped due to a timeout. However, this has
been taken care of internally.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_renew(user_id, queue_service_p, session_h,


timeout_p)

Parameters
user_id PSTR input. Identification of the user, for security purpose.

queue_service_p
ASE_service_name_typ * input. Name of the Queue Service.

session_h HANDLE input. The session handle.

timeout_p WORD * output. Pointer to the minimum amount of time in


seconds that the service logon will remain alive.

Errors Returned
WQS_err_no_resources
Insufficient resources.

WQS_err_service_not_available
The specified service is undefined.

WQS_err_bad_version
Running on a incompatible version of WQS services.

See Also
“ASE_service_name_typ” on page 178

1242 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_start_dump()

WQS_start_dump()
WQS_start_dump() signals the beginning of a queue dump. The queue dump
operations, WQS_start_dump(), WQS_read_dump(), and WQS_end_dump(),
provide a way for a client to browse through a queue without setting the queue
busy.

A number of entries satisfying a filter condition are readied and returned when
the WQS_read_dump() function is called. A dump handle (dump_h) is
returned upon a successful WQS_start_dump(); this dump_handle should be
used on subsequent calls to WQS_read_dump() and WQS_end_dump().

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_start_dump(queue_h, filter_p, dump_h_p);

Parameters
queue_h HANDLE input. The queue handle. Obtained from WQS_
open_queue().

filter_p WQSLIB_fetch_spec_typ * input. The filter condition.

dump_h_p HANDLE * output. Pointer to the dump handle returned. Used


for operations (WQS_read_dump() and WQS_end_dump())
related to this dump.

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_invalid_find_field
The filter condition contains an undefined user_field.

WQS_err_no_entry_selected
No entry is currently selected.

WQS_err_security_violation
Operator does not have read access.

December 1996 WAL for Windows Programmer’s Reference Manual 1243


7 WAL Function Reference
WQS_start_dump()

See Also
“WQS_end_dump()” on page 1215

“WQS_open_queue()” on page 1230

“WQS_read_dump()” on page 1234

“WQSLIB_fetch_spec_typ” on page 545

1244 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_update_entry()

WQS_update_entry()
WQS_update_entry() modifies a specific queue entry. For an ordinary queue,
the entry to be updated is denoted by the entry_id parameter. For a
rendezvous queue, the entry to be updated is denoted by the content of the
rendezvous field; if no entry exists with the same rendezvous field value, an
entry is inserted.

WQS_update_entry() should not behave–as a result of coding–beyond the


scope of field entries. For example, don’t allow it to rewrite or create another
queue.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_update_entry(queue_h, entry_id, entry_in_p,


inserted_new_p);

Parameters
queue_h HANDLE input. The queue handle. Obtained from WQS_
open_queue().

entry_id WQS_entry_id_typ input. The identification of the entry to be


updated. Meaningful only for ordinary queues, and ignored
for rendezvous queues.

entry_in_p WQSLIB_queue_entry_in_typ * input. A pointer to values for


the user-defined and system-defined fields. The system
“busy” field is not used, because it cannot be updated.

inserted_new_p
FN_BOOL * input/output. As an input parameter, specifies
whether the STATUS field can be explicitly updated. As an
output parameter, specifies whether a new entry had been
inserted into the queue.

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_invalid_entry_id
The specified entry ID does not exist.

December 1996 WAL for Windows Programmer’s Reference Manual 1245


7 WAL Function Reference
WQS_update_entry()

WQS_err_illegal_write_field
Illegal write field; should check status.

WQS_err_rendez_field_missing
Missing a rendezvous field.

WQS_err_required_field_missing
Missing a required field.

WQS_err_invalid_user_field
The specified user-defined field does not exist.

WQS_err_invalid_field_value
Invalid field value detected on insertion.

WQS_err_invalid_sys_field
The specified system field does not exist.

WQS_err_invalid_sys_field_data
The data type is not comparable with the system defined queue field.

WQS_err_security_violation
Operator does not have write access.

WQS_err_dup_unique_val
The entry already exists with the same value for a unique field.

See Also
“WQS_open_queue()” on page 1230

“WQS_entry_id_typ” on page 532

“WQSLIB_queue_entry_in_typ” on page 550

The sample application in the directory C:\FILENET\SAMPLE\WQS

1246 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_update_queue()

WQS_update_queue()
WQS_update_queue() enables a client to modify the definition of a queue.
The allowed modifications include:

• Modifying the text description of the queue

• Changing the name of the workspace (moving the queue from one
workspace to another)

• Changing the name of the queue

• Adding new fields

• Enlarging the size of an existing field

• Adding or deleting indices

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_update_queue(queue_h, header_only,


queue_desc_p);

Parameters
queue_h HANDLE input. The queue handle returned by Queue
Services when the queue was opened. Obtained from WQS_
open_queue().

header_only FN_BOOL input. A boolean specifying whether the update is


limited to the header only.

queue_desc_p
WQSLIB_queue_desc_typ * input. Pointer to the new
definition of the queue. This must be a full description, with
the existing fields specified in the exact order as when the
queue was first defined or last updated, followed by any new
fields to be added.

December 1996 WAL for Windows Programmer’s Reference Manual 1247


7 WAL Function Reference
WQS_update_queue()

Errors Returned
WQS_err_invalid_queue_handle
Invalid queue handle.

WQS_err_illegal_field_desc_change
Illegal field definition change.

WQS_err_queue_in_use
The specified queue is set to busy (might be in use by others).

WQS_err_security_violation
Operator does not have read access.

See Also
“WQS_open_queue()” on page 1230

“WQSLIB_queue_desc_typ” on page 548

1248 WAL for Windows Programmer’s Reference Manual December 1996


7 WAL Function Reference
WQS_update_workspace()

WQS_update_workspace()
WQS_update_workspace() allows you to modify a workspace. The allowed
modifications include:

• Modifying the text description of the workspace

• Changing the name of the workspace

• Changing the name of the queue (in essence moving the queue from one
workspace to another)

• Changing the security access restrictions

Currently, this function is for Series 6000 systems only.

Syntax
#include <wqslib.i>

error_typ CALLBACK WQS_update_workspace(session_h, workspace,


new_workspace, restrictions_p, text_desc);

Parameters
session_h HANDLE input. The session handle. Obtained from WQS_
logon().

workspace WQS_workspace_name_typ input. Name of the workspace


to be modified.

new_workspace
WQS_workspace_name_typ input. Name of the workspace
to be updated. Specify NULL for no change.

restrictions_p SCT_access_restrictions * input. Pointer to the set of access


restrictions associated with the workspace. Specify NULL for
no change.

text_desc PSTR input. A text description of the workspace to be


updated. Specify NULL for no change.

December 1996 WAL for Windows Programmer’s Reference Manual 1249


7 WAL Function Reference
WQS_update_workspace()

Errors Returned
WQS_err_invalid_session_handle
Specified session handle does not match the current active session.

WQS_err_invalid_workspace
Specified workspace does not exist.

WQS_err_security_violation
Operator does not have read access.

WQS_err_bad_workspace_name
Workspace name must begin with a letter.

See Also
“WQS_logon()” on page 1228

“SCT_access_restrictions” on page 481

“WQS_workspace_name_typ” on page 544

1250 WAL for Windows Programmer’s Reference Manual December 1996


Appendix A–IMS Security Services
and WAL

The following IMS security features were introduced in IMS 3.1:

• IMS allows only one active session for any single PC workstation. A
second SEC_logon() call will kill an earlier session. If multiple applications
are running and one application calls SEC_logon() directly, the previous
session closes and errors are returned.

• The IMS security services distinguish between users and groups.

• IMS has account activity records, password management, and password


and account activity maintenance features.

While most IMS operations remain compatible with earlier IMS versions,
some differences exist. This affects how you use some IAFLIB and SECMAN
functions in WAL and involves some new definitions and structures.

Managing Multiple Security Sessions


IMS maintains logon information for each user. The function IAFLIB_get_
user_stats() retrieves password status and logon activity information for
security management.

IMS Security Services allow only one active session from any single
workstation in any single domain. However, you can log onto multiple domains
from the same client workstation.

Upon logon, the service saves the network address of the client with the
session handle. If another logon comes from the client in the same domain,
the previous session is terminated.

For multiple applications using IMS 3.1 (or later) this causes problems if one
or more of the applications calls SEC_logon() directly; the other applications
lose their security sessions and return errors.

To manage multiple security sessions, call SECMAN_get_sec_handle()


instead of SEC_logon() and SECMAN_free_sec_handle() instead of SEC_
logoff(). The SECMAN_get_sec_handle() entry point initiates a security
session only on the first request for a specific IMS. For each additional call

December 1996 WAL for Windows Programmer’s Reference Manual 1251


Appendix A–IMS Security Services and WAL

with the same IMS, SECMAN_get_sec_handle() returns the same session


handle so multiple clients can each use security services by sharing the same
session.

User- and Group-defined Logon IDs


IMS security services distinguish between users and groups. In pre-3.1 IMS,
individual users could logon, as well as contain memberships of other users.
With 3.1, and later versions, only users can logon, and only a separately
defined group can contain memberships.

A new definition, SEC_INFOTYPE_GROUP, has been added to secdefs.h.


When used in the info_type field of the SEC_find_info_typ parameter for
SEC_find_info(), SEC_find_info() returns a list of groups defined on an IMS.

Similarly, if SEC_INFOTYPE_USER is used in the info_type field of the SEC_


find_info_typ parameter for SEC_find_info(), SEC_find_info() returns the
entire list of users and groups. This ensures compatibility with pre-3.1 IMS
versions.

The for_login field in the SEC_security_info_typ structure is a set of flags


specifying whether the object is a user or a group and whether the object can
logon. You’ll get an error if you both specify an object as a group and specify it
to logon.

The for_login field should be used in 3.1 (and later) IMS with the definitions
SEC_FLAGS_FORLOGIN and SEC_FLAGS_GROUP in secdefs.h.

Note that for_login is of type BOOLEAN, but you can evaluate it numerically
for user information.

#define SEC_FLAGS_FORLOGIN 0x0001


#define SEC_FLAGS_GROUP 0x0002

If for_login evaluates to 0, it indicates a user who can’t login.

1252 WAL for Windows Programmer’s Reference Manual December 1996


Appendix A–IMS Security Services and WAL

System Administrators: Creating Users, Groups, and Passwords


Previously, you could create a user without a password. However, IMS now
requires a password to be defined when creating a user.

Only the user SysAdmin can create or update users or groups from a PC
client. On IMS there are:

• a system administrator user and a system administrator group.

• a field service user and a field service group.

• an operator user and a operator group.

There are 16 defined SEC_id_typ constants compared to only 8 SCT_id


constants. They are equivalent data types. See “SEC_id_typ” on page 504 for
a description.

You can configure IMS 3. 1 (and later) password expiration features so that a
user’s password expires if the user does not change the password during the
first logon to an IMS, or within the configured expiration time.

You can write code that reminds a user to change passwords and that warns
of impending password expiration. Your code should check password
expiration status, check whether a logon instance is the first time the account
has been used, or whether the password grace period has begun.

The following code example can be executed after a call to IAFLIB_logon_


user() (see “IAFLIB_logon_user()” on page 1033) and shows how you might
manage password security. Three periods (...) indicate omitted lines.

December 1996 WAL for Windows Programmer’s Reference Manual 1253


Appendix A–IMS Security Services and WAL

Example Password and Security Management Code


{
SEC_system_desc_typ SystemDefaults;
SEC_stats_desc_typ UserStats;
FN_server_version_typ ServerVersion;
HANDLE hIAFLIB;
error_typ err = success;
.
.
.
err = IAFLIB_get_server_version(&ServerVersion);
if (err) return err;
.
.
.
// Check if running against a 3.1 server

if ((ServerVersion.arch_num >= 3) &&


(ServerVersion.major_num >= 1)) {
err = IAFLIB_get_client_handle(&hIAFLIB);
if (err) return err;
err = IAFLIB_get_user_stats(hIAFLIB, NULL, NULL,
&UserStats);
if (err) return err;
err = IAFLIB_find_system_defaults(hIAFLIB, NULL,
&SystemDefaults);
if (err) return err;
.
.
.
// Check if password expiration is set on the server

1254 WAL for Windows Programmer’s Reference Manual December 1996


Appendix A–IMS Security Services and WAL

if (SystemDefaults.pwd_renewal_days) {
// Check if this is the users first time logging on
if ((UserStats.pwd_expires_time == 0) ||
(UserStats.nbr_logons == 0))
.
.
.
MessageBox(NULL,
"You must change your password before logging off!",
"Warning", MB_ICONEXCLAMATION);
else if ((UserStats.pwd_expires_time) &&
(UserStats.pwd_grace_period))
MessageBox(NULL, "Password has entered grace period.",
"Warning", MB_ICONEXCLAMATION);
}
}
}

You might follow this with password changing code using SEC_update_info()
(see “SEC_update_info()” on page 1154).

December 1996 WAL for Windows Programmer’s Reference Manual 1255


Appendix A–IMS Security Services and WAL

1256 WAL for Windows Programmer’s Reference Manual December 1996


Glossary

ANT
Alpha-numeric terminal. A terminal used for operator and system
administrator functions on IMS servers, print servers, and other
application servers. ANTs cannot display images.

Autoform
FileNet’s application for developing electronic forms.

batch
A group of images before committal. Each batch has its own definition
including a name and document class into which pages are scanned.
Batches are stored in cache. After document committal the batch name is
discarded.

BES
Batch Entry Server/Services. An application server on a large FileNet
system that provides basic services, as well as Object Entry, and OSAR
Management services.

cache
An area on magnetic disk where documents are stored after retrieval from
optical disk. A partition or logical volume in the IMS file structure (on
magnetic disk) used as a temporary holding area for images.

committal
The process of storing index information permanently and writing an image
to optical disk. In its more general usage, committal refers to the process
of cataloging a document, moving it from batch entry cache to retrieval
cache, and writing it to optical disk. In its more technical usage, it refers
strictly to moving a document to retrieval cache from batch entry cache.
See also migration.

document class
A means of defining a set of documents. A category under which
documents are committed to the system. The document class of a
document determines the index fields which may be used for cataloging

December 1996 WAL for Windows Programmer’s Reference Manual 1257


and retrieving the document. When a document is committed, the
document class under which it was scanned becomes part of its indexing
information.

DPI
Dots per inch. A unit of measure for image resolution for scanners and
printers.

IMS
Image Management Services or Image Management System. The name
of the core components of a FileNet system, encompassing both the
hardware making up the main servers and their software. The IMS
provides access to the main services of the FileNet system (such as Index
and Document Services).

index
A means of identifying document types.

A field used to hold information about a document. Each document has a


set of indices associated with it (the indices associated with the document
class the document was scanned under) and the values in the indices may
be used to retrieve the document. The values are entered when the
document is indexed but are written into the Index_DB when the document
is committed.

Local Cache (CAM)


Local cache is used to hold documents or images waiting to be displayed
on the PC. Location of the local cache is specified in the reference file
(LOGON.CFG) named in WIN.INI file.

In most cases, you specify the RAM drive for local cache. If not set, the
current directory is used for local cache. The following is a sample setting:

[PCWS]
Primary Cache=d:\ ;D drive is the RAM drive.
Cache Delete on Exit=1 ;If 1, files will be deleted on exit of application.

The CAM functions are used to manage the local cache.

1258 WAL for Windows Programmer’s Reference Manual December 1996


Glossary

Network Clearinghouse (NCH)


The Network Clearinghouse is a database used to locate systems and
services. An NCH name contains three parts: object, domain, and
organization. A domain is the name of a FileNet system.

query
The process of using a set of criteria to search the Index_DB database for
particular documents.

Query Match Report (QMR)


The Query match report is the formatted result of a query to the Index_DB.
It is a list of each document and its corresponding system and user-defined
index values. The QMR functions are used to manage the query match
report.

Retrieval Data Dictionary (RDD)


The Retrieval data dictionary is a description of the fields, keys, document
classes, and menus defined in the index database. For performance
reasons, client software retrieves the entire Retrieval Data Dictionary
during initialization and places it in a cache for subsequent use.

The RDD functions are used to manage the retrieval data in the RDD
cache memory.

Single-Keyed File (SKF)


A database that contains record with a single unique key. Data containing
the FileNet system error messages and system login accounts (security)
are stored as single-keyed files.

SSN
System serial number.

TTY Window (TTY)


A TTY window has an underlying rectangular character map. You can
scroll the window both horizontally and vertically. A TTY window contains
its own interface to cut, paste, and copy text data to and from the Windows
clipboard. It has a one-line message child window between the menu bar
and the rectangular character map. The maximum size of a TTY window
is 65536 (rows * columns) characters.

The TTY functions manage TTY windows.

December 1996 WAL for Windows Programmer’s Reference Manual 1259


WorkFlo Queue Service (WQS)
The service controlling all WorkFlo queue transactions. WQS may also be
used to refer to a WorkFlo queue server (a server dedicated to WorkFlo
queue operations).

1260 WAL for Windows Programmer’s Reference Manual December 1996


Index

A ASE_surface_id_typ 183
abstracts ASE_surface_offset_typ 184
FileNet system software 3 ASE_time_typ 185
adding documents to the system 13
annotation B
creating 1061 banded image format 137
modifying 1061 image.h 140
APPINFO functions overview 571 memory format 138
appinfo.i error messages 75 page layout 137
Application Information Batch Entry Services
error messages 75 error messages 76
Application server 9 BATCHLIB data flow diagram 27
Batch Entry Services 10 BATCHLIB functions overview 560
Cache Services 11 batchlib.i error messages 76
WorkFlo Queue Services 10 BATCHLIB_BatchAbort() 605
ARCH_DocEntry() 602 BATCHLIB_BatchEntry() 606
Archive BATCHLIB_BatchEntryStatus 186
error messages 75 BATCHLIB_BatchStatus 187
archive data flow diagram 26 BATCHLIB_commit_file_list() 612
archive functions overview 559 BATCHLIB_commit_files() 609
archlib.i error messages 75 BATCHLIB_DocDesc 188
ASE_capability_typ 165 BATCHLIB_enqueue_batch() 614
ASE_doc_id_typ 166 BATCHLIB_find_batch_docs() 615
ASE_document_status_typ 167 BATCHLIB_find_batch_images() 618
ASE_folder_id_typ 168 BATCHLIB_find_batches() 620
ASE_image_id_typ 169 BATCHLIB_get_batch_object() 622
ASE_migrate_status_typ 170 BATCHLIB_page_hdr_typ 189
ASE_nch_name_type_typ 171 BATCHLIB_update_batch() 624
ASE_net_addr_typ 172 BATCHLIB_update_batch_doc() 626
ASE_notify_option_typ 173 BES 682
ASE_osar_id_typ 174 BES functions overview 561
ASE_page_number_typ 175 BES I data flow diagram 28
ASE_page_range_typ 176 BES II data flow diagram 31
ASE_relational_op_typ 177 BES III data flow diagram 32
ASE_request_id_typ 178 bes.def error messages 76
ASE_server_id_typ 179 BES_abort_image() 628
ASE_service_name_typ 180 BES_alloc_batch_name() 629
ASE_session_number_typ 181 BES_alloc_ids() 630
ASE_ssn_typ 182 BES_batch_cap_typ 190

December 1996 WAL for Windows Programmer’s Reference Manual 1263


Index

BES_batch_id_typ 191 BES_query_index_dir() 681


BES_client_register() 631 BES_read_image() 682
BES_close_batch() 632 BES_read_whole_image() 684
BES_close_csum_image() 633 BES_renew() 686
BES_close_image() 635 BES_sync_commit() 687
BES_commit_batch_now() 637 BES_update_batch() 689
BES_create_batch() 639 BES_update_doc() 690
BES_create_doc() 641 BES_update_image() 692
BES_create_image() 643 BES_update_index_total() 694
BES_create_image_index() 645 BES_verify_image() 695
BES_ctl_desc_typ 192 BES_write_image() 697
BES_delete_batch() 647 building WAL applications 15
BES_delete_doc() 648
BES_delete_image() 650 C
BES_delete_image_index() 651 Cache Services 7
BES_dequeue_batch() 653 CAM constants 220
BES_doc_desc_typ 193 CAM data flow diagram 33
BES_doc_list_typ 195 CAM functions overview 565
BES_dyn_hdr_desc_typ 196 cam.i error messages 80
BES_enqueue_batch() 654 CAM_add_file() 699
BES_filter_typ 200 CAM_attr_typ 219
BES_find_batches() 657 CAM_delete_file() 701
BES_find_docs() 659 CAM_exit() 702
BES_find_images() 661 CAM_find_file() 703
BES_get_image_index() 663 CAM_get_attr() 706
BES_get_info() 665, 667–668, 679 CAM_init() 708
BES_handle_typ 202 CAM_set_attr() 709
BES_hdr_desc_typ 203 character map functions 47
BES_image_desc_typ 204 cluster_key_typ 221
BES_image_ix_desc_typ 206 commit sample application 21
BES_info_rec_typ 207 committing documents 13
BES_info_spec_typ 208 constants
BES_info_typ 209 CAM 220
BES_ixdir_desc_typ 210 DISPLIB 229
BES_ixval_desc_typ 212 ERM 258
BES_ixval_spec_typ 213 ILIB 354
BES_logoff() 669 RDD 472
BES_logon() 670 create form data flow diagram 44
BES_mkf_ixval_desc_typ 214 creating an annotation 1061
BES_modify_image_index() 671 CS functions overview 566
BES_move_image() 673 CS_compute_csum() 712
BES_open_batch() 675 CSM functions overview 565
BES_open_image() 677 csm.def error messages 81
CSM_cache_access_mode 222

1264 WAL for Windows Programmer’s Reference Manual December 1996


Index

CSM_cache_id_typ 223 date and time sample application 17


CSM_close_object() 714 dir_entry_typ 228
CSM_delete_object() 715 DISPLIB constants 229
CSM_logoff() 716 DISPLIB functions overview 566
CSM_logon() 717 DISPLIB I data flow diagram 34
CSM_modify_object() 719 DISPLIB II data flow diagram 37
CSM_object_attr_typ 224 displib.i error messages 84
CSM_object_desc_typ 226 DISPLIB_close_object() 725
CSM_object_handle_typ 227 DISPLIB_free_handle() 726
CSM_open_object() 720 DISPLIB_free_object() 727
CSM_read_object() 722 DISPLIB_get_attr() 728
CSM_renew() 723 DISPLIB_get_band_bitmap() 729
DISPLIB_get_format() 731
D
DISPLIB_init_handle() 732
data flow diagrams 25
DISPLIB_input_cb 232
archive 26
DISPLIB_paint_bitmap() 733
BATCHLIB 27
DISPLIB_paint_object() 736
BES I 28
DISPLIB_register_object() 739
BES II 31
DISPLIB_retrieve_cb 233
BES III 32
DISPLIB_retrieve_typ() 741
CAM 33
DISPLIB_set_attr() 743
create form 44
DISPLIB_set_retrieval() 745
DISPLIB I 34
DISPLIB_stretch_bitmap() 746
DISPLIB II 37
DISPLIB_yield_typ() 748
FILLIN 38
doc.def error messages 88
FN index 40
DOC_annotation_desc_typ 234
FNP (local printing) 42
DOC_annotation_id_typ 236
form file 45
DOC_annotation_typ 237
FORM I 43
DOC_committal_desc_typ 238
FORM II 46
DOC_doc_attribute_value_typ 241
IAFLIB cache management 54
DOC_doc_location_desc_typ 242
IAFLIB document retrieval 55
DOC_family_create_server_typ 244
IAFLIB folder 57
DOC_family_server_desc_typ 245
IAFLIB logon 59
DOC_index_value_typ 247
IAFLIB print (remote printing) 61
DOC_migrate_order_typ 248
Query Match Report (QMR) 62
DOC_surface_desc_typ 249
restore 26
document retrieval data flow diagram 55
Retrieval Data Dictionary (RDD) 64
document retrieval sample application 20
security (SEC) 65
Document Services 7
TTY I 67
error messages 88
TTY II 68
documents
WQS I 69
adding to the system 13
WQS II 70
committal 13
date and time error messages 91

December 1996 WAL for Windows Programmer’s Reference Manual 1265


Index

retrieving 12 dtm.def 91
routing 13 fillin.i 93
DS_LIST 251 fnprint.i 94
DS_LIST_ENTRY 252 formlib.i 95
DTM functions overview 568 fp.def 99
DTM masks 253 iaflib.i 100
dtm.def error messages 91 imgfmt.i 102
DTM_addtime() 749 imglib.i 102
DTM_asctime() 750 indxform.i 105
DTM_ctime() 751 inx_err.h 105
DTM_date() 753 nchedefs.h 109
DTM_ftime() 754 pri.def 111
DTM_getdate() 755 qmr.i 115
DTM_getmask() 756 rdd.i 117
DTM_getmasklength() 757 sct.def 119
DTM_gmtime() 758 secdefs.h 120
DTM_gp() 759 secman.i 130
DTM_gtime() 760 servname.i 130
DTM_localtime() 761 slaclib.i 131
DTM_stime() 762 ttylib.i 131
DTM_subdate() 763 wqsdef.h 132
DTM_subtime() 764 error_typ 257
DTM_time() 765 executing a form 48
DTM_tm 256
DTM_verifymask() 766 F
DTMdate_typ 255 fieldd validation checking 50
FileNet system architecture 1
E FileNet system hardware 1
ERM constants 258 FileNet system software 2
ERM functions overview 569 abstracts 3
ERM_display_error() 767 processes 2
ERM_get_error() 768 RPC 4
ERM_log_error() 769 FILLIN data flow diagram 38
ERM_log_event() 770 FILLIN functions overview 570
error message display program 73 fillin.i error messages 93
error messages 118 FILLIN_bkg_commit() 772
appinfo.i 75 FILLIN_bkg_commit_image() 774
archlib.i 75 FILLIN_bkgrequest_rec_typ 259
batchlib.i 76 FILLIN_commit() 776
bes.def 76 FILLIN_commit_image() 778
cam.i 80 FILLIN_do_form() 781
csm.def 81 FILLIN_get_doc_class() 782
displib.i 84 FILLIN_get_form_name() 784
doc.def 88 FILLIN_index() 786

1266 WAL for Windows Programmer’s Reference Manual December 1996


Index

FILLIN_local_print() 788 form


FILLIN_server_print() 789 executing 48
filter condition 1070 storing 50
example 1072 form character map 47
floating point error messages 99 form fields 46
floating point sample application 17 form file data flow diagram 45
FN index data flow diagram 40 FORM functions overview 573
FN_clear_index_form() 790 FORM I data flow diagram 43
FN_copy_file() 791 FORM II data flow diagram 46
FN_custom_index_form() 792 form validcation checking 50
FN_date_typ 261 FORM_add_named_rule() 823
FN_docnum_typ 262 FORM_add_rule() 825
FN_folnum_typ 263 FORM_append_item() 827
FN_get_app_info_int() 794 FORM_BatchPageAttr_typ 269
FN_get_app_info_string() 795 FORM_bind_val_func() 829
FN_get_window_pos() 796 FORM_BitmapField_typ 270
FN_index_form() 797 FORM_BkgAttr_typ 272
FN_index_form_exit() 799 FORM_BkgImage_typ 273
FN_index_form_init() 800 FORM_box_add_item() 831
FN_index_handle_to_text() 802 FORM_box_delete() 832
FN_index_text_to_handle() 804 FORM_box_directory() 833
FN_index_verify() 806 FORM_box_find_item() 834
FN_page.h 157 FORM_box_get_count() 835
FN_save_index_form() 808 FORM_box_get_sel() 836
FN_selection_typ 264 FORM_box_get_sel_count() 837
FN_server_version_typ 265 FORM_box_get_text() 838
FN_set_app_file() 810 FORM_box_get_text_len() 839
FN_set_app_info() 811 FORM_box_match_item() 840
FN_set_window_pos() 812 FORM_box_select_list() 841
FN_show_index_form() 813 FORM_box_set_default() 842
FN_show_new_values_in_form() 815 FORM_box_set_sel() 843
FN_time_typ 266 FORM_BrushAttr_typ 274
fnfprint.i error messages 94 FORM_ButtonField_typ 275
FNP (local printing) data flow diagram 42 FORM_change_menu_item() 844
FNP_data 267 FORM_check_syntax() 845
FNP_exit() 817 FORM_CheckboxField_typ 277
FNP_init() 818 FORM_Checked_typ 279
FNP_print() 819 FORM_clear() 846
FNP_print_form_page() 821 FORM_clear_field_value() 847
FNP_print_from_file() 822 FORM_clear_form_values() 848
FNP_request_typ 268 FORM_clone_form() 849
folder data flow diagram 57 FORM_close_object() 850
folder sample application 20 FORM_close_volatile_objects() 851

December 1996 WAL for Windows Programmer’s Reference Manual 1267


Index

FORM_ColorAttr_typ 280 FORM_get_object_list() 889


FORM_ComboboxField_typ 281 FORM_get_one_valtable_item() 890
FORM_create_field() 852 FORM_get_row_text() 891
FORM_create_object() 855 FORM_get_terminator() 892
FORM_data_type 283 FORM_get_valtable_items() 893
FORM_DateField_typ 284 FORM_GroupboxField_typ 305
FORM_DateMaskAttr_typ 287 FORM_HelpAttr_typ 306
FORM_default_field_value() 856 FORM_IconAttr_typ 307
FORM_default_form_values() 857 FORM_init() 894
FORM_delete_field() 858 FORM_install_list() 895
FORM_do_form() 859 FORM_LineField_typ 308
FORM_DocField_typ 288 FORM_ListboxField_typ 309
FORM_enable_fields() 860 FORM_ListValue_typ 312
FORM_enable_form_window() 861 FORM_load_file() 896
FORM_escape_form() 862 FORM_load_form_from_page() 897
FORM_evaluate() 863 FORM_load_object() 898
FORM_execute_form() 865 FORM_make_groups_contiguous() 900
FORM_exit() 866 FORM_MenuAttr_typ 313
FORM_FieldAttr_typ 291 FORM_MenubarAttr_typ 314
FORM_fielddesc_typ 298 FORM_MenuField_typ 315
FORM_FieldEvent_typ 299 FORM_MenuItem_typ 317
FORM_FieldType_typ 300 FORM_NumberField_typ 318
FORM_find_file() 867 FORM_ObjectType_typ 321
FORM_find_file_in_path() 868 FORM_PageAttr_typ 322
FORM_find_file_in_path2() 869 FORM_paint_in_DC() 901
FORM_FontAttr_typ 301 FORM_PatternField_typ 323
FORM_FormAttr_typ 302 FORM_PenAttr_typ 325
FORM_generate_fill_in_page() 871 FORM_ProcAttr_typ 326
FORM_generate_form_file() 872 FORM_RadioField_typ 327
FORM_generate_image_page() 873 FORM_RectField_typ 329
FORM_generate_one_form_file() 874 FORM_ResourceAttr_typ 331
FORM_generate_pcode_file() 875 FORM_RoundRectField_typ 332
FORM_get_field_attr() 876–877 FORM_RuleAttr_typ 334
FORM_get_field_attr_using_ord() 879 FORM_ScrollbarField_typ 335
FORM_get_field_count() 880 FORM_server_copy_file() 902
FORM_get_field_info() 881 FORM_server_delete_file() 903
FORM_get_field_name() 882 FORM_server_rename_file() 904
FORM_get_file_list() 883 FORM_server_retrieve_file() 905
FORM_get_file_service() 884 FORM_server_save_file() 906
FORM_get_last_field() 885 FORM_set_field_attr() 907
FORM_get_menu_items() 886 FORM_set_field_attr_using_ord() 908
FORM_get_menubar_items() 887 FORM_set_field_focus() 910
FORM_get_object_attr() 888 FORM_set_file_service() 911

1268 WAL for Windows Programmer’s Reference Manual December 1996


Index

FORM_set_menu_items() 912 FP_num2sci() 944


FORM_set_menubar_items() 913 FP_num2str() 945
FORM_set_object_attr() 914 FP_num2unslong() 946
FORM_set_one_valtable_item() 916 FP_number 351
FORM_set_valtable_items() 917 FP_ora2num() 947
FORM_show_form() 918 FP_retsign() 948
FORM_SignatureField_typ 337 FP_round() 949
FORM_Softkey_typ 339 FP_rounddisp() 950
FORM_SoftkeyAttr_typ 340 FP_setmode() 951
FORM_step_form() 919 FP_setundef() 952
FORM_StringField_typ 341 FP_str2num() 953
FORM_TableAttr_typ 344 FP_subtract() 954
FORM_Terminator_typ 345 FP_trunc() 955
FORM_TermProcAttr_typ 346 FP_unslong2num() 956
FORM_text_out() 921 functions overview 559
FORM_TextField_typ 347 APPINFO 571
FORM_ValFuncAttr_typ 349 archive functions 559
FORM_validate_form() 922 BATCHLIB functions 560
FORM_ValItem_typ 350 BES functions 561
formlib.i error messages 95 CAM functions 565
forms sample application 22 CS functions 566
FP (floating point) functions overview 581 CSM functions 565
fp.def error messages 99 DISPLIB functions 566
FP_abs() 923 DTM functions 568
FP_add() 924 ERM functions 569
FP_assign() 925 FILLIN functions 570
FP_dbl2num() 926 FORM functions 573
FP_divide() 927 FP (floating point) functions 581
FP_eql() 928 IAFLIB functions 583
FP_geq() 929 IMGFMT functions 590
FP_getmode() 930 INDXFORM functions 571
FP_gtr() 931 local printing (FNP) functions 572
FP_isundef() 932 QMR functions 590
FP_leq() 933 RDD functions 592
FP_long2num() 934 REST functions 593
FP_lss() 935 SEC functions 594
FP_multiply() 936 ServName functions 595
FP_neg() 937 SLACLIB functions 597
FP_neq() 938 TTY functions 597
FP_num2dbl() 939 WQS functions 599
FP_num2long() 940
FP_num2mask() 941 G
FP_num2ora() 943 general sample application 18

December 1996 WAL for Windows Programmer’s Reference Manual 1269


Index

I IAFLIB_get_object_text() 1011
IAFLIB cache management data flow IAFLIB_get_print_queues() 1013
diagram 54 IAFLIB_get_print_queues2() 1015
IAFLIB document retrieval data flow diagram 55 IAFLIB_get_print_service_info() 1017
IAFLIB folder data flow diagram 57 IAFLIB_get_print_service_info1() 1019
IAFLIB functions overview 583 IAFLIB_get_printer_info() 1021
IAFLIB logon data flow diagram 59 IAFLIB_get_printer_info2() 1023
IAFLIB print (remote printing) data flow IAFLIB_get_security_info() 1025
diagram 61 IAFLIB_get_server_version() 1026
iaflib.i error messages 100 IAFLIB_get_single_DIR() 1027
IAFLIB.I management 51 IAFLIB_get_user_name() 1029
IAFLIB_add_notation() 957 IAFLIB_get_user_stats() 1030
IAFLIB_add_notation1() 959 IAFLIB_get_version() 1031
IAFLIB_cancel_print() 961 IAFLIB_image_object_typ 352
IAFLIB_check_membership() 963 IAFLIB_initialize_RDD() 1032
IAFLIB_check_password() 964 IAFLIB_is_annotated() 1033
IAFLIB_continue_query() 965 IAFLIB_logon_user() 1035
IAFLIB_create_cache_object() 967 IAFLIB_migrate_from_optical_disk() 1036
IAFLIB_create_folder() 969 IAFLIB_migrate_to_optical_disk() 1038
IAFLIB_delete_annotation() 971 IAFLIB_modify_print() 1040
IAFLIB_delete_cache_object() 973 IAFLIB_modify_print2() 1042
IAFLIB_delete_docs() 975 IAFLIB_move_cache_object() 1044
IAFLIB_delete_folders() 978 IAFLIB_move_folder() 1048
IAFLIB_file_doc() 980 IAFLIB_prefetch() 1050
IAFLIB_file_doc_after() 982 IAFLIB_prefetch_result 353
IAFLIB_find_folders() 984 IAFLIB_print_doc1() 1055
IAFLIB_find_index_in_DIR() 986 IAFLIB_print_docs() 1053
IAFLIB_find_system_defaults() 987 IAFLIB_print_files() 1057
IAFLIB_free_client_handle() 989 IAFLIB_print_files1() 1059
IAFLIB_FreeAttr2Memory() 988 IAFLIB_put_annotation() 1062
IAFLIB_FreeRequest2Memory() 990 IAFLIB_put_object() 1065
IAFLIB_FreeStatusMemory() 991 IAFLIB_query_db() 1068
IAFLIB_get_annotations() 992 IAFLIB_reorder_folder() 1074
IAFLIB_get_cache_object_attrs() 994 IAFLIB_resize_cache_object() 1076
IAFLIB_get_client_handle() 996 IAFLIB_terminate_query() 1078
IAFLIB_get_current_IMS() 997 IAFLIB_unfile_docs() 1079
IAFLIB_get_default_restrictions() 998 IAFLIB_update_db() 1081
IAFLIB_get_doc_attr() 1000 IAFLIB_update_folder() 1083
IAFLIB_get_docs_in_folder() 1002 IAFLIB_where_filed() 1085
IAFLIB_get_file_text() 1004 ILIB constants 354
IAFLIB_get_folder_attrs() 1006 ILIB_DOC_annotation_id_typ 355
IAFLIB_get_membership_list() 1008 image format management error messages 102
IAFLIB_get_object() 1009 image sample application 19

1270 WAL for Windows Programmer’s Reference Manual December 1996


Index

image.h 140, 150 INX_retent_offset_typ 380


images INX_value_type_typ 381
special limitations 149
images on optical disk 147 K
imaging system 12 key condition 1070
IMGFMT functions overview 590 example 1071
imgfmt.i error messages 102 L
IMGFMT_cmp_tiff() 1087 Local Cache Manager
IMGFMT_compress() 1088 error messages 80
IMGFMT_convert_image() 1089, 1094 local print sample application 21
IMGFMT_custom_typ 356 local printing (FNP) functions overview 572
IMGFMT_desc_typ 358 local printing error messages 94
imglib.i error messages 102 logon sample application 18
index server 5
Index Services M
error messages 105 masks
indexes DTM 253
system 1070 memory format
user 1070 banded images 138
indexing fields tiled images 142
key and filter 1070 menu functions 48
INDXFORM functions overview 571 menubar functions 48
indxform.i error messages 105 modifying an annotation 1061
INX_closed_typ 359 MSG 73
INX_cluster_key_typ 360 multiple security sessions 1253
INX_cluster_space_typ 361 N
INX_dcl_id_typ 362 NCH_AttributesDescValue 382
INX_dcl_name_typ 363 NCH_BatchDescValue 385
INX_dir_typ 364 NCH_CacheDescValue 386
INX_doc_index_rec_typ 366 NCH_DefCacheDescValue 388
INX_doc_type_typ 365 NCH_DefDeviceDescValue 389
inx_err.h error messages 105 NCH_DefService1DescValue 391
INX_fam_id_typ 367 NCH_DefServiceDescValue 390
INX_fc_doc_ord_item_typ 368 NCH_DomainName 393
INX_folder_desc_typ 369 NCH_ICRServiceDescValue 394
INX_folder_name_typ 371 NCH_IMSDescValue 395
INX_folder_spec_typ 372 NCH_NetAddr_typ 396
INX_index_id_typ 373 NCH_ObjectName 397
INX_index_name_typ 374 NCH_PrintServDescValue 398
INX_index_value_typ 375 NCH_Property 399
INX_query_match_typ 376 nchedefs.h error messages 109
INX_retent_base_typ 378 NET_HostNum_typ 400
INX_retent_disp_typ 379 NET_ip_addr_typ 401

December 1996 WAL for Windows Programmer’s Reference Manual 1271


Index

NET_NetAddr_typ 402 PRI_sub_status_typ 461


NET_NetNum_typ 403 Print Services 9
Network Clearing House processes
error messages 109 FileNet system software 2
PS_long_option_type 462
O
PS_options_rec_type 464
optical disk
PS_printer_attr_desc_type 465
images 147
PS_printer_status_desc_type 467
P
Q
page layout
QMR functions overview 590
banded images 137
qmr.i error messages 115
tile images 141
QMR_build_doc_list() 1096
PCWS.H 74
QMR_create_match_window() 1097
postage stamp format 146
QMR_ENTRY 469
pri.def error messages 111
QMR_format_report() 1099
PRI_annot_mark_typ 404
QMR_INFO 470
PRI_annot_marks_typ 405
QMR_query() 1101
PRI_doc_specifier_typ 406
QMR_select_match() 1103
PRI_eject_tray_typ 408
QMR_Softkey_typ 471
PRI_fax_mode_typ 409
Query Match Report
PRI_option_typ 410
error messages 115
PRI_orientation_typ 412
Query Match Report (QMR) data flow
PRI_overlay_typ 413
diagram 62
PRI_pages_printed_typ 414
query sample application 20
PRI_paper_size_typ 415
PRI_position_typ 417 R
PRI_print_direction_typ 418 RDD constants 472
PRI_print_option_typ 419 RDD functions overview 592
PRI_print_option_typ2 425 rdd.i error messages 117
PRI_printer_attr_typ 432 RDD_DC_INDEX_DESC 473
PRI_printer_attr_typ2 434 RDD_DCL_ID_TYP 474
PRI_printer_op_status_typ 436 RDD_DCLASS_DESC 475
PRI_printer_status_typ 437 RDD_exit() 1105
PRI_printer_type_typ 439 RDD_get_dclass_info() 1106
PRI_priority_typ 440 RDD_get_dclasses() 1107
PRI_request_desc_typ 441 RDD_get_handle() 1108
PRI_request_desc_typ2 446 RDD_get_ix_info() 1109
PRI_request_filter_typ 452 RDD_get_key_info() 1110
PRI_request_status_typ 454 RDD_get_menuitem_info() 1111
PRI_request_type_typ 456 RDD_get_menuitems() 1112
PRI_scaling_typ 457 RDD_get_valid_ixs() 1113
PRI_service_status_typ 459 RDD_get_valid_keyixs() 1114
PRI_service_type_typ 460 RDD_INDEX_ID_TYP 476

1272 WAL for Windows Programmer’s Reference Manual December 1996


Index

RDD_init() 1115 floating point example 17


RDD_is_field_valid() 1116 folder and query 20
RDD_is_key_valid() 1117 forms 22
RDD_IXFIELD_DESC 477 general 18
RDD_KEY_IXFIELD_DESC 479 image 19
RDD_MENU_DESC 480 local printing 21
RDD_MENUITEM_DESC 481 logon 18
RDD_set_handle() 1118 security 19
RDD_VALUE_TYPE_TYP 482 security and tty 21
Remote Cache Services WorkFlo Queue Services 22
error messages 81 sct.def error messages 119
remote printing SCT_access_restrictions 483
error messages 111 SCT_handle 484
REST functions overview 593 SCT_id 485
REST_CloseArchive() 1119 SCT_name 486
REST_GetArchTime() 1120 SCT_password 487
REST_GetDirEntry() 1121 SCT_serialize() 1131
REST_GetFileName() 1122 SEC functions overview 594
REST_GetFileNames(() 1123 SEC_access_wanted_typ 488
REST_GetVolName() 1124 SEC_add_info() 1132
REST_OpenArchive() 1125 SEC_add_info_typ 489
REST_RestoreDoc() 1127 SEC_AR_set_typ 492
REST_RestoreFile() 1129 SEC_AR_typ 491
restlib.i 118 SEC_check_access() 1134
restlib.i error messages 118 SEC_check_functions() 1136
restore SEC_check_membership() 1138
data flow diagram 26 SEC_delete_info() 1139
error messages 118 SEC_delete_info_typ 493
Retrieval Data Dictionary SEC_find_func_mbr_info_typ 495
error messages 117 SEC_find_info() 1141
Retrieval Data Dictionary (RDD) data flow SEC_find_info_typ 496
diagram 64 SEC_find_term_mbr_info_typ 498
retrieving documents 12 SEC_find_usr_info_typ 499
root server 5 SEC_find_usr_mbr_info_typ 500
routing documents 13 SEC_func_member_info_typ 501
RPC SEC_func_name_typ 502
FileNet system software 4 SEC_get_defaults_typ 503
SEC_get_membership_list() 1143
S
SEC_get_security_info() 1145
SALCLIB_GetAttr() 1164
SEC_get_system_info() 1147
sample applications 17
SEC_get_system_info_typ 504
commit 21
SEC_handle_typ 505
date and time 17
SEC_id_typ 506
document retrieval 20

December 1996 WAL for Windows Programmer’s Reference Manual 1273


Index

SEC_info_type_typ 508 Application 9


SEC_language_typ 509 index 5
SEC_logoff() 1149 root 5
SEC_logon() 1150 Storage Library 6
SEC_memlist_typ 510 WorkFlo/Fax 9
SEC_memlist_type_typ 511 WorkFlo/Print 9
SEC_name_typ 512 Service Name
SEC_names_found_typ 513 error messages 130
SEC_rename_info() 1152 ServiceNameCacheDefaults() 1161
SEC_renew() 1154 ServiceNameDefaults() 1162
SEC_security_defaults_typ 514 ServiceNameOptions() 1163
SEC_security_info_typ 515 ServName functions overview 595
SEC_set_defaults_typ 516 servname.i error messages 130
SEC_set_system_info() 1155 SLACLIB functions overview 597
SEC_set_system_info_typ 517 slaclib.i error messages 131
SEC_stats_desc_typ 518 SLACLIB_GetTimeStamp() 1165
SEC_system_desc_typ 519 SLACLIB_RegisterWindow() 1166
SEC_term_member_info_typ 521 SLACLIB_ResetTimer() 1168
SEC_time_range_typ 522 SLACLIB_SetAttr() 1169
SEC_update_info() 1156 SLACLIB_Shutdown() 1170
SEC_update_info_typ 523 SLACLIB_UnRegisterWindow() 1171
SEC_update_service_data_typ 524 Storage Library server 6
SEC_update_service_info_typ 525 Storage Library Services 7
SEC_update_typ 526 storing a form 50
SEC_update_usr_choice_typ 527 SVN_get_Attr_desc() 1172
SEC_update_usr_info_typ 528 SVN_get_BES_desc() 1173
SEC_user_info_typ 529 SVN_get_CSM_desc() 1174
SEC_usr_member_info_typ 530 SVN_get_DefDevice_desc() 1175
secdefs.h error messages 120 SVN_get_DefServ1_desc() 1176
secman.i error messages 130 SVN_get_IMS_desc 1177
SECMAN_free_sec_handle() 1157 SVN_get_PS_desc() 1179
SECMAN_get_sec_handle() 1158 SVN_GetLocalAddr() 1178
SECMAN_renew_sec_handle() 1160 SVN_IMSToStr() 1180
security SVN_parse_service_name() 1181
creating users and groups 1255 system indexes 1070
error messages 120
managing multiple sessions 1253 T
users and groups 1254 tile.h 145, 153
security data flow diagram 65 tiled image format 141
security management memory format 142
error messages 130 page layout 141
security sample application 19, 21 tile.h 145
servers 5 TTY functions overview 597
TTY I data flow diagram 67

1274 WAL for Windows Programmer’s Reference Manual December 1996


Index

TTY II data flow diagrams 68 WQS_close_queue() 1207


tty sample application 21 WQS_continue() 1208
TTY_clear() 1182 WQS_count_entries() 1209
TTY_clear_input() 1183 WQS_create_queue() 1210
TTY_clear_msg() 1184 WQS_create_workspace() 1211
TTY_clear_softkeys() 1185 WQS_delete_entry() 1213
TTY_create_window() 1186 WQS_delete_queue() 1214
TTY_display() 1188 WQS_delete_typ 532
TTY_display_msg() 1190 WQS_delete_workspace() 1216
TTY_display_popup() 1192 WQS_dump_handle_typ 533
TTY_exit() 1194 WQS_end_dump() 1217
TTY_get_pos() 1195 WQS_entry_id_typ 534
TTY_init() 1196 WQS_field_name_typ 535
TTY_make_current() 1197 WQS_field_unique_typ 536
TTY_read_input() 1198 WQS_get_default_service() 1218
TTY_scroll() 1200 WQS_get_queue_desc() 1219
TTY_set_app_info_key() 1202 WQS_get_queue_names() 1221
TTY_set_pos() 1203 WQS_get_server_name() 1223
TTY_set_softkeys() 1204 WQS_get_workspace_info() 1224
TTY_softkey_label 531 WQS_get_workspace_names() 1225
TTY_update_window() 1206 WQS_incomplete_spec_typ 537
ttylib.i error messages 131 WQS_insert_entry() 1226
WQS_is_WQS() 1228
U
WQS_logoff() 1229
user indexes 1070
WQS_logon() 1230
V WQS_open_queue() 1232
validation checking WQS_qlogon() 1234
form and field 50 WQS_queue_field_typ 538
validation table functions 48 WQS_queue_handle_typ 539
WQS_queue_name_typ 540
W WQS_read_dump() 1236
WAL application WQS_read_entry() 1240
building 15 WQS_read_queue() 1242
WAL programming environment 16 WQS_renew() 1244
WorkFlo Queue Services WQS_sort_order_typ 541
error messages 132 WQS_start_dump() 1245
sample application 22 WQS_status_spec_typ 542
WorkFlo/Fax server 9 WQS_sys_field_name_typ 543
WorkFlo/Print server 9 WQS_update_entry() 1247
WorkFlo/Scan station 9 WQS_update_queue() 1249
WQS functions overview 599 WQS_update_workspace() 1251
WQS I data flow diagram 69 WQS_user_field_desc_typ 544
WQS II data flow diagram 70 WQS_workspace_name_typ 546

December 1996 WAL for Windows Programmer’s Reference Manual 1275


Index

wqsdef.h error messages 132 WQSLIB_queue_entry_out_typ 553


WQSLIB_fetch_spec_typ 547 WQSLIB_queue_field_choice_typ 554
WQSLIB_queue_desc_typ 550 WQSLIB_sys_field_value_typ 556
WQSLIB_queue_entry_in_typ 552 WQSLIB_user_field_value_typ 557

1276 WAL for Windows Programmer’s Reference Manual December 1996

Das könnte Ihnen auch gefallen