T.R | Title | User | Personal Name | Date | Lines |
---|
1599.1 | Init Entity Spec to NULL | NANOVX::ROBERTS | Keith Roberts - DECmcc Toolkit Team | Fri Oct 04 1991 08:50 | 22 |
| > First of all, I would like to know what is the function of this
> data and what are the possible values... MCC Descriptor 'mcc_b_ver'
This field indicates the version number of the MCC Descriptor.
It should be set to MCC_K_VER_DESCRIPTOR. Please use the literal and do
not use the constant 1.
> If I set this parameter to 1, I've an access violation.
You have set up everything correctly - except - the 'uaf_entity_spec'
should be initialized to MCC_K_NULL_PTR. This is because the MCC_A_AES
type is defined as a pointer. If the value is a NULL, then there is
no AES data defined yet. If it is non-null, then it points to an existing
AES datatype. Yours is non-null, and the AES routines follow the pointer
to an ACCVIO !!!
MCC_A_AES uaf_entity_spec = MCC_K_NULL_PTR;
Good luck
|
1599.2 | It still doesn't work ... | BALZAC::MARKOWSKI | | Fri Oct 04 1991 09:58 | 18 |
|
RE: .1
Hello,
Thank's for your explanations and suggestions. I have followed them but
I have still the same problem that is an access violation....
Don't you think it could be a problem with the way I pass the
parameters to MCC_AES_CREATE ?
Best regards,
sylviane.
|
1599.3 | Bad eyes | NANOVX::ROBERTS | Keith Roberts - DECmcc Toolkit Team | Fri Oct 04 1991 11:03 | 7 |
| You had already set the 'uaf_entity_spec' to a NULL - sorry, I didn't
see it before 8}
The rest of the code looks Ok. You've setup the SimpleName correctly
(which most people don't!) I can't think of anything else
8(
|
1599.4 | Look someplace else | TOOK::GUERTIN | Don't fight fire with flames | Fri Oct 04 1991 12:12 | 8 |
| Keith is right (as usual). There is nothing wrong with the code you
entered. The problem is elsewhere.
If you want proof, I actually compiled, linked and ran it with no problems!
(I can post the log file if you wish.)
-Matt.
|
1599.5 | MCC routines in main program ? | BALZAC::MARKOWSKI | | Fri Oct 04 1991 12:14 | 13 |
|
Hello,
I have run my program as a main program (ie not as an AM) under debug
and found that the access violation happens in the routine
MCC_THREAD_DEFER_ALERT...
The question is : Can I really call MCC_AES_CREATE and MCC_EVENT_PUT
in a program that is not an access module ?
Thanks,
Sylviane
|
1599.6 | Wait a minute. 1+1 <> 2 ?? | TOOK::GUERTIN | Don't fight fire with flames | Fri Oct 04 1991 12:30 | 9 |
| I ran it using callable MCC (i.e, as main program), with no problems.
What version of MCC are you running? Can you give us a
directory/date/size of sys$share:mcc_kernel_shr.exe?
Is it possible to post the *entire* main module?
-Matt.
|
1599.7 | Here's my log file... | TOOK::GUERTIN | Don't fight fire with flames | Fri Oct 04 1991 12:32 | 90 |
| $ type x.c
#include <mcc_interface_def.h>
#include <mcc_descrip.h>
#include <mcc_msg.h>
#include <stdio.h>
#define MCC_K_CLASS_UAF 1
#define MCC_K_ATTR_UNAME 2
int main()
{
MCC_A_AES uaf_entity_spec;
MCC_T_Descriptor uaf_instance_dsc;
MCC_T_UNSLONG uaf_instance_wildtype;
MCC_T_UNSLONG uaf_instance_class;
MCC_T_SimpleName instance_name;
MCC_T_CVR mcc_status;
uaf_entity_spec = MCC_K_NULL_PTR;
uaf_instance_class = MCC_K_CLASS_UAF;
uaf_instance_wildtype = MCC_K_AES_NOT_WILD;
instance_name.sn_b_type = MCC_K_SN_NORMAL;
instance_name.sn_b_count = 7;
strncpy(instance_name.sn_b_string,"ABCDEFG",7);
uaf_instance_dsc.mcc_a_pointer = &instance_name;
uaf_instance_dsc.mcc_w_curlen = 9;
uaf_instance_dsc.mcc_w_maxstrlen = 9;
uaf_instance_dsc.mcc_l_dt = MCC_K_DT_SIMPLE_NAME;
uaf_instance_dsc.mcc_l_id = MCC_K_ATTR_UNAME;
uaf_instance_dsc.mcc_b_dtype = DSC_K_DTYPE_T;
uaf_instance_dsc.mcc_b_class = DSC_K_CLASS_S;
uaf_instance_dsc.mcc_a_link = MCC_K_NULL_PTR;
uaf_instance_dsc.mcc_b_flags = 0;
uaf_instance_dsc.mcc_b_ver = 1;
mcc_status = mcc_aes_create(&uaf_entity_spec,
&uaf_instance_class,
&uaf_instance_dsc,
&uaf_instance_wildtype);
if (mcc_status != MCC_S_NORMAL) {
printf("\nUAF_EVENT_PUT: mcc_create_aes failure ");
exit(1);
};
}
$ cc/noopt/debug x.c
$ link/debug x.obj,sys$share:mcc_kernel_init.obj,sys$input:/opt
sys$share:mcc_kernel_shr.exe/share
sys$share:vaxcrtl.exe/share
^Z
$ run/debug x.exe
VAX DEBUG Version V5.4-019
%DEBUG-I-INITIAL, language is C, module set to X
%DEBUG-I-NOTATMAIN, type GO to get to start of main program
%DEBUG-I-DEFKEY, DEFAULT key F17 has been defined
%DEBUG-I-DEFKEY, DEFAULT key F18 has been defined
%DEBUG-I-DEFKEY, DEFAULT key F19 has been defined
%DEBUG-I-DEFKEY, DEFAULT key F20 has been defined
DBG> Set Mode Screen; Set Step Nosource
DBG> g
SRC: module X -scroll-source
2019:
2020: mcc_status = mcc_aes_create(&uaf_entity_spec,
2021: &uaf_instance_class,
2022: &uaf_instance_dsc,
2023: &uaf_instance_wildtype);
->2024: if (mcc_status != MCC_S_NORMAL) {
2025: printf("\nUAF_EVENT_PUT: mcc_create_aes failure ");
2026: exit(1);
2027:
2028: };
2029: }
OUT -output
stepped to X\main\%LINE 2015
stepped to X\main\%LINE 2016
stepped to X\main\%LINE 2017
stepped to X\main\%LINE 2018
stepped to X\main\%LINE 2023
stepped to X\main\%LINE 2024
X\main\mcc_status: %MCC-S-NORMAL, normal successful completion
PROMPT -error-program-prompt
DBG> Step
DBG> ex/cond mcc_status
DBG> Exit
|
1599.8 | MCC_AES_CREATE works now ! | BALZAC::MARKOWSKI | | Fri Oct 04 1991 12:57 | 21 |
|
RE: .7
Hello,
I've found my error looking at your log trace. The problem is in
the way I link my program :
$ link/debug my_program,-
sys$input:/opt
sys$library:mcc_kernel_shr.exe/share
I haven't specified : SYS$SHARE:MCC_KERNEL_INIT.OBJ ( and got no
error at link ... ).
Now it works !
Thank's to all of you for help.
sylviane.
|