Substitution for Windows.h

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hai all,
I am having a sample code for communicating a sagem biometric finger
print scanner through a serial port in windows environment,in which a
header file called <windows.h> is existing.Can anybody tell me the
necessary and replacement header file to compile that sample code in
linux environment.

Thanks in advance.


                               With Regards,

                                emb in linux


Re: Substitution for Windows.h
Quoted text here. Click to load it

Type this at the command prompt :

touch /usr/include/windows.h

Re: Substitution for Windows.h

Quoted text here. Click to load it


google produced the following
http://kerneltrap.org/node/2060
Your choice is to use wine???? or "to replace your only windows.h
functions with analogues POSIX-like. see Windows32 API and read more in
MSDN."


--
The ripest fruit falls first.
        -- William Shakespeare, "Richard II"


Re: Substitution for Windows.h
Hai
I have tried with wine . But i got the following messages and the
application went to wait stage forever.

Messages:
converted windows directory to new entry HKCU/Environment
"windir"=L"c:\windows"
Wine:cannot find 'rundll.32.exe'
fixme:comm:setup comm insize 102400 outsize 102400 unimplemented stub.

NOTE:I am having Mandriva LE 2005  on my development system, no
windows.
Shane wrote:


        With Regards

        emb in linux.


Re: Substitution for Windows.h

Quoted text here. Click to load it


Looks like you'll need to if 0 out some stuff, and go from there ...
 
Quoted text here. Click to load it

Maybe try recompileing your app against winelib:
http://www.winehq.org/site/docs/winelib-guide/index

--
-Menno.


Re: Substitution for Windows.h

Quoted text here. Click to load it

windows.h contains non-portable M$-Windows only functions. The proper way
would be to completely eliminate windows.h and replace the functions
declared in there with their posix equivalents.

As far as serial port access is concerned you may have a look at the "Serial
Programming Guide for POSIX Operating Systems" which can be found at the
following URL:

http://www.easysw.com/~mike/serial /

If you are unable to port the non-portable functions you may also have a
look at libwine, which I would consider a more improper way :)

Sven

--
Kernel panic: I have no root and I want to scream
(Linux Kernel Error Message)

We've slightly trimmed the long signature. Click to see the full one.
Re: Substitution for Windows.h
hai Sven Geggus
Thanks for that
Right now i am analysing the windows code.
I will contact u while implementing.

                                                                  With
Regards
                                                                  emb
in linux.
Sven Geggus wrote:
Quoted text here. Click to load it


Re: Substitution for Windows.h

hai all
can anybody tell me the exact replacement  of BOOLEAN datatype in
linux.
Thanks.
                                                        With Regards
                                                         emb in linux.


Re: Substitution for Windows.h
Quoted text here. Click to load it

When required, I use:
typedef unsigned char BOOLEAN;

Apostolos

--
Replace earth.space with gmail.com for a valid e-mail

Re: Substitution for Windows.h
hai all
I have written a  c code which test's the two serial ports via Null
modem cable and its working fine.But in that code i only used termios
structure and have n't used the files like serial.h and serial.c.
what are those files really meant for?
how to use those?
If anybody knows please clear me...plz
Thanks in Advance.


                        With Regards,

                         emb in linux.


Re: Substitution for Windows.h
Hai all,
Here i want to initialise a timmer by utilising termios structure in
process of establishing serial communications( exact replica for
COMTIMEOUTS in DCB).can any body tell me how to acheive this?
Waiting for your reply's!!
                                                                With
Regards,
                                                                 emb in
linux.


Re: Substitution for Windows.h
Hai all,
First of all A Very Happy New Year To All.
As i said earlier, I am having a  sagem biometric finger scanner code
in windows operating system and now I successfully replaced the
windows.h with termios.h.I debuged the code with GDB and found that it
is getting stuck in Read call.
Is there any debugging tools in linux to check my code .My code
contains some 20-25 functions.It is heard to judge the error in GDB.I
hope i explaned clearlly.
Waiting for ur responses...

Thanking you.
                                                With Regards
                                                emb in linux.


Site Timeline