Hi all,
All that I have done in c is a hello word, but I'm RTFM. I have to
extract the time from a usb-key from HASP-HL Aladdin. The software
that came with this brings me the code in c that do this
this is :
hasp_status_t status;
hasp_time_t time;
status = hasp_get_rtc(handle, &time);
/* check if operation was successful */
if (status != HASP_STATUS_OK)
{
switch (status)
{
case HASP_INV_HND:
break;
case HASP_NO_TIME:
break;
default:
break;
}
}
unsigned int day, month, year, hour, minute, second;
status = hasp_hasptime_to_datetime(time, &day, &month, &year, &hour,
&minute, &second);
if(status == HASP_INV_TIME)
{
/* handle error */
}
****************
So i tried to include in a main but throws a lot of undeclare
'hasp_status_t','hasp_time','status','handle' and a lot of parse
errors too.
this is what I did.
#include <stdio.h>
char get_lafecha( )
{
hasp_status_t status;
hasp_time_t time;
status = hasp_get_rtc(handle, &time);
/* check if operation was successful */
if (status != HASP_STATUS_OK)
{
switch (status)
{
case HASP_INV_HND:
break;
case HASP_NO_TIME:
break;
default:
break;
}
}
unsigned int day, month, year, hour, minute, second;
status = hasp_hasptime_to_datetime(time, &day, &month, &year, &hour,
&minute, &second);
if(status == HASP_INV_TIME)
{
/* handle error */
}
return status
}
char main()
{
char lafecha;
lafecha = get_lafecha()
printf(lafecha);
}
how could I accomplish this 2 1915
Atropo wrote, On 25/05/08 07:15:
Hi all,
All that I have done in c is a hello word, but I'm RTFM. I have to
extract the time from a usb-key from HASP-HL Aladdin. The software
that came with this brings me the code in c that do this
this is :
hasp_status_t status;
hasp_time_t time;
<snip>
So i tried to include in a main but throws a lot of undeclare
'hasp_status_t','hasp_time','status','handle' and a lot of parse
errors too.
<snip>
how could I accomplish this
I would assume that the library also came with a header which you need
to include which provides declarations for all the times, prototypes for
functions etc. I'm sure if you look at the documentation and/or example
code they tell you what you need to include.
--
Flash Gordon
On 25 mayo, 03:41, Flash Gordon <s...@flash-gordon.me.ukwrote:
Atropo wrote, On 25/05/08 07:15:
Hi all,
All that I have done in c is a hello word, but I'm RTFM. *I have to
extract the time from a usb-key from HASP-HL *Aladdin. The software
that came with this brings me the code in c that do this
this is :
hasp_status_t status;
hasp_time_t time;
<snip>
So i tried to include in a main but throws a lot of undeclare
'hasp_status_t','hasp_time','status','handle' and a lot of parse
errors too.
<snip>
how could I accomplish this
I would assume that the library also came with a header which you need
to include which provides declarations for all the times, prototypes for
functions etc. I'm sure if you look at the documentation and/or example
code they tell you what you need to include.
--
Flash Gordon
Thanks a lot Flash. I'll look for those headers, but don't have
much hope on their documentation. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom Lee |
last post by:
Hi,
I'm new to .NET 2003 compiler. When I tried to compile my
program using DEBUG mode, I got the following errors in the
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7
\include\xdebug...
|
by: Hajo Molegraaf |
last post by:
Hi,
I'm doing my first steps in Qt programming and there is something that
I don't know how to do. As an excercise I want to write some
filemanager like application and I'm trying to implement...
|
by: Lee David |
last post by:
I went to the sun site and downloaded what I hope is the development part of
java. I downloaded JDK5 with Netbeans. I installed it and now have a
folder in my program group "Netbeans". Is that...
|
by: John |
last post by:
Hi all...
Either I'm doing really something really stupid - or maybe there is
some bug somewhere (optimizing?). In a function I have:
int x1, y1, x2, y2;
float dR, dX, dY;
dR =...
|
by: Peter |
last post by:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char input_string;
printf("Please enter conversion: ");
scanf("%s", input_string);
|
by: shan_rish |
last post by:
Hi CLCers,
I coded a function to allocate memory and i am passing a pointer to the
function. The code is compiling but throws error and closes while
executing. The program is as below:...
|
by: NT |
last post by:
Hi there!
I am puzzled by what I think must be a subtlety of C++ when
list-initializing member variables in derived classes...
Here's what I mean...
class A { // warning l337proggy alert!...
|
by: mdh |
last post by:
As I begin to write more little programs without the help of the
exercises, little things pop up that I need to understand more fully.
Thus, below, and although this is not the exact code, the...
|
by: sagi |
last post by:
Hello erveryone,I am a newcomer here and the word of c.
Here I have a question confused me a lot that when I read codes I
found some declaration like that:
"int regcomp(regex_t *restrict...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |