'.cal' file format 
Author Message
 '.cal' file format

I would like to use the Windows 3.0/3.1 "Calendar" program to remind my
user of events they entered in MY VB program.

Does anyone know the format for ".CAL" files?  Or, where I could look it
up?

It would be much easier for me to add lines to the ".CAL" file than to
write my own "reminder" program.

Thanks in advance for the help!!!!
Please E-Mail me.

Jon



Fri, 30 Jan 1998 03:00:00 GMT  
 '.cal' file format

Quote:

>I would like to use the Windows 3.0/3.1 "Calendar" program to remind my
>user of events they entered in MY VB program.

>Does anyone know the format for ".CAL" files?  Or, where I could look it
>up?

Inside Windows File Formats
Tom Swan
Sams Publishing

John

-----------------------------------------------
VisualWare, Inc.
Custom Visual Basic, C++, and Windows Programming
1675 East Main St, Suite 218
Kent OH 44240
(216) 297-4444

-----------------------------------------------



Fri, 30 Jan 1998 03:00:00 GMT  
 '.cal' file format

Quote:
>I would like to use the Windows 3.0/3.1 "Calendar" program to remind my
>user of events they entered in MY VB program.
>Does anyone know the format for ".CAL" files?  Or, where I could look it
>up?
>It would be much easier for me to add lines to the ".CAL" file than to
>write my own "reminder" program.

Um, it's not quite as easy as adding lines. It's a binary format:
(I got this from ftp.microsoft.com a while back, I forget where.)
(Beware, it's C data types all the way... :( )

=======================================================================
                     WINDOWS CALENDAR FILE FORMAT
=======================================================================

This section describes the file format for the Windows Calendar
program supplied with Microsoft Windows version 3.0.

THE HEADER
==========

The first 8 bytes are a character array which identify the file as a
calendar file. This array contains:

   'C' + 'r' = b5
   'A' + 'a' = a2
   'L' + 'd' = b0
   'E' + 'n' = b3
   'N' + 'e' = b3
   'D' + 'l' = b0
   'A' + 'a' = a2
   'R' + 'c' = b5

The next 2 bytes contain the integer count of dates described in the
file (cDateDescriptors).

The next 12 bytes contain 6 two-byte fields of information that is
global to the entire file. These variables are normally set by the
user through the Alarm Controls and Options Day dialog boxes:

WORD MinEarlyRing;            /* early ring in minutes            */

BOOL fSound;                  /* whether alarms should be audible */
int  interval;                /* interval between appointments:
                                       0 = 15 minutes
                                       1 = 30 minutes
                                       2 = 60 minutes             */
int  mininterval;             /* the interval in minutes          */
BOOL f24HourFormat;           /* TRUE for 24 hour format,
                                 0 otherwise                      */
int   StartTime;              /* starting time in Day Mode, i.e.
                                 the time that normally appears
                                 first in the display, in
                                 minutes past midnight */

The rest of the first 64 bytes are reserved.

THE DATE DESCRIPTORS
====================

The date descriptor array appears next. Each entry in the array
describes one day. cDateDescriptors (described above) is the number of
entries in the array. Each element in the array consists of 12 bytes,
in 6 two byte fields as follows:

unsigned Date;                /* the date, in days past 1/1/1980  */
int      fMarked;             /* bitmask indicating which mark(s)
                                 are set for date:
                                     box         =  128
                                     parentheses =  256
                                     circle      =  512
                                     cross       = 1024
                                     underscore  = 2048           */
int      cAlarms;             /* number of alarms set for the day */
unsigned FileBlockOffset;     /* file offset, in 64 byte blocks,
                                 of where the day's information is
                                 stored. Only the low 15 bits are
                                 used (the high bit will be 0).
                                 Thus, if this offset were equal
                                 to 6, the day's information would
                                 be stored at byte 6*64 in the
                                 file. */
int      reserved;            /* this equals 0xfff                */
unsigned reserved;            /* this equals 0xfff                */

DAY-SPECIFIC INFORMATION
========================

All day information is stored after the Date Descriptor array, on even
64 bytes boundaries. Day information is stored as follows:

unsigned reserved;            /* this must equal 0                */
unsigned Date;                /* in days past 1/1/1980            */
unsigned reserved;            /* this must equal 1                */
unsigned cbNotes;             /* the number of bytes of note
                                 information, including the null.
                                 This information appears in the
                                 note array below the appointment
                                 list. */
unsigned cbAppointment;       /* count of bytes of appointment
                                 information                      */
char     Notes [cbNotes];     /* the text info of the note        */
BYTE     ApptInfo [];         /* the block of appointments        */

APPOINTMENT-SPECIFIC INFORMATION
================================

The information in the appointment block is stored as a list of single
appointments. Each appointment consists of the following fields:

char    cBytes;               /* the count of bytes in the
                                 appointment, e.g. the next
                                 appointment's info will be at
                                 & (ThisAppt.cBytes) +
                                 ThisAppt.cBytes                  */
char    flags;                /* the low bit controls the alarm
                                 (1 = alarm), while bit 1, if set,
                                 indicates that it is a special
                                 time                             */
int     Time;                 /* in minutes past midnight */
char    ApptDesc[];           /* a null-terminated string which
                                 contains the text associated with
                                 an appointment */

--
_________________________________________________________
Robert Woodcock | Note: Your standard disclaimers apply. |

................| it can be quite a curse) - Plucky Duck |



Fri, 30 Jan 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Runtime error '321' Invalid file format

2. Don't open file with 'doc' file extension but which is not in a valid word file format

3. Move data from a shared cal to default cal

4. Unrecognised Database format 'u:\test.mdb'

5. 'keep track of formatting' option

6. **************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Help me !!!!!!!!!!!!!!!!!!!!!!!!'''''''''''''''''''''''*************

7. error '3343' - Unrecognized database format

8. Formatting 'Numeric' Strings

9. 'é' caractere format using OSQL utility

10. Word's binary file format

11. Need format of Win31's Cardfile files

12. Inet ftp GET does't return correct file format

 

 
Powered by phpBB® Forum Software