T.R | Title | User | Personal Name | Date | Lines |
---|
3190.1 | You have it all | CHRLIE::HUSTON | | Wed Aug 25 1993 14:29 | 11 |
|
Nope, what you have is the reference manual and API spec all in one.\
there should be sections at the beginning of the book that talk about
generic subjects, as well as an example program at the end. Though
the example program will not work as is (long story), it has the
basic steps for what you need. I believe what you would have to
change is only the partition name in the example code.
--Bob
|
3190.2 | ALMOST got it all... | WPOPTH::WPOAJB::Beeson | Down Under in the bottom left corner | Thu Aug 26 1993 03:29 | 20 |
| Yep,
The example program is pretty much what I think I need. But it ain't in
no example! The chapters are:
1 Intro
2 Common Data Structures
3 Main Arguments
4 General Rules
5 Main Routines
6 OpenVMS Sys. Mgmt. Rout. & Fac.
7 Error Messages
A ALL-IN-1 Ver 2.4 Compat.
My real problem is I have written some simple code (just tries to open a
file cabinet) and I get an 'Invalid arguments error'. So an example would
be good.
Regards,
ajb
|
3190.3 | let me see it | CHRLIE::HUSTON | | Thu Aug 26 1993 15:02 | 9 |
|
The example code will make an OafcOpenCabinetW call, as well as show
how to build all the params. It is in appendix B.
If this doesn't help, put the code segment in here that builds the
params and I will look at it.
--Bob
|
3190.4 | Are we talking about the same manual? | WPOPTH::BEESON | Down Under in the bottom left corner | Tue Aug 31 1993 06:35 | 46 |
| Hi, sorry it has taken me so long to come back...
The contents of my manual stops at Appendix A. It is for:
FCS V1.1
VMS V5.5
IOS V3.0
TLC V2.0
My code is attached.
Regards,
ajb
#include "sys$library:oafcext"
#include "sys$library:oafcdef"
main()
{
OafcTEXT8 user[] = "BEESON";
OafcTEXT8 pas1[] = "ADIFFERENTPASSWORD";
OafcTEXT8 pas2[] = "";
OafcTEXT8 cab[] = "WPOPTH.BEESON ANDREW";
OafcClientSession *session;
OafcUsertoken ut;
OafcUINT32 status;
OafcStatus fcstatus;
ut.vms_account = user;
ut.vms_account_len = strlen(user);
ut.vms_password = pas1;
ut.vms_password_len = strlen(pas1);
ut.vms_password2 = pas2;
ut.vms_password2_len = strlen(pas2);
session = malloc(sizeof(OafcClientSession));
status = OafcOpenCabinetW(cab, (OafcStringLength)strlen(cab),
(OafcSessionChar)OafcM_SessionRmsFileCab
| OafcM_SessionMultiThread
| OafcM_SessionEnglish,
&ut, &session, &fcstatus, (OafcCMParameters*)"txt",
(OafcStringLength)3);
lib$signal(fcstatus.status1);
}
|
3190.5 | not quite | IOSG::EDMONDSON | Estne volumen in toga, an solum tibi libet me videre? | Tue Aug 31 1993 12:48 | 14 |
|
You have a "field test" version of the book. This is a
slightly-revised version of the one that was issued for ALL-IN-1
Version 3.0 (AA-PKUCA-TE).
One of the revisions was to remove the example, because it doesn't
work. Unfortunately, there are currently no resources available to
write and test a new (working) example.
At the moment, I don't even know when an updated version of this book
is to be issued.
Sorry,
Ro
|
3190.6 | found your problme | CHRLIE::HUSTON | | Tue Aug 31 1993 14:54 | 49 |
|
Just off the top of my head I see two problems with your code:
> ut.vms_account = user;
> ut.vms_account_len = strlen(user);
> ut.vms_password = pas1;
> ut.vms_password_len = strlen(pas1);
> ut.vms_password2 = pas2;
> ut.vms_password2_len = strlen(pas2);
Here is the first that I see (not what you're seeing). You have passed
an empty string as teh secondary password. You should be passing a
NULL pointer. They are vastly different. If this makes it to the
FCS, it will check the first pwd, assuming this is ok, it will then
check if you passed a secondary password. It will see the pointer
and will say, "Oh, he thinks he has a secondary password, he doesn't
so reject it"
> status = OafcOpenCabinetW(cab, (OafcStringLength)strlen(cab),
> (OafcSessionChar)OafcM_SessionRmsFileCab
> | OafcM_SessionMultiThread
> | OafcM_SessionEnglish,
> &ut, &session, &fcstatus, (OafcCMParameters*)"txt",
> (OafcStringLength)3);
THe reason for the error you are seeing is the CM parameters
that you are passing. If you pass any at all (I've never seen them
used during opens), it has to be a TLV encoded byte stream. You passed
a text string, the FCS can't figure out what you meant, hence the
error.
Rowena, as for corrected example code, it was suppose to be done over
there, the example code is one of the most important parts of the book.
ISVs that have been given the interface have commented they couldn't
live without it. I believe Trevor Talbot and Suzanne Cooper were
updating it, they were working on it last time I was over and I think
they had it done. It would not be a hard task for someone familiar with
the interface to get it updated. If at all possible, it should be in
the manual.
AJB, if you want the example code (the one that doesn't work) let me
know and I will try and dig up an online copy and mail it to you.
It has the basics rigth, the problems are the naming of partitions and
drawers that it uses are no longer supported, everything else is fine.
--Bob
|
3190.7 | Examples please! | WPOPTH::BEESON | Down Under in the bottom left corner | Wed Sep 01 1993 05:09 | 17 |
| Hi,
I agree with Bob, I have never tried to build an run an example but
rather use them to formulate specific calls (where I have problems such
as this one). Assuming it is syntatically correct, I'd say stick the
example back in.
Bob, thanks for the pointers. Number 1 I should have picked up, nuber
2 wasn't so clear. The manual didn't describe OafcCMParameters - I
guess I should have checked the header file. btw: I originally was
passing a 0 for the last two parameters, which also failed.
If you have a copy of an example my address is Andrew Beeson at WPO or
WPOPTH::BEESON. Thanks for your help.
Regards,
ajb
|
3190.8 | are you all set now? | CHRLIE::HUSTON | | Wed Sep 01 1993 15:27 | 7 |
|
The manual I have describes the CM params in page 3-35.
Did you get past the problem? If not I will look at the code again.
--Bob
|