• last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
How do I handle such situation correctly?

How do I handle such situation correctly?

Not without doing some work, or copying the .Buffer to a PWSTR. It looks like NtfsOpenFile() passes the variable on to several functions that expect a PWSTR. What is the issue with leaving it as a ...

Not without doing some work, or copying the .Buffer to a PWSTR. It looks like NtfsOpenFile() passes the variable on to several functions that expect a PWSTR. What is the issue with leaving it as a PWSTR? That maybe the buffer won't be null-terminated? I can see that FullPath.Buffer will be, I'm not sure about FileObject->FileName.Buffer.

I agree that using GetBuffer() when reading is not pretty. However, original code almost never copied the arrays themselves and passed that local arrays around. Perhaps I don't need to copy them?

I agree that using GetBuffer() when reading is not pretty.
However, original code almost never copied the arrays themselves and passed that local arrays around.
Perhaps I don't need to copy them?

  • More
  • CR-120
  • finished reviewing
  • More
  • CR-122
  • resumed reviewing
This can be different per use case. If you need the buffer just to read from it, use GetString(), if you need the buffer to modify it, use GetBuffer() / ReleaseBuffer(). If you are going to pass t...

This can be different per use case.
If you need the buffer just to read from it, use GetString(), if you need the buffer to modify it, use GetBuffer() / ReleaseBuffer().

If you are going to pass the data to a control that holds on to it (lParam etc) you probably dont want to use a CString at all.

The reason I did use GetBuffer() is that some functions require LPWSTR and I did not want to use const_cast<LPWSTR>(). So you say casting is better?

The reason I did use GetBuffer() is that some functions require LPWSTR and I did not want to use const_cast<LPWSTR>().
So you say casting is better?

A generic note for CString: If you just want to access the raw string pointer (to read!), use GetString() instead of GetBuffer().

A generic note for CString: If you just want to access the raw string pointer (to read!), use GetString() instead of GetBuffer().

  • More
  • CR-122
  • finished reviewing
  • More
  • CR-123
  • finished reviewing
  • More
  • CR-121
  • finished reviewing
  • More
  • CR-120
  • finished reviewing
  • More
  • CR-122
  • finished reviewing
Jira cut off the url (already gave it in irc): https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/dll/win32/browseui/explorerband.cpp;hb=6f6999647ab23b1ee53550b6f6196c912b03334a#l57

Jira cut off the url (already gave it in irc): https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/dll/win32/browseui/explorerband.cpp;hb=6f6999647ab23b1ee53550b6f6196c912b03334a#l57

As you already found out, and what we overlooked was: The TBBUTTON struct treats this as opaque data, e.g. it does do nothing but store the raw value you pass it. (in our case, a pointer) So when f...

As you already found out, and what we overlooked was: The TBBUTTON struct treats this as opaque data, e.g. it does do nothing but store the raw value you pass it. (in our case, a pointer)
So when freeing this data, the pidl becomes invalid, and the button can no longer use it.

Yup... already solved... thanx for mentioning https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif

Yup... already solved... thanx for mentioning

Make sure you removed handling of button up/down window message handling, otherwise your toolbar won't send the message to the rebar. Also you may want to catch WM_NOTIFY instead, to know which bu...

Make sure you removed handling of button up/down window message handling, otherwise your toolbar won't send the message to the rebar.

Also you may want to catch WM_NOTIFY instead, to know which button is clicked

From specification: "Stopped - Short Packet Enable (SPE). Default = ‘0’. When set to ‘1’, the xHC may generate ..."

From specification: "Stopped - Short Packet Enable (SPE). Default = ‘0’. When set to ‘1’, the xHC may generate ..."

Latency?

Latency?

That's exactly what I needed, while Giannis had provided me a temporary working solution. Thanx https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif EDIT: Ahh, it i...

That's exactly what I needed, while Giannis had provided me a temporary working solution. Thanx

EDIT: Ahh, it indeed conflicts with ATL and all. Besides, I don't think including the entire header is a better alternative, just for this two macro definitions, right.

Hmm... I did that and I am getting Access violation errors and some other stuff. 0_o EDIT: Infact, CComHeapPtr caused problems in case of Left/Right clicks. In the case of handling the clicks, I u...

Hmm... I did that and I am getting Access violation errors and some other stuff. 0_o

EDIT: Infact, CComHeapPtr caused problems in case of Left/Right clicks. In the case of handling the clicks, I used to receive the pidls via dwdata member of TBBUTTON structure. And when I used the CComHeapPtr, as usual it used to auto destroy it. So whenever I clicked the button again (i.e internally the pidl is destroyed.) it gave me access violation errors and hang ups, just like in this case. 0_o The main culprit I guess depends on how TBButton structure handles that dwData member.

It should have been documented but I thought I could be lazy for such a small function. I fixed it now https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif

It should have been documented but I thought I could be lazy for such a small function. I fixed it now

Thank you, everyone, for giving a thorough review of the code. Helped a lot. Looking forward to similar and great feedback for the future revisions too. https://code.reactos.org/static/olpro3/2stat...

Thank you, everyone, for giving a thorough review of the code. Helped a lot. Looking forward to similar and great feedback for the future revisions too.

Hmm... I tried to test CISFBand::OnWinEvent() but it is not even called while the program is alive. (i.e. the control doesn't even reach that function when I click the button.) So how to make use o...

Hmm... I tried to test CISFBand::OnWinEvent() but it is not even called while the program is alive. (i.e. the control doesn't even reach that function when I click the button.) So how to make use of this function to avoid subclassing? Besides, how to know which click (left/mid/right) caused the WM_COMMAND? ;P

Pointless check (removed already)

Pointless check (removed already)

What you mean is aggregation but we tend to avoid it. it makes things confusing some times and on top of that our ATL doesn't support aggregation yet.

What you mean is aggregation but we tend to avoid it. it makes things confusing some times and on top of that our ATL doesn't support aggregation yet.

Quad not because of the size, but because of the word size. sizeof(WORD) = 2, sizeof(DOUBLEWORD) = 4, sizeof(QUADWORD) = 8. OK, it can be quite confusing!

Quad not because of the size, but because of the word size. sizeof(WORD) = 2, sizeof(DOUBLEWORD) = 4, sizeof(QUADWORD) = 8.
OK, it can be quite confusing!

I see that rxprocs.h does indeed define QuadAlign() this way, but our cdfs and udfs drivers define it differently, using four bytes (which actually makes more sense to me - Quad = 4). What's up wit...

I see that rxprocs.h does indeed define QuadAlign() this way, but our cdfs and udfs drivers define it differently, using four bytes (which actually makes more sense to me - Quad = 4). What's up with that?

I think I prefer adding something like this to ntfs.h:
#define ATTR_RECORD_ALIGNMENT 8 /* The beginning and length of an attribute-record are always aligned to an 8-byte boundary, relative to the beginning of the file record. */

Thanks! My local copy is now totally int-free everywhere throughout the project. https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif

Thanks! My local copy is now totally int-free everywhere throughout the project.