|
Can somebody help me define a prototype definition to call the following C API via RPG. I have tried various different methods for the protype field types and I can't get to to work. What I'm looking for is something like d CSNBKTB pr d ??? d ??? d ??? d ??? d ??? d ??? d ??? d ??? d ??? d ??? d ??? d ??? d ??? d ??? I cannot seem to figure out what to make the C fields map to RPG fields. Here is the C code: /*************************************************************************** / /* Variables used in MAIN Program (by more than 1 verb) */ /*************************************************************************** / long rt_cod; long rs_cod; long exit_data_length; long rule_array_count; long mkvno; long key_register_no; long pad_char; unsigned char exit_data[4]; unsigned char rule_array[4][8]; unsigned char key_token[64]; unsigned char key_id[64]; unsigned char kkl[64]; unsigned char kkr[64]; unsigned char key_type[8]; unsigned char key_value[16]; unsigned char secure_token[8]; unsigned char control_vector[16]; unsigned char init_vector[8]; unsigned char crypto_period_st[4]; unsigned char crypto_period_en[4]; unsigned char key_part[16]; unsigned char external_K[64]; unsigned char Ip_keyvalue_left[8]; unsigned char Ip_keyvalue_right[8]; /************************************************************************/ /* Use key token build to create 2 importer key tokens which will be */ /* used later for processing the left and right halves of a double */ /* length key. */ /************************************************************************/ memset(rule_array, 0 , 8 * 4); memset(key_token,' ',64); memset(exit_data,' ',4); strncpy(rule_array[0] , "INTERNAL" , 8); strncpy(rule_array[1] , "KEY-PART" , 8); rule_array_count = 2l; strncpy(key_type , "IMPORTER" , 8); memset(key_value,0,16); mkvno = 0l; key_register_no = 0l; memset(secure_token,0,8); memset(control_vector,0,16); memset(init_vector,0,8); pad_char = 0l; memset(crypto_period_st,' ',4); memset(crypto_period_en,' ',4); CSNBKTB(&rt_cod, &rs_cod, &exit_data_length, exit_data, key_token, key_type, &rule_array_count, rule_array, key_value, &mkvno, &key_register_no, secure_token, control_vector, init_vector, &pad_char, crypto_period_st, crypto_period_en); Thanks, Robert Robert Upshall Professional Software of Amarillo (806) 358-8928 rupshall@psasoft.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.