Felipe Villarroel wrote:
> Its ok to typecast the char* to LPCWSTR? as in
> file = CreateFile((LPCWSTR) SrcFileNames[i],GENERIC_READ , 0,
> NULL, OPEN_EXISTING, 0, 0); ?
No. If you wanted to use an ASCI where a Unicode char was expected, you
would have to first convert it to Unicode using a function like
MiltiByteToWideChar.
However, CreateFile actually expects LPCTSTR as it's first parameter. It is
then converted to LPCSTR or LPCWSTR dependant on whether you have Unicode
defined. (In your case, you must have)
If this is the case, and you are using TCHAR within your code, then what is
the reason for the char? Maybe it's a value returned from a network read?
Could it be a TCHAR?
My first approach would be to see why it's a char, and not a TCHAR (or
WCHAR), and check whether you can change it in the source (perhaps it's just
something the PICE devs missed)
Secondly, if it must remain a char, but you still want to have Unicode
defined (as we mentioned, not having Unicode defined will call the ASCI
version, which will be fine for your char as it's first member is LPSTR),
then you could call the ASCI version of CreateFile exclusively by calling
CreateFileA.
> and also i have another question. Currently in the source
> (main.c) we assume in line 368 that sizeof(DWORD) ==
> sizeof(INT) and the compiler issues a warning. Its ok to
> typecast this too?
> find_stab_sections(p,IMAGE_FIRST_SECTION(pNTHeaders),pNTHeader
> s->FileHeader.NumberOfSections,&pStab,(PINT)
> &nStabLen,&pStr,&nStabStrLen);
I'm assuming from '(PINT)&nStabLen' that you have a DWORD which you are
typecasting to an INT.
Whilst a DWORD and an INT are of the same size, a DWORD is an unsigned long,
and an INT is signed, which means typecasting from DWORD to INT could result
in data loss if nStabLen is a very high value i.e. more than an INT can
hold. (check your limits.h for this value, it's 2147483647 for 4 byte ints)
Is making nStabLen a DWORD not an option?
> Also, i'm a native spanish speaker. I would be happy to help
> in anyway i could.
Pop into IRC. There is always plenty for people to do ;)
Ged.
Hi ReactOS devs!,
currently i'm trying to get PICE compiling and working again (and learning something about the ReactOS internals in the process). Currently i have a question related to what i'm doing.
To fix some warnings in the compilation of the PICE loader i have to fix the first parameter to CreateFile, because CreateFile expects the first parameter to be a LPCWSTR and its a char* instead. Its ok to typecast the char* to LPCWSTR? as in
file = CreateFile((LPCWSTR) SrcFileNames[i],GENERIC_READ , 0, NULL, OPEN_EXISTING, 0, 0); ?
and also i have another question. Currently in the source (main.c) we assume in line 368 that sizeof(DWORD) == sizeof(INT) and the compiler issues a warning. Its ok to typecast this too?
find_stab_sections(p,IMAGE_FIRST_SECTION(pNTHeaders),pNTHeaders->FileHeader.NumberOfSections,&pStab,(PINT) &nStabLen,&pStr,&nStabStrLen);
Well, thats all i have to say. Hmm, i forgot, thanks for all your hard work done in ReactOS!. I'm watching the project and the mailing list from 2000 onwards but i only speak if i need to say anything :). I always try to get people interested in this project, explaining to people what is and what its not. Also, i'm a native spanish speaker. I would be happy to help in anyway i could.
thanks again for your great work,
Best regards,
Logan_V8
--
_______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org
This allows you to send and receive SMS through your mailbox.
Powered by Outblaze
Aleksey Bragin wrote:
> We have a rather nice presentation done by Steven Edwards, I suggest we
use it as a base.
I've looked at Stevens in the past, but didn't think there was much in there
we can use anymore.
Also, whilst the theme was pretty, I think it could be made a little more
professional.
> Though we need something fresh and reworked too, because the Steven's one
is already outdated in some parts
> (ReactOS progressed quite a while since presentation were used last time).
I agree, plus Stevens was aimed at a Wine audience, which also needs to be
changed to a general audience.
How about I put together a new base presentation and submit it to SVN once
approved?
An anyone interested in contributing to the presentation can then work
through SVN.
Ged.
I have a few large presentations to give on ReactOS in September, and as a
group we don't have any previous presentations stored. Although not a weekly
event, a few of us do give presentations from time to time, which means we
are probably going through the same process of compiling a presentation from
scratch.
So I was wondering if anyone was interested in putting our heads together
and compiling a default presentation which we can use.
This first default presentation should cover topics such as what ROS is and
what it's goals are, and then move onto a description of the system,
finalising with a short demonstration.
As ROS grows, requests for us to give these sort of things will obviously
grow too, including more detailed discussions on ROS internals. Therefore,
as more specialised presentations are given, we could store these too,
eventually offering a nice collection of presentations which we can pull out
when a need arises.
So, any volunteers?
Ged.
Timo Kreuzer wrote:
> This is the code:
>
> RtlFormatCurrentUserKeyPath(&CurrentUserKeyPath);
>
>
InitializeObjectAttributes(&ObjectAttributes,&CurrentUserKeyPath,OBJ_CASE_IN
SENSITIVE,NULL,NULL);
> Status = ZwOpenKey(&CurrentUserKeyHandle, KEY_READ, &ObjectAttributes);
>
> And I always get Status == STATUS_OBJECT_NAME_NOT_FOUND
What makes you sure ZwOpenKey is failing, and not one of the functions above
it?
You should use error checking where nessesary.
Ged.
WaxDragon wrote:
> Maybe the first order of business would be picking a file format!
Whenever I give presentations, whether it be at work, uni or a company I've
never had anything other than MS PowerPoint available.
I would say this is a must for a base format, and people can convert from
this is need be.
Ged.
Hi,
I tried to read the Values of the SysColors from registry in win32k. But
I get an error opening the CurrentUserKey.
This is the code:
RtlFormatCurrentUserKeyPath(&CurrentUserKeyPath);
InitializeObjectAttributes(&ObjectAttributes,&CurrentUserKeyPath,OBJ_CASE_INSENSITIVE,NULL,NULL);
Status = ZwOpenKey(&CurrentUserKeyHandle, KEY_READ, &ObjectAttributes);
And I always get Status == STATUS_OBJECT_NAME_NOT_FOUND
This is in trunk.
Is there something wrong with my code or is there something wrong with
Registry functions?
Greetings,
Timo
Hi,
I just tested OOo 2.0.3, I get up to most of files are unzipping, then a pop up!
"This package requires a newer version of the Windows Installed.
Do you want to update the version of windows Installed on you system?"
[Yes] [No]
NO! 8^o
I thought we had this fixed! BTW, I can install it under wine.
James